You are not logged in.
Hi,
I am trying to add a feature to openbox that allows me to select "reboot" in my open session.
I think the most "elegant" solution would be to use policykit.
I installed consolekit and polkit.
I added
exec ck-launch-session openbox-session
to my ~/.xinitrc.
When I am in an openbox session, simply issuing a reboot from a terminal doesn't work.
I have looked through the wiki, the arch bbs (don't want to use the sudo example), google, etc., but none of the polkit documentation I could find was really helpful. Where could I find a decent newbie tutorial on policy kit with examples to work through?
Thanks!
Last edited by awayand (2011-04-28 02:42:27)
Offline
reboot
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
shutdown
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Arch64/DWM || My Dropbox referral link
Offline
Hello JokerBoy,
thanks for your prompt reply. If I understood correctly:
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
send a message to the systemwide message bus,
show the reply,
send the message to connection name "org.freedesktop.ConsoleKit" provided by some client program on the systemwide message bus(how do I find out which program is providing this connection name or confirm that this is indeed provided by ConsoleKit?),
send the message to the object "/org/freedesktop/ConsoleKit/Manager" within the connection name above,
send the message to the method "Restart" defined in the "org.freedesktop.ConsoleKit.Manager" interface.
Are you implying I should execute the above command in my terminal? Wouldn't I have to put this into a configuration file somewhere?
Thanks for your help!
EDIT: Ok, I understand now. After invoking openbox with ck-launch-session I can use the above commands so I just need to put these as "shortcuts" into my menu and done.
Last edited by awayand (2011-04-28 02:34:39)
Offline