13

I can't disable screen lock in Lubuntu. In Power management I have it unchecked. There is another option "Enable light locker" in the "Light locker settings". I also have this unchecked but I still see black screen after 10 minutes and when I move the mouse I have to provide a password.

I hate this behaviour in all ubuntus, but usually I can just disable it in system settings. Well not here.

So lubuntu has these settings in two places and is ignoring both.

I found this question:

Stop Xscreensaver from locking screen once screensaver starts

According to this, I tried to remove "xscreensaver" package, but didn't have it installed at all. So this solves

EDIT:

What I learned so far:

  • this is not magic. it affects other people as well
  • it is caused by a bug in Xfce power manager:

https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1193716

10
  • there are gnome and qt versions, do you have those installed? look for gnome-screensaver
    – noleti
    Jul 26, 2014 at 11:34
  • "gnome-screensaver" also not installed
    – user568021
    Jul 26, 2014 at 11:35
  • sorry, look for lxlock?
    – noleti
    Jul 26, 2014 at 11:36
  • ok.. so I just remove this?
    – user568021
    Jul 26, 2014 at 11:49
  • 2
    The idea of removing an entire package or two, just to get around unwanted invocations of an individual command therein, is the opposite of good problem-solving - and might well cause other problems besides. The proper way would be to track down where that command is specified and disable/alter it. The detective work can be fun... Sep 5, 2015 at 23:25

6 Answers 6

9

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.

3
  • 1
    (This is really a comment on Geoffrey Hing's excellent answer but apparently I don't have enough reputation to comment, though I can post an answer - seems backwards to me.) Anyway: I did Geoffrey's Step 1, i.e. Disabled system-wide startup of light-locker: sudo mv /etc/xdg/autostart/light-locker.desktop /etc/xdg/autostart/light-locker.desktop.bak and rebooted. I then modified the Light Locker Settings using the GUI through "Preferences >> Light Locker Settings" and my changed settings were then respected.
    – LeilaBD
    Apr 26, 2015 at 15:15
  • I don't have a file at ~/.config/autostart/light-locker.desktop Sep 26, 2016 at 11:15
  • @goofballLogic That file is created once you go to Preferences >> Light Locker Settings and edit/save light locker configuration. Dec 9, 2016 at 8:48
3

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.

9
  • Sorry I'm not following.. You are saying I should add the two options to my .desktop file? Which one.. I have these two: light-locker.desktop, screensaver-settings.desktop
    – user568021
    Aug 2, 2014 at 10:46
  • I referred to the ligh-locker.desktop file. Light locker is the default screen locker of Lubuntu. If you want to know more about .desktop file read this wiki article. Aug 2, 2014 at 14:21
  • ok.. added the line you provided to the Exec= line in light-locker.desktop file... let's see what happens after some time :)
    – user568021
    Aug 2, 2014 at 14:30
  • I have just edited my second post to make it clearer. I imagine you have modified the "exec" line of the file. It should not have two "exec" lines. Aug 2, 2014 at 14:58
  • You might not believe this, but it simply does not work for me. Lubuntu just ignores everything I do!
    – user568021
    Aug 4, 2014 at 9:58
1

This solved the problem for me:

sudo apt-get purge light-locker light-locker-settings

the answer as been modified as suggested from kbuilds and muru

3
  • 1
    A * causes apt-get to treat it is a regular expression, possibly with unintended consequences. Avoid it if you can.
    – muru
    Nov 10, 2014 at 18:12
  • And as per comments elsewhere, even without coarse pattern-matching, removing a package just to work around a single issue caused by something else that calls it... is a really poor approach to problem solving and might cause worse issues elsewhere. Sep 5, 2015 at 23:27
  • This did work for me. Using the * is bad practice, but I specifically uninstalled light-locker and light-locker-settings to fix this issue
    – kbuilds
    Sep 4, 2017 at 17:07
0

Do you know the autostart applications are selected in "default application for LXSession" in preferences sub-menu (for Lubuntu 14.04)? I can see the screensaver and "screenlocker" applications checked there, but I have never tried disabling it.

1
  • This is getting ridiculous. Found both options, disabled, but it still gets ignored.
    – user568021
    Jul 29, 2014 at 11:40
0

I got it to work properly based on this answer, but in newer versions of Lubuntu (15.10 in my case) there is another option that needs to be included.

My Exec line is:

Exec=light-locker --lock-after-screensaver=0 --lock-on-suspend --no-late-locking --no-lock-on-lid

Now the options in "power manager" work properly.

-3

This solved the problem for me:

sudo rm /etc/xdg/autostart/light-locker.desktop
1
  • 2
    This does indeed work, but it would be helpful to explain the consequences (disables the screen locking systemwide). To me, this isn't terrible as it can still be enabled on a per-user basis, but I'm assuming the lack of context is the reason for the downvotes. Oct 24, 2014 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .