How do I unlock the lock screen in Unity from command line?
gnome-screensaver-command -l
locks the screen, but gnome-screensaver-command -d
doesn't unlock the lockscreen.
Is there another way to unlock the lock screen from the command line? Not via ssh, via script, for example:
gnome-screensaver-command -l && sleep 5 && <command to unlock>
gnome-screensaver-command -d
doesn't unlock it because it's not meant to. It only deactivates the screensaver, but it won't log in as any user, that's why it doesn't work. – M. Becerra Mar 06 '17 at 11:36man gnome-screensaver-command
, it says for-d
"unblank the screen". So it is not meant to be unlocking if your session is locked. Only turning on the display if it has been blanked out/turned off. – Sergiy Kolodyazhnyy Mar 06 '17 at 11:52