Suspend/Hibernate at command line as regular user in 13.37: use ConsoleKit?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
I've found several strings like these, and they all seem very distribution-specific—and version-specific. Run as root and as user, this command produces:
I think the solution has something to do with /usr/share/dbus-1/interfaces/org.freedesktop.PowerManagement.xml but I'm not sure how to put it all together.
(just added int32:0). Sorry, I'm just guessing. Usually I just use the suspend button over powermanager preferences on the system tray, or type pm-suspend on the CLI to do that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.