Fluxbox Beginners Guide Part 2
Let’s say you want your wallpaper to be there when you start up your pc instead of having to type the command.
Look for the
| # fbsetbg -f ~/pictures/wallpaper.png |
line and remove the “#” in front of it. Then adjust the path to point to the actual wallpaper.
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
| # 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 add “conky &” to the bottom without an “#”.
Mine looks like this:
| # fluxbox startup-script: # # Lines starting with a ‘#’ are ignored. # You can set your favourite wallpaper here if you don’t want #/usr/bin/fbsetroot -solid black # This shows the fluxbox-splash-screen # Other examples. Check man xset for details. # Applications you want to run with fluxbox. # And last but not least we start fluxbox. exec /usr/bin/fluxbox |
7. Editing the menu
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:
| [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) |
You always start with
| [begin] (Fluxbox)
[end] |
Everything else goes in there. Kind of like the <html> </html> tags for those familiar with html.
If you want to list a program in the main menu, you use this code:
| [exec] (xterm) {xterm} |
Where (xterm) is the word that will appear in the menu and {xterm} the command to launch the app.
If you want a little separator, use this
| [separator] |
Most likely you’ll want sub-menu’s.
You use
| [submenu] (name you come up with)
[end] |
So between those two, you can use the [exec] to list applications or open another submenu.
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:
| [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] |
It’s nice and simple.
(watch first screenshot to view menu)
8. Set your own icons
Open up /home/username/.gtkrc-2.0 and add this line to it
| gtk-icon-theme-name = “ALLBLACK” |
ALLBLACK is the name of the folder containing my icon set in /home/username/.icons .
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
| gtk-theme-name = “NovaBlue” |
for that, where NovaBlue would be the name of the folder containing your gtk theme in /home/username/.themes .
9. Select your keyboard layout
You will have to edit your xorg.conf file. Use this command to do so:
sudo mousepad /etc/X11/xorg.conf
(presuming you use mousepad, if not change to the editor of your liking)
In the first block of text you’ll see:
| Section “InputDevice” Identifier “Generic Keyboard” Driver “kbd” Option “XkbRules” “xorg” Option “XkbModel” “pc105″ Option “XkbLayout” “be” |
You would change the last one to the keyboard layout you would like.
Mine is now “be” (azerty), so change that to yours.
You can put more that one.
You could set
| Option “XkbLayout” “be,us” |
You could then switch between layouts by using the command
Code:
setxkbmap be
or
Code:
setxkbmap us
The first command would set your keyboard layout to azerty (be), the second one to qwerty (us).
Now, you could add those commands to your menu by editing your menu file.
Code:
sudo mousepad /home/username/.fluxbox/menu
You would use the following to add those:
| [exec] (azerty) {setxkbmap be} [exec] (qwerty) {setxkbmap us} |
But it would be best to add a submenu for changing keyboard layouts.
| [submenu] (Layouts) [exec] (azerty) {setxkbmap be} [exec] (qwerty) {setxkbmap en} [end] |
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.
–
Hope this helped.
————————–
---------
Guide taken from my Ubuntu blog http://linuxowns.wordpress.com
Source: http://ubuntuforums.org/showthread.php?t=878781



