View Full Version : [SOLVED] Suspend from terminal without root permission

23rd August 2011, 10:07 PM
I'm running on Gnome 2.32.0. I've been trying to assign a keyboard shortcut to Suspend the system when activated, but it doesn't work because to suspend the system you need to be root. The command I've been using for the shortcut is terminal "pm-suspend".

I don't wanna set up the working user as root. Is there any way to get around the root authentication while suspend to make the shortcut work?


23rd August 2011, 11:40 PM
This is the way the GUI handles it and should be what you are looking for if you want to do it the CLI way.

Gareth Jones
23rd August 2011, 11:43 PM
The best option is to find something in the GUI, perhaps under the GNOME power management settings (I'm afraid I can't check as I'm on GNOME 3 these days) especially if your keyboard has the three Sleep/Wake Up/Power buttons.

Else try:

dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend


24th August 2011, 11:17 AM
Perfect, thank you guys. It exactly what I've been looking for.

Gareth I too would gladly switch to Gnome 3, but as much as I am still learning about Linux I like to have things done and done quick, I like to have immediate access to all the things I use frequently. For me Gnome 3 relies too much on mouse and I am not a mouse person. I will wait until they make it usable for power users. I don't feel like learning how-to my system from scratch again.

Gareth Jones
24th August 2011, 04:59 PM
That's fine, I merely meant that I have no way to check how to set up power management keyboard short-cuts in GNOME 2 any more.

(Personally I find gnome-shell much easier and faster to control with the keyboard than its predecessor, but you know what works for you of course!)

Glad you got it working.