You are not logged in.

#1 2009-02-06 14:33:58

Chance
Member
Registered: 2008-12-05
Posts: 99

[solved] Shutting down in Openbox

I noticed some people are able to add a section in openbox when they right click to shutdown the computer. I was wondering what the actual command i need to enter into the openbox menu configurator was.

Thanks.

Last edited by Chance (2009-02-06 16:11:45)

Offline

#2 2009-02-06 14:37:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [solved] Shutting down in Openbox

you have to setup your user to use sudo w/o entering a password for the shutdown commands.  you do this with visudo.

the commands for shutdown (-h) and reboot (-r) are:

sudo shutdown -h now
sudo shutdown -r now

Offline

#3 2009-02-06 14:53:40

muunleit
Member
From: Germany
Registered: 2008-02-23
Posts: 234

Re: [solved] Shutting down in Openbox

brisbin33 wrote:

you have to setup your user to use sudo w/o entering a password for the shutdown commands.  you do this with visudo.

Here is the wiki-article about it.

http://wiki.archlinux.org/index.php/All … o_shutdown

Last edited by muunleit (2009-02-06 14:54:49)


"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton

Offline

#4 2009-02-06 15:08:06

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [solved] Shutting down in Openbox

I don't know if anyone else has this problem, but I have set my sudoers file correctly and I use the sudo shutdown -h now and sudo shutdown -r now commands in the menu, but on selecting those menu items, openbox stops responding. I am still at the desktop and the only thing i can do is kill X and then issue a logout or a shutdown command at the tty. I even tried entering the full path to shutdown in the menu like so sudo /sbin/shutdown -r now.

Any ideas?

Last edited by Inxsible (2009-02-06 16:56:19)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2009-02-06 15:16:01

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Shutting down in Openbox

You have to allow them to be run without a password (I use "poweroff" and "reboot" btw, so just change them in the examples below):

xyne  ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot
%users ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot
%wheel ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot

I also noticed that the order matters. I had to place the line at the end of the sudoers file.

*edit*
Just to be clear, the lines are only examples and it would be pointless to add all three. I actually only have the "%wheel..." line in my sudoers file.

Last edited by Xyne (2009-02-06 15:17:44)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2009-02-06 16:11:33

Chance
Member
Registered: 2008-12-05
Posts: 99

Re: [solved] Shutting down in Openbox

Thanks guys.

Offline

#7 2009-02-06 16:53:21

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [solved] Shutting down in Openbox

Xyne wrote:

You have to allow them to be run without a password (I use "poweroff" and "reboot" btw, so just change them in the examples below):

xyne  ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot
%users ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot
%wheel ALL=NOPASSWD: /sbin/poweroff, /sbin/reboot

I also noticed that the order matters. I had to place the line at the end of the sudoers file.

*edit*
Just to be clear, the lines are only examples and it would be pointless to add all three. I actually only have the "%wheel..." line in my sudoers file.

yes I do have the following line in my sudoers and AFAIR, its the last line...but I will still check tonight

inxsible ALL=NOPASSWD: /sbin/shutdown

I might try using the poweroff and reboot to see if they work. I think this is specific to Arch because the same thing (with shutdown) works well in my Debian install.

To summarize :

I have openbox and fluxbox installed on Arch:
1) Openbox stops responding on clicking either Reboot or Shutdown from the menu. Only option kill X.
2) Fluxbox doesnt have a care in the world...it keeps working...menus and all

Debian has Fluxbox installed...and shutdown and reboot work well.




EDIT: Hmmm This thread is solved...maybe I should start a new thread...but I will have to type the whole damn thing again to explain the situation ....what can I say... I am lazy smile

Last edited by Inxsible (2009-02-06 16:54:10)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2009-02-06 17:01:41

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Shutting down in Openbox

Why not just copy and paste?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2009-02-06 17:05:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [solved] Shutting down in Openbox

Xyne wrote:

Why not just copy and paste?

I knew you'd say that... Well alright !!!


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB