[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)

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 .
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 .
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 !!!!

Similar Messages

  • [SOLVED] Openbox + xcompmgr issues

    Pictures tell more than a thousand words, so first things first:
    http://www.abload.de/img/2010-01-31-233201_1680v9d6.png
    Basically, this happens with anything requesting true transparency, URxvt in this case.
    Dragging such windows results in what you can see up there, as does closing them.
    I can confirm this behavior with urxvt and dragging images on webpages
    in firefox.
    If I disable "urxvt.depth" in .Xdefaults, it will stop.
    I'm running xcompmgr with "exec xcompmgr -c &" in my .xinitrc.
    Could this be caused by nouveau?
    Last edited by Sadface (2010-02-01 12:26:58)

    I had the same problem initially. It can be fixed by installing xcompmgr-dana from the AUR. Incidentally, this is the version installed by default in Crunchbang, which is what I used before Arch.

  • Can we make a sticky for the RAID shutdown issue?

    Hi guys - I'm new to the forum...
    I'm experiencing the hanging shutdown issue with my K8N Neo4 Platinum board and SATA Raid 0 in XP.   I've searched the forum for answers, but think it would be a good idea if someone made a sticky of this as its a popular problem.
    If not - has anyone got a final fix?
    I've got version 1.B bios with 6.70 nVidia drivers - still no joy!

    I have two k8n neo 4 platinums that are doing the same thing.
    I installed a clean drive & a basic windows install (no dedicated drivers) & flashed  the bios to 1.c. Same issues. Msi says it is a hardware compatability issue , I say BS!
    After speaking with Nvidia they supplied newer driverd than the 6.70. The problem went away. However these drivers are not stable. I am having other issues. And am still working with Nvidia to solve them.

  • Urgent help needed; Database shutdown issues.

    Urgent help needed; Database shutdown issues.
    Hi all,
    I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
    SQL> shutdown immediate
    ORA-24324: service handle not initialized
    ORA-24323: value not allowed
    ORA-01089: immediate shutdown in progress - no operations are permitted
    SQL> shutdown abort
    ORA-01031: insufficient privileges
    Thanks and regards,
    Iqbal

    Hi,
    check SAP Note 700548 - FAQ: Oracle authorizations
    also check Note 834917 - Oracle Database 10g: New database role SAPCONN
    regards,
    kaushal

  • I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...
    But... if the Device has been Modified... this will Not necessarily work.

  • Macbook pro shutdown issue

    Macbook pro shutdown issue when I push the power button it immediately goes into sleep mode

    Hello Marrio22,
    Thank you for the question.  With OS X Mavericks, the power button has new functionality:
    OS X Mavericks updates the power button behavior on Mac computers. 
    Using the Power Button to Sleep & Wake
    Tap the power button in Mavericks to put your Mac to sleep or to wake it up:
    Tap the power button once to put your Mac to sleep.
    Tap the power button again to wake your Mac.
    Press the power button for less than a half a second to sleep or wake your Mac. This duration is similar to pressing the Space bar or Return key to wake your Mac. The power button works this way across all Macs using OS X Mavericks, including both notebook and desktop computers.
    Accessing the Shut Down Dialog
    Press and hold the power button for 1.5 seconds, to bring up additional options:
    Forcing the Mac to Turn Off
    Hold down the power button for 5 seconds to force the computer to turn off. Important: You may lose unsaved documents if you force the computer to turn off this way. Use this method of turning off your Mac only if it has become unresponsive for an extended period of time. Normally you should shut down the computer by selecting Shut Down from the Apple menu, or from the shut down dialog pictured above.
    OS X Mavericks: Using the power button
    http://support.apple.com/kb/HT5869
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • What's the perfect CHINESE FONT for iWeb to solved the Justified issue?

    Hi,
    Terible here, i'm using Chinese Font for my website...most of the Text Box were out of Justified unlike the perfect justified on English Font.
    Sorry i hope you understand what i'm trying to descript above.
    I'm wondering now, Is there any specific Chinese Font to solved the Justified issue?
    Now, everything looks fine in iWeb but when view it in Safari or any browser, there'll be out of Justified.
    Need helps and thanks!!!

    Could you provide your url so people can see what you are referring to?
    Have you tried the various Chinese fonts provided with OS X already?
    http://www.yale.edu/chinesemac/pages/fonts.html#Apple

  • I dropped my iphone 4 into the water and then i tried the rice method. The rice solved the water issue but now the screen won't work. what should i do?

    I  dropped my iphone 4 into the water and then i tried the rice method. The rice solved the water issue but now the screen won't work. what should i do?

    I guess your definition of "solved" is different from most...
    Make an appointment at the genius bar of your local Apple Store and get an out of warranty replacement.

  • Solving Centro hotsync issues without a hard reset

    I have a Centro (sprint).  I am running Windows Vista.  I cannot connect with hotsync.  Whenever I try, I get the following message -- "The connection between your handheld computer and the desktop could not be established.  Please check your setup and try again."  I went through the article referenced at the beginning of this forum and performed all the suggestions (reloaded Palm desktop 6.2, the outlook 2007 update, soft restart, etc.).  I took it to a repair center and they stated the ONLY way to fix it was to do a hard reset which would lose all info.  Since I can't hotsync, I haven't been able to backup the phone which means I'll lose everything.  I'm hoping there are some other suggestions I could try.  It seems contrary that the only way to solve a hotsync issue and save your data is to do a hard reset and lose all your data.  Thanks.
    Post relates to: Centro (Sprint)

    Is your Vista 64 bit or 32 bit? 
    Try performing a warm reset of your device... Take out the battery press and hold the UP button insert the battery while holding the UP navigator button wait until you see set date and time then release the button. Connect the phone back to the PC and try perform a hotsync.

  • How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    Facetime is not in the App store. It is part of the iOS. You access Facetime on the phone via the contact section. Facetime needs to be activated in Settings. The only reason you may not have it is if you purchased the device in an area where Facetime is prohibited by law.

  • My free trial has expired a week into the trial. I have contacted support and they haven't solved the issue. Stated to use forum to solve my license issue for this computer.

    My free trial has expired a week into the trial. I have contacted support and they haven't solved the issue. Stated to use forum to solve my license issue for this computer.

    Did you have an Adobe trial running on this same computer before?  Maybe your previous trial was used for 3 weeks and then you uninstalled it?  If so, you're only eligible for a 1 week trial on this computer.
    Nancy O.

  • [Solved]ifpower openbox shutdown etc

    I'm looking for a way to shutdown openbox.
    I found this script I have not tested it yet, If anyone kwows a better script please share it.
    http://jpegserv.com/lfpower/
    Last edited by xunil9025 (2011-08-22 19:50:06)

    Well i adopted this from some one in this forum, but i hope it will work for you too
    <menu id="ob" label="OpenBox">
    <menu id="client-list-menu"/>
    <item label="Reconfigure"> <action name="Reconfigure"/> </item>
    <separator/>
    <item label="Exit"> <action name="Exit"/> </item>
    <item label="Reboot">
    <action name="Execute">
    <prompt>
    Are you sure you want to reboot?
    </prompt>
    <execute>
    sudo shutdown -r now
    </execute>
    </action>
    </item>
    <item label="Shutdown">
    <action name="Execute">
    <prompt>
    Are you sure you want to shutdown?
    </prompt>
    <execute>
    sudo shutdown -h now
    </execute>
    </action>
    </item>
    </menu>
    </menu>

  • Openbox Exit Issue [SOLVED]

    I recently did a new Arch install by following the steps in the Wiki.  This is my second time doing this.  My first time around was a successful install using KDE but I wanted to start fresh with a lighter load so I went with LXDE/Openbox (I installed the LXDE package group but removed lxpanel and am using tint2 instead).  Everything boots OK, LXDM starts, then in to Openbox OK.  My problem is when I choose Exit from the Openbox menu, I am not sent back to LXDM but instead the system kind of freezes.  My wallpaper and tint2 panel are still present but the Openbox menu does not function and I'm forced to Ctrl-Alt-F12 or bang on my keyboard hoping to get to a terminal window.  Does anyone know what might be causing this?
    Last edited by Plus (2011-10-02 04:29:54)

    I'd have to ask are you looking to:
    a) logout [ exit ] back to tty1 for some reason or
    b) do you just need a quick method to have the options to shutdown / reboot your system without installing additional software?
    If your looking for b you can use my method if you like. In all the examples obviously replace "photek" with your username.
    1. Create a new menu entry [ I use obmenu ] called System Power. Create two sub headers with commands on the right:
        Label:               Command:
        Reboot              /home/photek/.startup/reboot.sh
        Shutdown         /home/photek/.startup/shutdown.sh
    Now create these dead simple scripts in a new directory ".startup" in your home folder.
    reboot.sh
    #!/bin/bash
    sudo reboot
    shutdown.sh
    #!/bin/bash
    sudo shutdown -hP 0
    I know the scripts are ridiculously simple but this method you can add commands like "play ~/.startup/shutdown.ogg && sudo shutdown -hP 0" if you want sox to play an outro sample or whatever. I used to use startup and shutdown sounds but they began to grate over time!
    Last thing is to make sure you have the scripts as executable and you then just need a simple edit visudo "User alias" and "Cmnd Alias". Respectively as such:
    photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
    Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot
    I've attached a copy of my visudo for reference. Anyhow, hope this helps a little with your new Openbox Arch install. Excellent WM choice BTW
    ## sudoers file.
    ## This file MUST be edited with the 'visudo' command as root.
    ## Failure to use 'visudo' may result in syntax or file permission errors
    ## that prevent sudo from running.
    ## See the sudoers man page for the details on how to write a sudoers file.
    ## Host alias specification
    ## Groups of machines. These may include host names (optionally with wildcards),
    ## IP addresses, network numbers or netgroups.
    # Host_Alias WEBSERVERS = www1, www2, www3
    ## User alias specification
    ## Groups of users. These may consist of user names, uids, Unix groups,
    ## or netgroups.
    # User_Alias ADMINS = millert, dowdy, mikef
    photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
    ## Cmnd alias specification
    ## Groups of commands. Often used to group related commands together.
    # Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
    # /usr/bin/pkill, /usr/bin/top
    Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot
    ## Defaults specification
    ## Defaults specification
    ## You may wish to keep some of the following environment variables
    ## when running commands via sudo.
    ## Locale settings
    # Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
    ## Run X applications through sudo; HOME is used to find the
    ## .Xauthority file. Note that other programs use HOME to find
    ## configuration files and this may lead to privilege escalation!
    # Defaults env_keep += "HOME"
    ## X11 resource path settings
    # Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
    ## Desktop path settings
    # Defaults env_keep += "QTDIR KDEDIR"
    ## Allow sudo-run commands to inherit the callers' ConsoleKit session
    # Defaults env_keep += "XDG_SESSION_COOKIE"
    ## when running commands via sudo.
    ## Locale settings
    # Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
    ## Run X applications through sudo; HOME is used to find the
    ## .Xauthority file. Note that other programs use HOME to find
    ## configuration files and this may lead to privilege escalation!
    # Defaults env_keep += "HOME"
    ## X11 resource path settings
    # Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
    ## Desktop path settings
    # Defaults env_keep += "QTDIR KDEDIR"
    ## Allow sudo-run commands to inherit the callers' ConsoleKit session
    # Defaults env_keep += "XDG_SESSION_COOKIE"
    ## Uncomment to enable special input methods. Care should be taken as
    ## this may allow users to subvert the command being run via sudo.
    # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
    ## Uncomment to enable logging of a command's output, except for
    ## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
    # Defaults log_output
    # Defaults!/usr/bin/sudoreplay !log_output
    # Defaults!/usr/local/bin/sudoreplay !log_output
    # Defaults!/sbin/reboot !log_output
    ## Runas alias specification
    ## User privilege specification
    root ALL=(ALL) ALL
    ## Uncomment to allow members of group wheel to execute any command
    %wheel ALL=(ALL) ALL
    ## Same thing without a password
    # %wheel ALL=(ALL) NOPASSWD: ALL
    photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
    ## Uncomment to allow members of group sudo to execute any command
    # %sudo ALL=(ALL) ALL
    ## Uncomment to allow any user to run sudo if they know the password
    ## of the user they are running the command as (root by default).
    # Defaults targetpw # Ask for the password of the target user
    # ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
    ## Read drop-in files from /etc/sudoers.d
    ## Read drop-in files from /etc/sudoers.d
    ## (the '#' here does not indicate a comment)
    #includedir /etc/sudoers.d
    Last edited by gshroc (2011-09-24 18:58:25)

  • [SOLVED] Openbox's obconf issue since upgrade

    Good Afternoon Arch Community,
    I use LXDE on top of openbox. since the upgrade, my obconf is throwing up the error:
    Failed to load an rc.xml....
    pacman was wanting to upgrade obconf but was complaining about the -git version. I assumed that the new openbox needed the newer obconf. I used 
    sudo pacman -Sf obconf
    and allowed pacman to do it's thing.
    Same error as pre-obconf upgrade.
    Current version in the repos as of this writing is:
    obconf-2.0.3.git20100309-1
    I looked in the bugs under "obconf" and found no entries.
    Then I went into the "~/.config/openbox" directory and nuked the contents, then recopied the /etc/xdg/openbox files files my home directory where they should be (as per the wiki), and then started "X".
    I also verified proper permissions on the files in "~/.config.openbox".
    Same error.
    LXDE is still running, but of course my right click options for openbox are now gone as it's not liking something about the files. So my system is not "down" per-se. I've just lost some functionality.
    Can someone please tell me what I'm doing wrong?
    Sincerely and respectfully,
    Dave
    Last edited by dcbdbis (2011-08-26 17:46:54)

    Hello bernarcher,
    rc.xml already exists in "~/.config/openbox". So I mv'd it to another name, created the symlink and tried again. Same error.
    Then I removed the symlink and restored the original file.
    Sorry it didn't work, but thank you for the post.....
    For the record, here is the contents of my "/.config/openbox" directory:
    [dcbdbis@Curly-Sr openbox]$ ls
    total 76
    drwxrwxrwx 2 dcbdbis users 4096 Aug 17 13:15 .
    drwxr-xr-x 25 dcbdbis users 4096 Aug 15 17:43 ..
    -rwxrwxrwx 1 dcbdbis users 466 Aug 16 18:44 autostart
    -rwxrwxrwx 1 dcbdbis users 379 Aug 16 18:44 environment
    -rw-rw-rw- 1 dcbdbis users 23296 Aug 3 20:34 lxde-rc.xml
    -rw-rw-rw- 1 dcbdbis users 9617 Aug 16 18:44 menu.xml
    -rw-rw-rw- 1 dcbdbis users 23147 Aug 16 18:44 rc.xml
    [dcbdbis@Curly-Sr openbox]$
    Dave

  • [SOLVED] LXDM Shutdown/Reboot Issues

    Under "vanilla" conditions (unmodified /etc/lxdm/lxdm.conf), I have no trouble logging in and out and powering off/rebooting using LXDM.
    My problem seems to arise when I set my main user account to autologin.  The autologin works as expected, and I log back out to LXDM just fine.  After logging out, there is a "username" text field replacing the large user boxes, which is a little out-of-place but isn't my main concern.
    If I try to shutdown or reboot, nothing will happen, and I give it a second just to make sure it isn't taking place in a tty or something odd like that (checked my running tty's just to be sure).  Afterward, I log back in to my main account, and upon logging out once more, the system proceeds to power off.
    The only time I've been able to reproduce it was with the autologin enabled.  Possibly worth noting is my /etc/lxdm/PostLogout, which contains this snippet from the LXDM ArchWiki Page:
    #!/bin/sh
    # Kills all your processes when you log out.
    killall --user $USER -TERM
    May not be very much related, but it is the only other change I have made to LXDM.  However, it had no adverse effects on the shutdown/reboot post-logout functionality with the autologin disabled.
    I would be very grateful if someone could point me in the right direction for fixing this bizarre behavior.
    Last edited by mellowmaroon (2012-06-11 15:18:34)

    I ended up adding /sbin/reboot to /etc/lxdm/PreReboot, and /sbin/poweroff to /etc/lxdm/PreShutdown.
    It's more of a workaround than a solution, but it seems like the easiest and most effective solution so far.  No problems with it yet.

Maybe you are looking for