Re: shutdown menu item
Javier Vasquez <[email protected]>
| Newsgroups | gmane.comp.window-managers.fluxbox.user |
|---|---|
| Message-ID | <[email protected]> |
On 7/4/10, Simon Bowden <[email protected]> wrote: > You can't inline the script. The wiki is helping you make a shell script to > call from the menu. > > You need to put the #!/bin/sh ... stuff in a file, make it executable, then > call that in your exec: > > $ cat > ~/bin/my-shutdown.sh << EOF > #!/bin/sh > gdmflexiserver -a -c 'SET_LOGOUT_ACTION HALT' > kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}') > EOF > $ chmod +x ~/bin/my-shutdown.sh > > Then [exec] (Shutdown) { ~/bin/my-shutdown.sh } > > Cheers, > > - Simon > > On Sun, Jul 4, 2010 at 2:40 PM, Kete <[email protected]> wrote: > >> Hello, >> I put Shutdown in my menu and clicked on Reconfigure, but clicking on >> Shutdown doesn't shut down the computer. I'm using xdm in Debian, and >> here is my .fluxbox/menu: >> [begin] (fluxbox) >> [include] (/etc/X11/fluxbox/fluxbox-menu) >> [exec] (Shutdown) { #!/bin/sh >> gdmflexiserver -a -c 'SET_LOGOUT_ACTION HALT' >> kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}') } >> [end] >> That's based on >> http://fluxbox-wiki.org/index.php?title=Shutdown_computer_with_dialog I >> also moved it to /etc/X11/fluxbox/fluxbox-menu and clicked Reconfigure, >> but it still didn't work. It's been years that I use the following: [submenu] (Exit-Menu) {} [exec] (Lock) {xlock} [exit] (Logout) ! [exec] (Suspend-Disk) {sudo ifdown eth0 && sudo acpitool -S && sudo ifup eth0} [exec] (Suspend-Disk) {sudo swapoff -a && sudo swapon -a && sudo acpitool -S} [exec] (Suspend-Mem) {sudo acpitool -s} ! [exec] (Reboot) {sudo reboot} [exec] (Reboot) {sudo shutdown -r now "Sutdown: Rebooting now..."} ! [exec] (Shutdown) {sudo halt} [exec] (Shutdown) {sudo shutdown -h -P now "Shutdown: Shuting down now..."} [end] Of course I have reboot, halt and shutdown as entries in /etc/sudoers for me so I don't have to provide password, :-) -- Javier. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first