Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

2 Answers 2

What @wilf said, but maybe you are looking for

dm-tool lock

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

share|improve this answer
    
Running this from a tty, and this is for a display manger I couldn't use export display=.., I got this error: Not running inside a display manager, XDG_SEAT_PATH not defined. Also, don't be daft like me and run dm-tool lock in a terminal when you are logged in ;D –  Wilf Jan 19 at 13:45
    
@wilf I don't know whether he wants to do it from a tty? But with something like XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0" dm-tool lock it should work (as the error suggests). (Check your XDG_SEAT_PATH in the gui with echo $XDG_SEAT_PATH) Though this dm-tool method is kinda broken in my 12.04 as if I lock the screen with it, then switch to tty, then switch back, the screen is unlocked. :D I don't know if this is corrected in 13.10. That's why I said your method is the one and gave an up for it. (Just that method isn't related to lightdm, so maybe the OP is looking for this) –  falconer Jan 19 at 13:53
    
dm-tool lock has no effect, but it can list Seat0 so I guess it should work. –  Rumca Jan 19 at 14:09
    
@Rumca I looked here for a bugreport. You said openbox, so I guess you are using Lubuntu, which accordingly to that bugreport also suffers from the problem which I mentioned in my previous comment: The lock can be easily circumvented. I've just read into the conversation under that bugreport and I have the impression that you will have to install a screensaver to lock the screen. Looks like locking of the screen was never secure on Lubuntu and now the developers removed the previous lock possibility because of that. –  falconer Jan 19 at 14:45
    
@Rumca But please read the conversation under the bugreport, I had no time to read through it. –  falconer Jan 19 at 14:45

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.