Suspend/Hibernate at command line as regular user in 13.37: use ConsoleKit?
Using the most recent -current/13.37, I'm curious if there is a New Right Way to suspend as a regular user from the command line, now that we've got PolicyKit/ConsoleKit running the show. I've seen some things (e.g., on the Archlinux wiki) that seem to come close, but require UPower. For some reason I can't wrap my head around the PolicyKit documentation well enough to figure this out.
My old solution was to add a line to /etc/sudoers giving anyone in the power group access to pm-suspend, pm-hibernate, and shutdown, and this is probably what I'll end up doing with 13.37. |
I made a script to do it some time ago and don't see any reason to change it. I made an entry in /etc/acpi/ to hibernate when I hit the power button on my thinkpad.
Code:
sync |
I guess that what you're seeking has to do with dbus-send. I'm guessing, from forum searches, that this is the command line
Code:
dbus-send --system --print-reply --dest=org.freedesktop.Hal \ |
Quote:
Code:
$ dbus-send --system --print-reply --dest=org.freedesktop.Hal \ |
Add the following line to your sudoers file:
Code:
%users ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend Code:
sudo /usr/sbin/pm-suspend Edit: I didn't read the OP carefully enough. Sorry. |
What about
Code:
dbus-send --system --dest=org.freedesktop.Hal --type=method_call \ |
I believe you are wanting this:
Code:
dbus-send \ |
Quote:
|
Quote:
Sorry about that :/ |
Quote:
Hi. I know this is an old thread but it's still helpful. It helped me resolve suspend issues in XFCE open-rc system. Thank you. |
All times are GMT -5. The time now is 07:26 PM. |