I'm using Xubuntu 12.04. In the Power Manager, I have checked Extended -> Lock screen when going for suspend/hibernate. If I choose to suspend from the main menu / Panel 1, the screen is locked. However, if I use
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend (see How can I suspend/hibernate from command line?; I use this command via a keyboard shortcut), the screen is not locked. How can I (1) suspend the system (2) have the screen locked at the same time (3) do not require root rights to do so [since I would like the command to be assigned to a keyboard shortcut].
You can do that by using the following:
In a keyboard shortcut you need to put
If the above command does not work, you can also try using a shell script file (for example
That will create a file named suspend_lockscreen.sh in the user home folder. Then, in the shortcut just call:
|show 5 more comments|
I was using amfcosta's dbus command to suspend from the command line. However, upon resume, eth0 was down.
I then found this command:
This command disables networking, suspends, and then re-enables networking when the computer wakes up.
I am running Xubuntu 14.04.
Update: This may not affect others, but it turns out that on my Asus EEE 900, the wired ethernet connection only works every other time the EEE wakes up. This is, of course, very annoying, and means that suspend is unusable.