This “guide” is meant for people who already have Ubuntu installed. Not for people with a server install.
It’s aimed at people new to Fluxbox and is meant to help them getting started.
Before you think about installing it beware Fluxbox isn’t exactly the most user friendly wm. So if you are having trouble with xfce/gnome/kde this won’t be for you.
On the other hand, if you are bored with those, by all means try Fluxbox.
-----
1. Installation
Open up your favorite cli client and use apt to install it for you.
2. Start FluxboxCode:sudo apt-get install fluxbox
Log out and start Fluxbox (press the “session” button).
3. Usage
You open up the menu by right-clicking the background.
The menu will be made automatically when you installed it, so all your programs should be in there under “applications” and the various sub menu’s.
Have a look around.
You can’t display icons on the desktop. However there are ways around that.
4. Shortcuts
The config file for shortcuts is in /home/username/.fluxbox/keys .
Open it.
You should already see some shortcut, so learn them or modify them to your liking.
Before you start adding new ones, you’ll need to know this:
So a short cut for “alt+f1″ would be “Mod1 F1″.Mod1 == Alt
Mod4 == Windows key
Control == Ctrl
Shift == Shift
Besides those keys, the rest is as you would expect.
I find it easy to assign programs to the function keys.
Because I do so, I hardly ever need to use the right-click menu and it saves me a lot of time.
This is my keys file:
(Exec or ExecCommand is the same)OnDesktop Mouse1 :HideMenus
OnDesktop Mouse2 :WorkspaceMenu
OnDesktop Mouse3 :RootMenu
OnDesktop Mouse4 :NextWorkspace
OnDesktop Mouse5 revWorkspace
Mouse8 :NextWorkspace # top side button mouse -> next workspace
Mouse9 revWorkspace # bottom side button mouse -> prev workspace
Mod1 Tab :NextWindow
Mod1 Shift Tab revWindow
# Launch programs
F12 :ExecCommand xterm # opens a cli client
F11 :ExecCommand firefox # opens the firefox webbrowser client
F10 :ExecCommand thunar # opens the thunar file manager
F9 :ExecCommand mousepad # opens the mousepad text editor
F8 :ExecCommand sonata # opens the sonata music player
Mod1 F2 :Exec fbrun # opens a “run” dialog window, similar to “alt+f2″ in gnome
# Media keys
# System Volume
F2 :Exec amixer sset Master,0 5%- # raise volume by 5%
F3 :Exec amixer sset Master,0 5%+ # lower volume by 5%
F4 :Exec amixer sset Master,0 toggle # mute volume
# MPC (music player command for music player deamon)
F6 :Exec mpc next # plays next song in playlist
F5 :Exec mpc prev # plays previous songs in playlist
F7 :Exec mpc toggle # pauses or play the song
# Visual
F1 :ToggleDecor # removes or adds window decoration
# Screen shot:
Control F12 :Exec scrot -e ‘mv $f ~/Desktop’ # takes a screen shot of the entire screen
If you wish to use nautilus, use the "nautilus --no-desktop" command.
5. Visual improvement
5.1 Styles
There are a few decent Fluxbox styles (right-click -> styles to choose them) but there are much better ones online.
A simple google search will tell you a lot, but I found http://customize.org/fluxbox to be one of the better ones.
After you downloaded the .tar.gz extract it to /home/username/.fluxbox/styles .
After that the style will be available through the menu.
5.2 Gtk themes
Most if not all of the apps will use the default ugly grey nautilus colour (the one I reffer to as the win95 theme) and that isn’t real nice to look at.
There is a nice little program available that will let you set gtk themes for your apps.
Open it using a terminal and you’ll be able to pick the gtk themes you installed in /home/username/.themes .Code:sudo apt-get install gtk-chtheme
The gtk-chtheme app will even preview the theme for you.
5.3 Wallpaper
You must have noticed that either you didn’t have a wallpaper or couldn’t change the one your theme set for you.
Use this command to set the wallpaper.
5.4 ConkyCode:fbsetbg -f /path/to/image.png
If conky fits anywhere, it’s on a fluxbox box.
Installations notes.
6. Editing the startup file
You can add programs/commands in this line to execute at startup.
The text we need is located in /home/user/.fluxbox/startup
It’s really easy to modify.
The default file looks something like this:
Let’s say you want your wallpaper to be there when you start up your pc instead of having to type the command.# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# You can set your favourite wallpaper here if you don't want
# to do it from your style.
#
# fbsetbg -f ~/pictures/wallpaper.png
#
# This sets a black background
/usr/local/bin/fbsetroot -solid black
# This shows the fluxbox-splash-screen
# fbsetbg -C /usr/local/share/fluxbox/splash.jpg
# Other examples. Check man xset for details.
#
# Turn off beeps:
# xset -b
#
# Increase the keyboard repeat-rate:
# xset r rate 195 35
#
# Your own fonts-dir:
# xset +fp $HOME/.font
#
# Your favourite mouse cursor:
# xsetroot -cursor_name right_ptr
#
# Change your keymap:
# xmodmap ~/.Xmodmap
# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN & AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
# And last but not least we start fluxbox.
# Because it is the last app you have to run it with exec before it.
exec /usr/local/bin/fluxbox
# or if you want to keep a log:
dsf
# exec /usr/local/bin/fluxbox -log ~/.fluxbox/log
Look for the
line and remove the “#” in front of it. Then adjust the path to point to the actual wallpaper.# fbsetbg -f ~/pictures/wallpaper.png
Note that in Ubuntu ~/pictures/wallpaper.png won’t work. Everything in linux in case sensitive so it has to be ~/Pictures/wallpaper.png
Or lets say you want to add conky.
Look for this block of text
And add “conky &” to the bottom without an “#”.# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN & AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
Mine looks like this:
7. Editing the menu# fluxbox startup-script:
#
# Lines starting with a ‘#’ are ignored.
# You can set your favourite wallpaper here if you don’t want
# to do it from your style.
#
fbsetbg -f /home/rw/Pictures/wall.jpg
#
# This sets a black background
#/usr/bin/fbsetroot -solid black
# This shows the fluxbox-splash-screen
fbsetbg -C /usr/share/fluxbox/splash.jpg
# Other examples. Check man xset for details.
#
# Turn off beeps:
# xset -b
#
# Increase the keyboard repeat-rate:
# xset r rate 195 35
#
# Your own fonts-dir:
# xset +fp “/home/rw/.fonts”
#
# Your favourite mouse cursor:
# xsetroot -cursor_name right_ptr
#
# Change your keymap:
# xmodmap “/home/rw/.Xmodmap”
# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ”&” AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
conky &
mpd &
mediatomb &
# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ”exec” before it.
exec /usr/bin/fluxbox
# or if you want to keep a log:
# exec /usr/bin/fluxbox -log “/home/rw/.fluxbox/log”
Because the menu is automatically generated by ubuntu, you’ll see that /home/username/.fluxbox/menu points to /etc/X11/fluxbox/fluxbox-menu .
So let’s copy the content of that last file to /home/username/.fluxbox/menu .
The file is easy once you know what to do.
It basically goes like this:
You always start with[begin] (Fluxbox)
[exec] (xterm) {xterm}
[separator]
[submenu] (Tools)
[exec] (Galculator) {galculator}
[exec] (Gnome Commander) {gnome-commander}
[exec] (File Roller) {file-roller}
[exec] (K3B) {k3b}
[exec] (Gramps) {gramps}
[end]
[submenu] (fluxbox menu)
[config] (Configure)
[submenu] (Styles) {Choose a Style…}
[stylesdir] (/usr/X11R6/share/fluxbox/styles)
[end]
[workspaces] (Workspace List)
[submenu] (Tools)
[exec] (Window name) {xprop WM_CLASS|cut -d \” -f 2|xmessage -file - -center}
[end]
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart Fluxbox)
[exec] (About) {fluxbox -v 2>/dev/null | head -n1 | xmessage -file - -center}
[exit] (Exit Fluxbox)
[separator]
[exec] (Reboot) {shutdown -r now}
[exec] (Shutdown) {shutdown -p now}
[end]
[end]
Everything else goes in there. Kind of like the <html> </html> tags for those familiar with html.[begin] (Fluxbox)
[end]
If you want to list a program in the main menu, you use this code:
Where (xterm) is the word that will appear in the menu and {xterm} the command to launch the app.[exec] (xterm) {xterm}
If you want a little separator, use this
Most likely you’ll want sub-menu’s.[separator]
You use
So between those two, you can use the [exec] to list applications or open another submenu.[submenu] (name you come up with)
[end]
The second part of text in the example, is the fluxbox menu.
I didn’t touch it, but you could throw some things around in there if you like.
Mine looks like this:
It’s nice and simple.[begin] (Fluxbox)
[exec] (Xterm) {xterm}
[separator]
[submenu] (Tools)
[exec] (File Roller) {file-roller}
[exec] (Mirage Image Viewer) {mirage}
[exec] (Synaptic) {gksu synaptic}
[end]
[submenu] (Internet)
[exec] (Firefox) {firefox}
[exec] (Emesene) {emesene}
[exec] (Transmission) {transmission}
[exec] (Xchat) {xchat}
[exec] (Frostwire) {frostwire}
[exec] (Nicotine Plus) {nicotine}
[end]
[submenu] (Editors)
[exec] (Mousepad) {mousepad}
[exec] (Abiword) {abiword}
[exec] (Gnumeric) {gnumeric}
[end]
[submenu] (Multimedia)
[exec] (VLC Media Player) {vlc}
[exec] (Sonata) {sonata}
[exec] (Brasero) {brasero}
[exec] (Audio Tag Tool) {tagtool}
[exec] (Avidemux) {avidemux}
[end]
[submenu] (Graphics)
[exec] (Gimp) {gimp}
[exec] (Xpdf) {xpdf}
[end]
[separator]
[submenu] (Fluxbox Menu)
[config] (Configure)
[submenu] (Styles) {Choose a Style…}
[stylesdir] (/usr/X11R6/share/fluxbox/styles)
[end]
[workspaces] (Workspace List)
[submenu] (Tools)
[exec] (Window name) {xprop WM_CLASS|cut -d \” -f 2|xmessage -file - -center}
[end]
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart Fluxbox)
[exec] (About) {fluxbox -v 2>/dev/null | head -n1 | xmessage -file - -center}
[exit] (Exit Fluxbox)
[separator]
[exec] (Reboot) {shutdown -r now}
[exec] (Shutdown) {shutdown -p now}
[end]
[end]
(watch first screenshot to view menu)
8. Set your own icons
Open up /home/username/.gtkrc-2.0 and add this line to it
ALLBLACK is the name of the folder containing my icon set in /home/username/.icons .gtk-icon-theme-name = “ALLBLACK”
So just put the name of the theme you extracted there instead of ALLBLACK.
Note you can also set your gtk theme like that instead of using the app.
Use
for that, where NovaBlue would be the name of the folder containing your gtk theme in /home/username/.themes .gtk-theme-name = “NovaBlue”
9. Select your keyboard layout
You will have to edit your xorg.conf file. Use this command to do so:
(presuming you use mousepad, if not change to the editor of your liking)Code:sudo mousepad /etc/X11/xorg.conf
In the first block of text you’ll see:
You would change the last one to the keyboard layout you would like.Section “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “be”
Mine is now “be” (azerty), so change that to yours.
You can put more that one.
You could set
You could then switch between layouts by using the commandOption “XkbLayout” “be,us”
Code:
orCode:setxkbmap be
Code:
The first command would set your keyboard layout to azerty (be), the second one to qwerty (us).Code:setxkbmap us
Now, you could add those commands to your menu by editing your menu file.
Code:
You would use the following to add those:Code:sudo mousepad /home/username/.fluxbox/menu
But it would be best to add a submenu for changing keyboard layouts.[exec] (azerty) {setxkbmap be}
[exec] (qwerty) {setxkbmap us}
Then when you right-click your desktop, a mentioning of “Layouts” will be there, with the options to load the “azerty” or “qwerty” keyboard layouts.[submenu] (Layouts)
[exec] (azerty) {setxkbmap be}
[exec] (qwerty) {setxkbmap en}
[end]
–
Hope this helped.
————————–
---------
Guide taken from my Ubuntu blog http://linuxowns.wordpress.com
Bookmarks