Sample Header Ad - 728x90

How do I shut down a system through a ConsoleKit DBus message as user?

4 votes
3 answers
4892 views
I found the following command line to shut down a Debian/GNU Linux system dbus-send \ --system \ --dest=org.freedesktop.ConsoleKit \ --type=method_call \ --print-reply \ --reply-timeout=2000 \ /org/freedesktop/ConsoleKit/Manager \ org.freedesktop.ConsoleKit.Manager.Stop It works if I execute the command as superuser, but as a non-privileged user it says: Error org.freedesktop.ConsoleKit.Manager.NotPrivileged: Not Authorized I would like to know if it is possible to modify such a command in such a way that, interacting with PolicyKit, it can grant the privilege to shut down the system to a normal user.
Asked by enzotib (53107 rep)
Jan 21, 2012, 01:49 PM
Last activity: Aug 20, 2015, 02:40 PM