Posts: 112
chrishall57
Joined: 18 Apr 2009
#1
Fluxbox window manager.

Right-Click Exit gives me the box with the 6 buttons in.

Clicking on Shutdown just gives a flutter of disk use then nothing.

Clicking on Logout does in fact log out.

Any ideas how to shut down other than suing to shutdown -h now?

Ta.
rokytnji
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
Open search monkey. Search for exitantix.sh and logouthelper.sh and open them with leafpad and copy and paste in next post with code tags. Maybe something is pooched there.

Edit: search in /usr
Posts: 112
chrishall57
Joined: 18 Apr 2009
#3
exitantix.sh

Code: Select all

<hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-halt.png"</input>
        <action>shutdown.sh</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Shutdown"</label></text>
      </hbox>
logouthelper.sh is actually labelled inside as exitantix.sh, same code ???
Posts: 1,062
Dave
Joined: 20 Jan 2010
#4
First I would try to see if shutdown -h now actually works
menu --> terminal
type:" su" and press enter
type: root password and press enter
type:"shutdown -h now"

If that works I would check to see if you have shutdown.sh and if it is executable.
do this by:
--> menu --> run
type:"thunar /usr/local/bin"
check off"run as root" and press ok
type: root password and press ok

once thunar opens check for a file named shutdown.sh if it is there, right click on it
press properties
press permissions tab
make sure"allow this file to run as a program is checked"

If all this is good open shutdown.sh with leafpad. Either by using thunar, or typing
"leafpad /usr/local/bin/shutdown.sh" from menu --> run
then copy and paste the file context to a new post in code tags
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#5
exitantix.sh
__{{emoticon}}__ Does not match mine.

Code: Select all

# File Name: exitantiX.sh
# Purpose: exit script from fluxbox and icewm
# Authors: OU812 and minor modifications by anticapitalista
# Latest Change: 20 August 2008
# Latest Change: 02 January 2009
######################################################################################################

#!/bin/sh

export Logout='

<window title="Log Out" window-position="1">

<vbox>
  <frame>
  <hbox>
    <vbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/actions/gnome-lockscreen.png"</input>
        <action>xlock</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Lock Screen"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-hibernate.png"</input>
        <action>antixhibernate.sh</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Hibernate"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-reboot.png"</input>
        <action>sudo reboot</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Reboot"</label></text>
      </hbox>
    </vbox>

    <vbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-logout.png"</input>
        <action>logouthelper.sh</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Log Out"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-suspend.png"</input>
        <action>antixsuspend.sh</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Suspend"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-halt.png"</input>
        <action>sudo halt</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Shutdown"</label></text>
      </hbox>
    </vbox>
  </hbox>
  </frame>
        
  <hbox>
    <button>
      <label>"Close"</label>
      <input file>"/usr/share/icons/gTangish-2.0a1/16x16/actions/dialog-cancel.png"</input>
      <action>EXIT:close</action>
    </button>
  </hbox>
</vbox>
  
</window>
'

gtkdialog -c --program=Logout
unset Logout
logouthelper.sh is actually labelled inside as exitantix.sh, same code ???
My /usr/local/bin/logouthelper.sh

Code: Select all

# File Name: logouthelper.sh
# Purpose: clean logout from fluxbox and/or icewm
# Authors: OU812 for antiX
# Latest Change: 20 August 2008
############################################################

#!/bin/sh

kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}')
killall icewm-session
My default slim boot is inti Icewm. Your logout helper may be a little different if slim default boot is Fluxbox Desktop instead.

Edit: To add detail as per Daves post. Both of my logouthelper.sh and exitantix.sh are executable text files.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#6
I think that you are looking at the config files for 8.5, they are different in 11. My m11 install is similar to chrisshall's
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#7
Dave wrote:I think that you are looking at the config files for 8.5, they are different in 11. My m11 install is similar to chrisshall's
OOps. __{{emoticon}}__ Your right. forgot what I was booted into. My Bad. __{{emoticon}}__
Posts: 112
chrishall57
Joined: 18 Apr 2009
#8
exitantix.sh full code here

Code: Select all

# File Name: exitantiX.sh
# Purpose: exit script from fluxbox and icewm
# Authors: OU812 and minor modifications by anticapitalista
# Latest Change: 20 August 2008
# Latest Change: 02 January 2009
######################################################################################################

#!/bin/sh

export Logout='

<window title="Log Out" window-position="1">

