I have managed to change keyboard shortcuts to use the login screen instead of the lock screen, see this question. However, after I suspend the computer and wake it up again, I get the lock screen.

How can I resume to the login screen after suspend? This is on 12.04, classic gnome session.


Yes, there is a way. You can manage scripts which are run after/before suspend/hibernation (etc/pm/sleep.d/). To make your computer load login screen (just before) suspend/hibernation just do the following:

Execute these commands in terminal:

sudo touch /etc/pm/sleep.d/99-login-screen.sh
gksu gedit /etc/pm/sleep.d/99-login-screen.sh

Paste this into file:

case "$1" in
        gdbus call --system --dest org.freedesktop.DisplayManager --object-path /org/freedesktop/DisplayManager/Seat0 --method org.freedesktop.DisplayManager.Seat.SwitchToGreeter
exit $?

and save it. Now try to suspend and resume your system :) [I tested it on ubuntu 12.04.02 LTS]

  • If you use 00 instead off 99, to run it first of all, it will be neater.
    – AliN
    Jan 3 '14 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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