You are not logged in.

#1 2009-01-22 23:48:59

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

[SOLVED]Openbox shutdown issue

I have added shutdown and reboot capabilities to a standard openbox menu. The reboot works fine but the shutdown has some issues. When I select "Shutdown" my X stops responding and the only thing i can do is kill X (Ctrl+Alt+Backspace) and then issue a shutdown command manually.

This is my relevant openbox menu entry

  <menu id="quit-menu" label="Quit">
    <item label="Log Out">
      <action name="Exit">
    <prompt>yes</prompt>
      </action>
    </item>
    <item label="Reboot">
      <action name="Execute">
    <command>sudo shutdown -r now</command>
      </action>
    </item>
    <item label="Shutdown">
      <action name="Execute">
    <command>sudo shutdown -h now</command>
      </action>
    </item>
  </menu>

and I have added this line at the end of the sudoers file

 inxsible ALL=NOPASSWD:/sbin/shutdown

Why is it that reboot works and shutdown doesn't?

Last edited by Inxsible (2009-01-23 00:30:14)


Forum Rules

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

Offline

#2 2009-01-23 00:05:26

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Openbox shutdown issue

Try putting in the absolute path, reconfigure Openbox and see if that helps.

Fyi - I have defined an ACPI action (like documented in the wiki) so all I have to do is press the power button to shut down. The entries in my Openbox menu only list rebooting and suspending to RAM smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2009-01-23 00:11:09

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

Re: [SOLVED]Openbox shutdown issue

B wrote:

Try putting in the absolute path, reconfigure Openbox and see if that helps.

Fyi - I have defined an ACPI action (like documented in the wiki) so all I have to do is press the power button to shut down. The entries in my Openbox menu only list rebooting and suspending to RAM smile.

Using the absolute path didn't help. It still froze my X and I had to kill it and manually issue shutdown. Seems strange that the same damn thing works for reboot but not for shutdown.


I will have a look at you ACPI action in the wiki. Thanks


Forum Rules

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

Offline

#4 2009-01-23 00:21:07

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Openbox shutdown issue

Well I have it here anyway so...

[stijn@hermes ~]$ cat /etc/acpi/events/power
# This is called when the user presses the power button

event=button/power (PWR.||PBTN)
action=/sbin/poweroff

Restart acpid and enjoy wink.

It's also funny to have people see you press that button and everything goes out. 'Oh no you cannot do that! That is bad for your system!'


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-01-23 00:23:32

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

Re: [SOLVED]Openbox shutdown issue

B wrote:

Well I have it here anyway so...

[stijn@hermes ~]$ cat /etc/acpi/events/power
# This is called when the user presses the power button

event=button/power (PWR.||PBTN)
action=/sbin/poweroff

Restart acpid and enjoy wink.

It's also funny to have people see you press that button and everything goes out. 'Oh no you cannot do that! That is bad for your system!'

Windows users eeh tongue.

Already got it from the Wiki. acpid doesnt seem to wanna start. it says device or resource busy.

I will try a reboot and see.

Hopefully it should work. BUT it still irks me that the /sbin/shutdown option doesn't work for shutdown but works for reboot. GRRRRRRRRRR !!!!


Forum Rules

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

Offline

#6 2009-01-23 00:29:50

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

Re: [SOLVED]Openbox shutdown issue

Sweet !!!!


Forum Rules

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

Offline

#7 2009-01-23 01:33:08

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Openbox shutdown issue

Glad you got it to work wink.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB