Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
User Journal

Journal brlancer's Journal: Fluxbox Menus

One item I've always lacked in my fluxbox menus was an option to shutdown or restart the local system. I've seen those items in Gnome and KDE (and others), but I guess fluxbox just missed it (so I may submit this).

Creating a script to run shutdown from X is pretty simple:

#!/bin/sh
/usr/bin/sudo -k
/usr/bin/gksudo -g -t "Confirm shutdown" -m "Enter your password to shudown the system:" "shutdown $1 $2"

I guess I could have figured out what script Gnome or KDE were using, but this was honestly faster.

Adding it to the Debian menu system in the way I wanted was less clear. Adding items is incredibly simple (see the very good documentation for menu), but it was sorted alphabetically and I wanted it listed at the bottom of the initial menu, below all of the submenus and above the options to manage my fluxbox session. These are controlled by the system.fluxbox-menu file (in /etc/X11/fluxbox/, copied to ~/.fluxbox/); manually adding "exec" commands there was what I needed.

BOOM!

If you want to put yourself on the map, publish your own map.

Working...