You are not logged in.

#1 2008-10-16 13:48:07

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

[Solved] Openbox: Add Reboot and Shutdown to menu?

Is it possible to add reboot and shutdown to openbox's menu? If so, how?
Im too lazy to open a terminal or log out, goto root and reboot or halt.

Many thanks
Andy

Last edited by Andy Mack (2008-10-16 16:36:19)

Offline

#2 2008-10-16 14:19:12

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [Solved] Openbox: Add Reboot and Shutdown to menu?

you can solve this by using sudo

pacman -S sudo
edit as root /etc/sudoers and add this comment: ALL     ALL=NOPASSWD:/sbin/shutdown

this empowers the ordinary user to shutdown/reboot etc

sudo shutdown -h now .... for shutting down
sudo shutdown -r now .... for rebooting

Offline

#3 2008-10-16 16:22:59

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [Solved] Openbox: Add Reboot and Shutdown to menu?

And add the following to your ~/.config/openbox/menu.xml (integrate w/ your installation as necessary)

                <menu id="40" label="OpenBox">
                        <menu id="client-list-menu"/>
                        <item label="Reconfigure"> <action name="Reconfigure"/> </item>
                        <separator/>
                        <item label="Reboot">
                                <action name="Execute">
                                        <command>sudo reboot</command>
                                        <prompt>Reboot?</prompt>
                                </action>
                        </item>
                        <item label="Shutdown">
                                <action name="Execute">
                                        <command>sudo poweroff</command>
                                        <prompt>Shutdown?</prompt>
                                </action>
                        </item>
                        <item label="Logout"> <action name="Execute">
                                <execute>lxsession -exit</execute>  ## only for lxde -- which I'm using
                        </action></item>
                </menu>

Good luck!
Scott

Offline

#4 2008-10-16 16:35:57

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Re: [Solved] Openbox: Add Reboot and Shutdown to menu?

Works a treat, thanks arch0r and thanks Scott for the suggestion.

Much appreciated
Andy

Offline

Board footer

Powered by FluxBB