13

I used to lock screen with this command, but it stopped working recently, probably after update. I'm running VERSION="13.10, Saucy Salamander". How can I restore this function?

$ gdmflexiserver
method return sender=:1.10 -> dest=:1.97 reply_serial=2

I used to invoke this command with openbox keybinding:

<keybind key="XF86ScreenSaver">
  <action name="Execute">
    <execute>gdmflexiserver</execute>
  </action>

I think it used to work from terminal emulator as well.

UPDATE: To my surprise, it works again. This might be because of system update.

method return sender=:1.10 -> dest=:1.71 reply_serial=2
Rumca
  • 337

3 Answers3

27

What @wilf said, but maybe you are looking for

dm-tool lock

for a different lock experience. (Because you said with lightDM...)

SECURITY WARNING: avoid using dm-tool lock unless you can verify it works correctly, see:

falconer
  • 15,334
2

Just this normally works, but with gdm (Gnome Desktop Manager):

gnome-screensaver-command -l

If this is from a tty, you need to run export display=:0 or something first - you can find the current user session using w.

I think I'll just leave this in for reference

Wilf
  • 30,732
0

Install light-locker. The command:

dm-tool lock

or:

light-locker-command -l

Should then lock the screen, using the lightdm greeter as the lock-screen. If you try to switch back with the tty you will just get a locked screen with a message and then get redirected to the greeter after a few seconds.