Install FluxBox
From Knowledge76
Contents |
HowTo: fluxbox how-to (compiling from source the latest version) plus tips & tricks
Install
I'm a big fan of fluxbox. It is highly and easily customizable. It's wicked fast and it's very pretty. FLuxbox is in the ubuntu repositories but they are two versions behind and are missing a lot of handy features like fluxbox-generate_menu. Also, the package in the repositories loads really slow wich should not be the case for a window manager that's supposed to be really fast.
In this how-to I'm going to sum up all the info I have collected and add a few of my own customization tricks. Most of what's here I found on other threads, but this info should be in one well organized place so here goes.
If you want to install the latest version, read the Installing from Git repository guide below.
1: Download the source tar ball of the latest development version. The stable version is too old and not supported anymore and the development version is the one the devs recommend. They actually state "The latest stable release is v0.1.14. Development version of Fluxbox can be found here. Please note that 0.1.14 is actually fairly dated (and unmaintained) now, and the development series is quite stable. It is mainly waiting on translation and documentation work before it becomes stable. "
Get the source tarball here
2: Get the tools to compile from source
sudo apt-get install build-essential checkinstall libxft1 libxft-dev
3: Open your favorite terminal and untar the file you downloaded. example :
tar xvzf fluxbox-0.9.14.tar.gz
4: cd into the directory created.
5: Type
./configure --enable-kde --enable-gnome --disable-xmb
the disable xmb fixes the slow start up time in ubuntu.
6: Type
make
7: Type
sudo checkinstall
This builds the package and puts it in /usr/local/bin
8: There are two ways to be able start fluxbox
a) A .xsession file in your home directory. you may have it or not. if you dont create it.in the terminal type nano ~/.xsession and put this in there
/usr/local/bin/fluxbox
b) Use you're start up file. Type nano ~/.fluxbox/startup (if it does not exist, create it) and put this in there
/usr/local/bin/fluxbox -log ~/.fluxbox/log
or if you used the Install from Git guide put this
/usr/bin/fluxbox -log ~/.fluxbox/log
I encourage to use option b, since this is the one I use and I know it works well.
Change the permissions for the one you chose.
chmod +x ~/.fluxbox/startup/startup
9: Now to enter kde,gnome or any other window manager I use GDM. It comes standard in Ubuntu. I know how to make an entry for fluxbox in GDM, I do not know how to do it in the others. To make an entry for fluxbox in GDM in a terminal type
cd /usr/share/xsessions
now type ls. There should be various files in there with names like gnome.desktop . Type nano fluxbox.desktop. put this in there :
[Desktop Entry] Encoding=UTF-8 Name=Fluxbox Comment=This is fluxbox Exec=/home/(username)/.fluxbox/startup</pre>
That is if in step 8 you chose option b. if you chose option a, on the Exec line put Exec=/home/(username)/.xsession .
10: Logout. Now when you go to GDM there will be a fluxbox entry in the session menu. Enter fluxbox. If it works, you are done with the installation. To access the menu just right click anywhere in the desktop. I know that what you have now is pretty bare. But the rest is just customization. Read Customization Tips and Tricks below.
Installing from Git repository, in debian based distros
1: Get dependencies and required tools
Open a terminal and run this:
sudo apt-get install build-essential xlibs-dev libxft1 libxft-dev git-core libimlib2 libimlib2-dev
2: Run this command where you want the source to be downloaded:
git clone git://git.fluxbox.org/fluxbox.git && cd fluxbox && ./autogen.sh
3: Now its time to compile. First run
./configure --help
What you got is a list of options. Use all that you need. If you use gnome, use --enable-gnome and --disable-kde. If you use kde, use --enable-kde and --disable-gnome. If you use applications from both, use both options. Then run configure with the desired options. In this case, we are compiling with gnome support:
./configure CFLAGS="-O3" CXXFLAGS="-O3" --enable gnome --disable-kde --prefix=/usr --enable-nls --enable-imlib2 --disable-xmb
The CFLAGS and CXXFLAGS are used to tell gcc and g++ to optimize for performance.
The --enable gnome and --disable-kde options are used because we want gnome support.
The --prefix=/usr option is used to tell make to install the binaries in /usr/bin.
--enable-nls is used to include native language support and --enable-imlib2 is used to include png images support.
--disable-xmb fixes the slow start up time in ubuntu.
4: Time to compile
Run make:
make
Then:
sudo make install
5: Follow the standard install guide, from point 8.
--Hexbase 17:16, 3 January 2010 (EST)
Customization Tips and Tricks
Fluxbox is all about minimalism. I like to use light apps to keep everything really fast so thats the type of tricks I know so here goes.
1: To get background image, open a terminal and type
sudo apt-get install feh
then locate the image you want to use as wallpaper. in my case my backgrounds are in a directory called wallpapers in my home directory so to set a background I type at the command line
fbsetbg wallpapers/wallpaperofmychoice.png
To not have to type all of that every time you want to set a new backround edit your start up file
nano ~/.fluxbox/startup
add the following line to that file :
fbsetbg -l
this command will always load the last image you set as backround so you only have to type fbsetbg image.png once.
2: Apps you want to have upon start up are set at the ~/.fluxbox/startup file.
To keep applications running use a "&" at the end of the line. For example:
xscreensaver -nosplash &
Put your applications before the exec command. If not, applications wont run.
Here's my startup file as an example:
# fluxbox startup-script: # # Lines starting with a '#' are ignored. # Applications you want to run with fluxbox. # MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN & AT THE END. # Put apps before the exec command. fbsetbg -l gkrellm & gnome-volume-manager & xscreensaver -nosplash & exec /usr/local/bin/fluxbox -log ~/.fluxbox/log
First line sets my wallpaper.
Second starts grellm (a graphical system monitor).
The third line you will want to have (gnome-volume-manager &) this will automount dvd's, USB hdd's and loads of other stuff.
Last line launchs fluxbox ( Replace with this line if you used the git guide:
exec fluxbox -log ~/.fluxbox/log ).
I actually have a lot more stuff in my startup file but I'm keeping it simple to get you started.
I know many more tips and tricks and other users probably know more than I do. I would like this thread to have all the nice things you can do in fluxbox so plz if you know any customization tricks, post them.
This was my first how-to so point out any mistakes. I will correct them. Fluxbox is a great window manager. I think the main reason its not so famous amongst the ubuntu community is because the package in the repositories is just worng. my Fully customized desktop.