<vbox>
  <frame>
  <hbox>
    <vbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/actions/gnome-lockscreen.png"</input>
        <action>xlock</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Lock Screen"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-hibernate.png"</input>
        <action>antixhibernate.sh</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Hibernate"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-reboot.png"</input>
        <action>reboot.sh</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Reboot"</label></text>
      </hbox>
    </vbox>

    <vbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-logout.png"</input>
        <action>logouthelper.sh</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Log Out"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-suspend.png"</input>
        <action>antixsuspend.sh</action>
                <action>EXIT:close</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Suspend"</label></text>
      </hbox>
      <hbox>
        <button>
        <input file>"/usr/share/icons/gTangish-2.0a1/32x32/apps/gnome-session-halt.png"</input>
        <action>shutdown.sh</action>
        </button>
        <text use-markup="true" width-chars="15"><label>"Shutdown"</label></text>
      </hbox>
    </vbox>
  </hbox>
  </frame>
        
  <hbox>
    <button>
      <label>"Close"</label>
      <input file>"/usr/share/icons/gTangish-2.0a1/16x16/actions/dialog-cancel.png"</input>
      <action>EXIT:close</action>
    </button>
  </hbox>
</vbox>
  
</window>
'

gtkdialog -c --program=Logout
unset Logout
logouthelper.sh here (it is different, dunno what went on earlier!)

Code: Select all

# File Name: logouthelper.sh
# Purpose: clean logout from fluxbox and/or icewm
# Authors: OU812 for antiX
# Latest Change: 28 October 2010
############################################################

#!/bin/sh

kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}')
killall icewm-session
killall icewm 
Posts: 1,062
Dave
Joined: 20 Jan 2010
#9
both those files look fine, I think there may be something wrong with the dbus-send command. The file should look similar to this

Code: Select all

# Filename:      shutdown.sh
# Purpose:       shutdown from exit menu
# Authors:       anticapitalista for antiX
# Latest change: 05 December 2010
# Thanks to secipolla
################################################################################

#!/bin/sh

dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
Posts: 112
chrishall57
Joined: 18 Apr 2009
#10
Here we go!

Code: Select all

# Filename:      shutdown.sh
# Purpose:       shutdown from exit menu
# Authors:       anticapitalista for antiX
# Latest change: 05 December 2010
# Thanks to secipolla
################################################################################

#!/bin/sh

dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
Posts: 1,062
Dave
Joined: 20 Jan 2010
#11
Okay looks as though there is something wrong with your dbus / hal configuration, I am not to sure how it works though. maybe one of the other guys knows a bit more on that. To get you going though you can edit the sudoers file and shutdown.sh

open shutdown.sh again as root
menu --> run
type:"leafpad /usr/local/bin/shutdown.sh"
Check off"run as root" and press ok
type: your root password an press ok
type:"#" in front of the dbus line
type:"sudo shutdown -h now" on a new line at the bottom
save and close

menu --> run
type:"leafpad /etc/sudoers"
check off"run as root" and press ok
type: your root password and press ok
type:"%users ALL=(root) NOPASSWD: /sbin/shutdown" under the line"root ALL=(ALL) ALL"
should look similar to this

Code: Select all

# sudoers file.
#
# This file MUST be edited with the"visudo" command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

%users ALL=(root) NOPASSWD: /sbin/shutdown 

##%users ALL=(root) NOPASSWD: /sbin/halt 

##%users ALL=(root) NOPASSWD: /sbin/reboot 

%users ALL= /usr/sbin/pppoeconf  

##%users ALL=(root) NOPASSWD: /usr/bin/rox
save and close

Test your shutdown if you can shutdown
Posts: 609
dark-D
Joined: 02 Jun 2008
#12
i think that is something wrong with /etc/PolicyKit/PolicyKit.conf it's better to check that out.
i use sudo halt and sudo reboot in the exit script to make things a lot more simple.
Posts: 11
rediflex
Joined: 26 Apr 2011
#13
I had this issue running openbox/lxpanel, pointed the logout button on the lxpanel menu to exitantix.sh but got nothing by clicking on shutdown or reboot. I know shutdown -h now works as that was how I was doing it before (I am building up from core here). So I popped open the files and changed 'reboot.sh' to 'sudo reboot' and 'shutdown.sh' to 'sudo halt'. That fixed the problem. Haven't messed with the hibernate etc. yet as I really don't use them on this machine. Thanks all!