Which command locks screen with lightDM?

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

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:

  • https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740163
  • https://bugs.launchpad.net/ubuntu/+source/lxsession/+bug/1205384

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