[arch-general] Shutdown and reboot
Øyvind Heggstad
mrelendig at har-ikkje.net
Fri Nov 12 16:44:11 CET 2010
On Wed, 10 Nov 2010 21:12:24 +1000
"joker-jar at yandex.ru" <joker-jar at yandex.ru> wrote:
> Please tell me the best way to allow non root user to use halt,
> reboot, shutdown e t.c. May be set group "power" to this binaries?
>
> $ ls -l /sbin/halt
> -rwxr-xr-x 1 root root 15152 2010-10-02 13:26 /sbin/halt
>
> (Not only for me but in distro). No?
halt:
dbus-send --system --print-reply\
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager\
org.freedesktop.ConsoleKit.Manager.Stop
reboot:
dbus-send --system --print-reply\
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager\
org.freedesktop.ConsoleKit.Manager.Restart
suspend:
dbus-send --system --print-reply\
--dest=org.freedesktop.UPower /org/freedesktop/UPower\
org.freedesktop.UPower.Suspend
hibernate:
dbus-send --system --print-reply\
--dest=org.freedesktop.UPower /org/freedesktop/UPower\
org.freedesktop.UPower.Hibernate
or use sudo.
More information about the arch-general
mailing list