Ubuntu 14.04 introduces a new lockscreen that looks similar to the login screen.
I am still able to lock the screen using the command gnome-screensaver-command --lock
(as I always did before), which under 14.04 does lock the screen, but:
- If you are running it from the desktop, it locks the screen using the new lockscreen.
- If you are running it from a virtual console or via SSH, it locks the screen using the old lockscreen.
I've also tried using xdg-screensaver lock
, but it works in the same way as gnome-screensaver-command --lock
does (only uses the new lockscreen when it's ran from the desktop).
Running light-locker-command --lock
didn't work, as light-locker
is not installed.
I guess there must be some differences between running the same command from the desktop and running it via SSH/virtual console, but I was not able to find any difference in the environment variables.
So, my question is: How can I lock the screen using the new Unity lockscreen and not the old lockscreen from the command line?
This question is probably related as it asks for the new command that needs to be used, so here's another question: Why does running the same lock command give different results?
Note that gnome-screensaver
is not being used anymore in 14.04, according to this bug report:
That's not really a gnome-screensaver bug, that component stopped being used in trusty.
dm-tool lock
comes close: it locks the screen, but (unlike the default Unity lock screen) also allows you switch users.dm-tool lock
anddm-tool switch-to-greeter
seem to be doing the same thing: take you back to the log in screen (greeter), which does look very similiar to the lockscreen.