Fluxbox: From window manager to desktop environment
fluxbox bits and bobs
Fluxbox is a window manager for unix like operating systems - Linux for example. Fluxbox comes with
quite a number of Linux distributions. For me fluxbox is the window manager that fits best to all my needs.
While I am a native German speaker, You must live with my insufficiancy about the English language
if You decide to read on. Of course, You could decide not to read on or switch to the German language on the
left side of this frameset if You are capable to understand German.
I started with Linux, after I was too much annoyed with the bluescreens of Windows 95.
They did not say anything about the fact that from one second to another nothing worked anymore.
So I switched to Linux - to the »Deutsche Linux Distribution« (DLD - German Linux Distribution).
That was quite adventurous for someone who came along all the way from DOS with WordPerfect to
Windows 3 with WordPerfect and Windows 95 with WordPerfect (yes, I used to be a text worker!) and now
somehow had to configure the device drivers for hard disks, soundcards, LAN and something called
the x-window. Somehow it worked.
Then the first desktop environments appeared. I disliked the Gnome footprint,
but then I left all window managers behind and worked with KDE1 and afterwards with
KDE2 and finally with KDE3. Most times that was satisfactory
for me.
Then KDE4 appeared. And most of what worked for me before no longer worked.
Gnome still had an ugly footprint. So I looked around. But LXDE,
RazorQT, later LXQT, XFCE, Cinnamon,
Mate, Budgie and company did not satisfy me - only some elements
of some of them I liked. So why not a simple window manager again - with some additions?
I decided to give fluxbox a try. It is fast, well documented, extremely flexible
and it does what I put into its configuration files.
Everything I will describe on this page has been done within Devuan. With
Debian all of this will work, too. With other from Debian derived OSes this will most
certainly work, too. It might be even similar with other Linux OSes, as long as they provide an X server. For me
Devuan has the advantage to get to work without systemd - systemd wants to do everything of the system in one place,
and for me that is too much and too complex.
On this page You will find several listings, mostly scripting files.
These listings and all other mentioned files on this site can be downloaded in one package:
sammlung-en.tar.gz
Installation and Start
1. Installation
Fluxbox is in the package sources. Just type apt install fluxbox as root. If You
do this in a minimal system without X, You have to install the x-window-system as well (
apt install xserver-xorg).
Systems that do not provide an X server, for instance Fedora, will not be suitable for
fluxbox.
2. Login Manager
As login manager I have been using xdm (apt install xdm) almost
for decades - with a short love affair with SLiM in between.
xdm might be a little bit ugly out of the box, but we can change that. xdm will here be complemented
with polybar, a simple bar down the screen to provide a menu to shutdown or reboot
the computer, to show a virtual keyboard, and to provide information about the battery level, date and time.
xdm will manage the desktop background, too. xdm can do all this because it is extremely flexible with scripting.
Let's start with the bar. Ich am using polybar (apt install polybar),
a quite simple bar. polybar will be configured through the file /etc/X11/xdm/polybar.ini
with the following content:
With this configuration polybar will need onboard as a virtual keyboard
(apt install onboard). We can drag it to a convenient size at the next login.
For taking a screenshot polybar uses scrot (apt install
scrot). It will save screenshots to the /root/pictures directory. Probably
You will have to create it.
For displaying the battery status polybar will need the script /usr/local/bin/ladestand.sh
. This script itself will need the package acpi (apt install
acpi):
Now to the desktop background picture. The used picture will be provided by feh
(apt install feh). To let this work properly with xdm and within fluxbox, there is the
xdm-hg.sh script.
This is its content:
It is important that this script is editable by any »normal« user, because the included picture file
may be changed through a normal user within a fluxbox session. Because of this I keep this script in a newly
created /usr/local/usrbin directory instead of the usual
/usr/local/bin directory. It is the only script in this directory - and all users must have the right
to edit it there.
To have this script executed during xdm login we have to place it in /etc/X11/xdm/Xsetup.
Here we place the start script of polybar, too - and this is what it looks like:
To stop polybar and the possibly started virtual keyboard onboard after the xdm login You should write
this to the file /etc/X11/xdm/Xstartup. This file contains some other rows as well
- this must be added:
xdm login with polybar
xdm is not very proportionally looking out of the box within a Devuan/Debian environment. To make
it look a little bit better, we have already managed to set up a background picture. We should now change its
proportions and its used logo file as well. For this purpose I recommend the following changes in the file
/etc/X11/xdm/Xresources:
Watch: The file /etc/X11/xdm/Xresources contains in front of any content
45 (!) empty rows. Possibly these are important - keep them there.
It is important, that the logo picture file is in the directory
/usr/local/share/pixmaps/ as xdm.xpm in the .xpm graphics
format. Else xdm will not show a logo at the login.
This is it for xdm. Now we have created some initial premises for running fluxbox as a desktop environment.
xdm login with the virtual keyboard onboard and polybar
3. Start Fluxbox
If xdm does not start fluxbox automatically, You will need the following entry into the file
~/.xsession: exec startfluxbox. If there is no file ~/.xsession
yet, create it.
If You do not start Your x-window-system with the help of a login manager but use the startx
command the same entry must go to the file ~/.xinitrc. No problem occurs if You have both
files with the same entry.
Afterwards fluxbox will start automatically while booting Your computer when You are using Your x-window-system.
The best of fluxbox is its menu. You can access it at any free space on the desktop with the right key of the
mouse. We can adapt it to fit all our needs. But it will not be there out of the box - we will have to create it first.
For a start we should create a menu of all programs insalled on our computer (»root menu«).
There are two more or less simple possibilities to achive this. The first (a little unaccurate) can be done
by the script dt2fbmenu-en.sh (or dt2fbmenu-de.sh, if You like it
in German). You should choose this script only if You dislike the following slightly (really slightly) more complicated
alternative. Read about it and decide then.
You will find the script among the downloads.
It is still a simple act to create a »root menu« with the help of the script fbmenugen.
It is a perl script, but it can only do its work, if the following packages are installed:
apt install libgtk3-perl libdata-dump-perl libfile-desktopentry-perl libmodule-build-perl. After this still
one perl module has to be installed manually. For this purpose we download the whole directory from
https://github.com/trizen/Linux-DesktopFiles as a zip archive
to ~/Linux-DesktopFiles-master. After that we move to this directory in a terminal
(xterm, st, lxterminal ...) cd ~/Linux-DesktopFiles-master and follow these steps as a
»normal« user:
After that we have to perform one final step as root from the same directory to move the perl module
to its place in the system:
This was the most complicated thing on this website. Relief! Now we need two files from
https://github.com/trizen/fbmenugen. We copy the file fbmenugen into the directory
/usr/local/bin and the file schema.pl to
~/.config/fbmenugen. The latter directory must be established first.
A »root menu« in German language will be created with the following line:
An English »root menu« will be created with the same line minus all substitutions through sed
:
The created »root menu« has now been established in our fluxbox directory ~/.fluxbox.
To make use of it we have to create two other menus.
Now we create the »main menu« of fluxbox, that will be the »mother menu» of the »root menu« and after that
the »personal menu«, which will contain all our most used programs in an order we like them.
The »main menu« is named simply menu and resides in the directory
~/.fluxbox - here is my personal example: