Custom Power Control

amoskvin edited this page Oct 11, 2012 · 1 revision

The preferred method for power control (shutdown, suspend, etc.) is through ConsoleKit/UPower - this will give all the functionality out-of-the-box.

However, some distributions (specifically older or enterprisey ones) might lack these components, resulting in inability to perform any action other than logout.

Razor-qt 0.5.0 adds a way to set a custom command for each action. To do that, create a file ~/.config/razor/power.conf (for a local user) or the global Razor configuration in /etc (the exact location varies - see "System Configuration" in "About Razor"), and set any of the following keys: shutdownCommand, rebootCommand, hibernateCommand, suspendCommand and logoutCommand. Restarting the session might be required for the changes to take effect.


shutdownCommand=sudo /sbin/shutdown -h now
rebootCommand=sudo /sbin/shutdown -r now
suspendCommand=sudo /usr/sbin/hibernate-ram

Note that the set commands will override the default action.