Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 05-13-2011, 03:39 PM   #1
Senior Member
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,961

Rep: Reputation: 300Reputation: 300Reputation: 300Reputation: 300
Flubox keys tutorial

If you are a fluxbox user, don't like automounting, like speeding up tasks, don't like giving users acces to devices or drives unless they are specified in sudoers.......

The ~/.fluxbox/keys allows you to map keyboard buttons to actions. Whether it's launcing applications, mounting drives, etc. That's up to you.

Here are some addtions to your ~/.fluxbox/keys config file that will make working with usb drives, opening applications, showing the desktop, getting the root menu without a mouse, restarting a moused after it dying after a sleep etc. that can be handy. Edit as you see fit. Use your own paths, interfaces, and devices.

Some users also are on older machines and don't want to run heavy DE's. Fluxbox is good for PII and PIII machines even. This will make Flux mount and open easily.

Some of these are FreeBSD specific. Use Linux sytax, device nodes, and paths if you use Linux. Xterm is in all ditros and BSD's.

# my additions
# Open rox
Mod4 r :Exec rox

# Open rox as Root
Control Mod4 r :Exec xterm +sb -T "Rox as Root" -g 40x10 -bg red -fg white -e sudo rox -n

# Open thunar
Mod4 e :Exec thunar

# Open thuar as Root
Control Mod4 e :Exec xterm +sb -T "Thunar as Root" -g 40x10 -bg red -fg white -e sudo thunar

# Open gedit -- use your own favorite editor
Mod4 g :Exec gedit

# Open gedit as Root
Control Mod4 g :Exec xterm +sb -T "Gedit as Root" -g 40x10 -bg red -fg white -e sudo gedit

# Open xterm  -- rxvt -- mrxvt -- aterm
Mod4 x :Exec xterm

# Put machine to sleep -- acpi has to working on your box
Mod4 s :Exec xterm +sb -T Sleep -g 40x10 -bg yellow -fg black -e sudo acpiconf -s3

# Shutdown -- see -- use BSD or Linux syntax
Mod4 o :Exec xterm +sb -T Shutdown -g 40x10 -bg red1 -fg white -e sudo /path/to/ "shutdown -p now"

# Mount USB drive FAT -- Use Linux device nodes for Linux --mount -t vfat
Mod4 m :Exec xterm +sb -T "USB drive mount" -g 40x10 -bg blue -fg white -e sudo mount -t msdosfs /dev/da0s1 /home/username/usb

# Mount USB drive NTFS --requires ntfs-3g
Mod4 n :Exec xterm +sb -T "USB drive mount" -g 40x10 -bg blue -fg white -e sudo ntfs-3g /dev/da0s1 /home/username/usb

# Unmount USB drive -- unmount where you mounted it to
Mod4 u :Exec xterm +sb -T "USB drive UnMount" -g 40x10 -bg blue -fg white -e sudo umount /home/username/usb

# Open applications quickly
Mod4 t :Exec thunderbird
Mod4 f :Exec firefox3

# Minimizes all windows to panel -- do it again and they come back
Mod4 d :ShowDesktop

# Stop the network interface fast
Mod4 i :Exec xterm +sb -T "Network Down" -g 40x10 -bg blue -fg white -e sudo ifconfig dc0 down

# Bring it back up
Control Mod4 i :Exec xterm +sb -T "Network Up" -g 40x10 -bg blue -fg white -e sudo ifconfig dc0 up 

# Restart the mouse demon --FreeBSD demon
Mod4 z :Exec xterm +sb -T "Restart Mouse" -g 40x10 -bg yellow -fg black -e sudo /etc/rc.d moused restart

# Opens the root menu -- navigate with arrow keys
Control Escape :RootMenu -- don't forget to make it executable.


I hope that this was of some use to someone.

Last edited by teckk; 05-13-2011 at 03:43 PM. Reason: Fixing mistakes and html tags
Old 05-13-2011, 06:32 PM   #2
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 39
Nice keybindings! The only thing that I'd need to adjust (in my opinion) is the keys for mounting drives and managing power states (shutdown, suspend, etc). I don't really use Fluxbox anymore, but the same keybindings could potentially be applied to nearly any other window manager that supports defining custom keybindings. I also agree that running a full DE could be problematic.

One my HP Mini, I use Xfce and Echinus (tiling WM, partially EWMH compliant), but this is only because I am in college and don't really have that much time to mess around with scripting my environment using dzen, conky, and whatever I can think of for a system tray.
Old 05-13-2011, 09:54 PM   #3
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 13,678
Blog Entries: 22

Rep: Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597Reputation: 3597
One of the features I've come to like most about Fluxbox is the keybindings.

I learned how to do them from a podcast by Klaatu. I think it was episode 5x03 at this link. It's a nice audio tutorial.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tutorial: An Easy Tutorial on IP Tables and Port Knocking LXer Syndicated Linux News 0 02-04-2008 04:20 PM
skype icons flubox toketin Linux - Desktop 1 12-17-2007 04:18 PM
flubox question bingbang Linux - General 4 12-20-2004 02:59 AM
anti alias with flubox and Fedora core 2 simao Fedora 0 10-25-2004 11:13 AM
flubox question Sherlok Slackware 23 10-17-2004 12:35 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration