Lubuntu enforces screen lock
This solution is a combination of @Jeroen's solution and @A lubuntu user solution.
The root cause, I believe, is that the user-specific light-locker.desktop
file doesn't override the system-wide one. So, even if the user configures light-locker to not start at all, it still runs with the default configuration parameters.
Warning: This will disable system-wide default screen locking. If you want to enable locking for a specific user, you'll need to edit the Exec=
line in the ~/.config/autostart/light-locker.desktop
file for each user. Configuring this through "Preferences >> Light Locker Settings" may do this (once the system-wide file is moved out of the way), but I haven't tried this.
Step 1: Disable system-wide startup of light-locker. This will allow the per-user .desktop file to be executed instead.
sudo mv /etc/xdg/autostart/light-locker.desktop /etc/xdg/autostart/light-locker.desktop.bak
To re-enable this, you would just rename the file so it no longer has the .bak
extension.
Step 2: Edit the user-specific light-locker.desktop file
Open ~/.config/autostart/light-locker.desktop in a text editor.
Edit the line that begins Exec=
so it is only Exec=
. That is, there is no command specified which means light-locker won't be started.
Step 3: Reboot.
I have found what seems a folder for autostart applications: ~/.config/autostart. In my computer, there is a .desktop file for the screen locker (light-locker.desktop). It is a sort of shortcut. If you want to know more about .desktop files and how to create entries for the applications menu, read this article of the wiki of LXDE which is the Desktop of Lubuntu.
The .desktop files put in the right folder create entries for the applications menu and I suspect in this folder they start applications when the user logs in. I am not sure, but users with different autostart programs have different "shorcuts" in this folder.
I think it is worth checking your light-locker.desktop file in case the problem was that your Lubuntu installation was not able to modified it when you use the light-locker settings app.
I have also found out that users with different configurations of Light locker have different light-locker.desktop files. As sensible, the only difference is the "exec" line, which determines which app or command is executed and its arguments or options. I mean clicking on an application menu entry is similar to run its "exec" line in a shell or terminal. It is quite easy to create a new app entry for a program in the menu. I have done this task several times.
The .desktop files can be edited by opening them with leafpad which is the default plain text editor in Lunbuntu. If you do not save any change, nothing will be modified.
The "exec" line is something like this:
Exec=light-locker --lock-after-screensaver=0 --lock-on-suspend --no-late-locking
.
If you want to know what arguments light-locker has got, you can open a shell and run info light-locker
. I must note there are not all of its arguments. From my point of view, that information should be improved if the developers have the chance.
However, there are several users in my Lubuntu installation and they have different Light-locker settings. I can confirm you that the following options are right:
1) If you want Light-locker to lock the screen when you suspend the computer:
Exec=light-locker --lock-after-screensaver=0 --lock-on-suspend --no-late-locking
.
2) It you do not want the previous option:
Exec=light-locker --lock-after-screensaver=0 --no-lock-on-suspend --no-late-locking
.
A "exec" line without --lock-after-screensaver=0
or --no-late-locking
can cause the functionality you have described in your computer. You can check it by running info light-locker
as I said before.
Otherwise, you could move the light-locker.desktop onto other folder and reboot to try. Before doing this latest suggestion, you'd better ask in the Lubuntu mailing list. There are people with a deeper knowledge of this OS.