LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-13-2011, 03:39 PM   #1
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
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.

Code:
# 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 xrun.sh -- use BSD or Linux syntax
Mod4 o :Exec xterm +sb -T Shutdown -g 40x10 -bg red1 -fg white -e sudo /path/to/xrun.sh "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
xrun.sh -- don't forget to make it executable.

Code:
#!/bin/sh

$@
/bin/sh
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
PhoenixAndThor
Member
 
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
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:13 AM.

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