Chapter 2. Getting started

Table of Contents
Installing Fluxbox
Commandline options

Installing Fluxbox

This section was contributed by Jason Gillman Jr. aka "Ircaddict".

Many distributions provide binary packages of Fluxbox (or, in the case of Gentoo and FreeBSD, ports/ebuilds) which make installing Fluxbox pretty painless. There are reasons to compile from source, however. For example, the most recent version of Fluxbox might not be available as a distribution package. Additionally, it might be desirable to compile Fluxbox with a certain set of compiler flags. If you would like to use your distributions packages, consult the distribution docs. For some distributions, both source and binary packages are provided on the Fluxbox site.

The purpose of this document is to help people who are fairly new to the X11 windowing system (or Linux in general) compile and install the Fluxbox window manager.

Acquiring the sources

The first thing that you will want to do is go to the download page and download the source tarball (the extension will be .tar.gz).

From time to time, special developer releases are made. Those allow a preview of things to come, new features and the like. Due to their developer-release quality, they sometimes lack functionality or stability. Try them if you want bleeding edge Fluxbox - with all the benefits and dangers. Directions on how to fetch the can be found in the News section of the official Fluxbox site.

Extract and compile

Okay, now that you have the source tarball, you have to extract the goods. This can be done by running the following command, replacing the filename with the one of the file you downloaded:

    $ tar xzvf fluxbox-0.1.12.tar.gz

It will then throw out a list of the files that are being un-archived. After you do this, change into the directory that was created (it will be something like fluxbox-0.1.12/, but it depends on the version). The next step is to configure and make Fluxbox. During the configure run, you can enable or disable some features in Fluxbox. For most people, the defaults should be okay. If you want Fluxbox' slit to work with KDE panel icons, you would add the option --enable-kde. To find out what other options are provided by the configure script, use the option --help. If you don't want to enable KDE, this should suffice:

    $ ./configure
    $ make

After Fluxbox is compiled, become root and run:

    # make install

Congratulations, you now have compiled and installed Fluxbox.

Running Fluxbox

It's all nice and good if you have it installed, but what use is it if you can't run it?

There are two generally different ways to start X11 (and thus Fluxbox). The traditional way is using the command startx. The other way is using a graphical login manager (also called "display manager"). The most common display manager is xdm which is part of the XFree86 distribution. The display manager provided by Gnome is called gdm, the one from KDE is kdm.

If X11 is started the former way (via startx), the file that is important is called .xinitrc and resides in your home directory. In the case of starting via a display manager, the file is .xsession which resides at the same location.

The next step is to find the executable for Fluxbox. For most people, this is /usr/local/bin/fluxbox. Now you need to edit (or create) the file I just mentioned. Just put the following line at the bottom of the file:

   exec /usr/local/bin/fluxbox

Change the /usr/local/bin/fluxbox to where ever your Fluxbox executable is, the above is the default location when compiling from source. Once that is done, save it and close whatever editor you used to edit it. Now you need to run the following command if you use startx:

   $ chmod 700 .xinitrc

In the case of .xsession that is not needed. In both cases, you should create the directory in which Fluxbox stores its configuration:

   $ mkdir .fluxbox

If you don't create it, when you exit Fluxbox and restart, you will lose all your setting.

Maybe copy init and menu files from the /usr/local/share/fluxbox directory to the .fluxbox/ directory in your home directory.

Adding to KDE Displaymanager

To get Flux on the KDM menu store

[Desktop Entry]

into the file /usr/share/apps/kdm/sessions/09fluxbox.desktop.

The file location is for Mandirva and might be different on other systems mabye look for /etc/kdm on others.

The numberprefix 09 might have to do with the position in the session selection.