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 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.

share|improve this question
add comment

1 Answer 1

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:

#!/bin/bash
case "$1" in
    hibernate|suspend)
        gdbus call --system --dest org.freedesktop.DisplayManager --object-path /org/freedesktop/DisplayManager/Seat0 --method org.freedesktop.DisplayManager.Seat.SwitchToGreeter
    ;;
esac
exit $?

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

share|improve this answer
    
If you use 00 instead off 99, to run it first of all, it will be neater. –  AliNa Jan 3 at 1:33
add comment

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.