Window managers -3- Fluxbox (ENG)

This article has been originally published in Italian (here). Feedbacks on content and translation are appreciated. Contributions are welcome. The original article must be considered the reference in case of updates.

Fluxbox is the source of my interest for window managers: after a couple of years “familiarizing” with Linux on (K)Ubuntu, I began fiddling with other graphical environments not used in official derivatives, starting from Fluxbox. Among many other seemingly abandoned projects, my attention was probably caught by a quite recent release date (branch 1.3.*).

Fluxbox itself (shortly: FB – not to be confused with that other site where you give away your private life to completely unknown “friends”) has remained idle for about three years (2008 – 2011) before starting up again and throwing out three releases in about two months. While I am writing the most recent version (1.3.5 – 13/Feb/2013) is not yet in the Ubuntu Raring repos. You can find it in backports from Debian stabile (wheezy) and testing (jessie) / unstable (sid). Reading the release notes, anyway, after 1.3.3 there were mainly bugfixes.

As for Openbox (seen in my previous “episode” on window managers) Fluxbox comes from a fork of Blackbox.


Installation

fluxbox_installPackages fluxbox and xorg are all we need for the system: a few MB and we are ready to go.

The WM metapackage includes some more tools like feh (image viewer and background image setting), fbsetbg (background image setting) and fbsetroot (background colour setting).

There are a few more tools, as it usually happens when installing such minimal WMs.


Desktop

fluxbox_desktop

Fluxbox desktop – Click to see picture full size (1024 x 768)

It’s a quite unhearty welcome what we get from FB: all we can see is the panel on lower edge, holding (from leftmost side) the desktop selector, the clock, the window selector and the tasklist. Don’t worry, everything can be modified, starting from content and size of the one and only “life sign” on desktop.

The program menu pops out under mouse pointer upon right click and contains a configuration sub-menu that lets us customize many features and visual options.

The most relevant option is, in my opinion, the window tabbing: several windows can be grouped into a single one to tidy up the desktop and save some mouse travel, too. Tabs can be integrated into the title bar (in picture above a terminal is grouped with the calculator) or stuck to windows edges. Until now, only KDE and Compiz (via plugin) have such a feature.

One more included application is the quick launcher fbrun (middle of picture) invoked by keyboard shortcut “Alt + F2“.

Here is an overview right after installation:

  • Used RAM [free -m]: 47 MB (including terminal ~ 4 MB)
  • Total disk space [df -h]: 1.1 GB
  • Version of “fluxbox” package [dpkg-query -W -f='${Version}\n' fluxbox]: 1.3.2-4
  • Used kernel [uname -a]: 3.5.0.25-generic

Configuration

While Openbox relies on 4 configuration files, FB has 8, placed in ~/.fluxbox, each one focused on a specific subset of option. This makes files easier to handle, compared to Openbox’ rc.xml that holds the majority of settings.

sticky_notes_128Note: beware some GUI configuration tools, recalled in the wiki pages but completely obsolete (fluxspace, fluxconf, fluxmenu). System files must be edited manually: live with it! The large collection of HOW-TOs in the wiki will surely help.

[apps]

It defines windows behaviour for specific applications: position, size, decorations, tabbing and layer. Rules are applied based on window properties (name, title, class, role) as detected by xprop.

In the default file there are example settings for fbrun, that appears centered and above all other windows. Some of the available options are window tabbing of multiple instances of the same program, toggling decorations, desktop to place windows on, inclusion in task list, maximum number of running instances that will comply to the “rules” and lots more.

Details and several examples are in fluxbox-apps help page and in apps file wiki page, where file syntax is explained:

[app] (app-name) {count - optional}
          [Property1]  {value1}
          [Property2]  {value2}
          ...
[end]

Some settings can be applied to open windows (and added to file) through the window menu item “Remember…” (more details in a while…).

[init]

It holds general parameters and paths to other configuration files (the ones stored in ~/.fluxbox). This file will probably be the least modified one of the bunch: most of options found here are accessed through the configuration submenu, as shown in previous picture.

Contents of init file are well documented in its wiki page, useful to cope with the few parameters not included in configuration menu (for example position of buttons on title bar).

If you feel like doing something stupidly nerd, run this command in a terminal while you change the toolbar transparency from the menu:

watch -t -n 1 'cat ~/.fluxbox/init | grep toolbar.alpha'

Well, just to show that I am really splitting hairs here…

[keys]

FB is keyboard-oriented like its “brother” Openbox, following its target to deliver a light and “productive” environment.

The keys file already has many handy defaults (the usual ALT + F4) well known to those who are used to keyboard shortcuts. The choice of shortcuts is very personal, mainly for those launching preferred applications. My suggestion is to set at least one shortcut to access the root menu and one to minimize all windows (“show desktop”). as follows:

# Show root menu
Mod4 M :RootMenu
# Show desktop
Mod4 D :ShowDesktop

The relevant wiki page shows all keywords used in file syntax to define actions (raise, lower, resize, …), events (left or right click, …), position on screen (corners, center, edges, …) and graphical elements (desktop, toolbar, decorations, borders, …).

A very peculiar feature in FB is the creation of keychain (key combinations to trigger an action – Konami code and Scorpion’s fatality are excluded;-))macrocmd (macro commands – execute multiple commands at once) and togglecmd (toggle commands – execute two commands alternately).

Granma Tux’s nice advice: if you don’t fell comfortable with keyboard, using mouse leads to the same results. Yet, even learning very few frequently used shortcuts dramatically speeds up the actions and save a lot of mouse travel, searching for tiny buttons to click on. A couple of shortcuts to launch a browser and a file manager, a couple more to close programs and lower all windows: just concentrate on your most frequent actions to understand how keeping your hands always on the keyboard is easier and more relaxing.

[menu]

Each element making a menu item is enclosed in specific characters, defining its function. An example taken from default menu shows how menus can be split into several submenus, accoridng to our needs. Icons associated to items are supported in any format managed by xpm libraries (.xpm pictures) and imlib2 (.png, .jpg and more), if FB has been compiled with support to these libraries.

[submenu] (Monitoring) {}
[exec] (Alsamixergui) {/usr/bin/alsamixergui} </usr/share/pixmaps/alsamixergui.xpm>
[end]

Among available tags the [include] lets other submenus, held in separate files, be added to the main menu.

Everything else is in the wiki page even though, once the syntax is clear, it’s quite easy to arrange items to our taste: a good start might be to add on top of the list the most used programs, to avoid looking for them inside groups.

[overlay]

Shortly: style options that overcome the corresponding setting of the chosen theme. For example: set a font for window title, disregarding the theme setting. If you are not manically changing the theme every five minutes, you’ll probably neglect this file. Even the wiki page is quite short on this topic.

[slitlist]

fluxbox_slitlistOrder of applications as they appear in the slit (or dock if you prefer), regardless of launching sequence in startup file. Couldnt’ be easier…

In comparison, in Openbox the same result is often achieved launching programs in the intended order, adding a short pause (a sleep command) between each command.

In the shown example the slit holds, left to right, the desktop pager (fbpager) and a network monitor (wmnd): application order for vertical slits is top to bottom.

[startup]

fluxbox_startupApplications (fbpager, volumeicon, nm-applet, …) and commands executed at startup (even fbsetbg): it’s a plain bash script, same as the Openbox startup file.

The wiki page describes some tips to launch applications after window manager has started, in contrast with the normal file usage.

[windowmenu]

Right click on title bar to show the window menu, containing actions that can be performed  on the active window. Items and their order is defined by file contents.

fluxbox_winmenu

Window menu (and tabbing gone wild!)

As for root menu, window menu can be arranged as necessary, even adding program launchers, submenus and labels for each item.

[begin]
  [exec] (terminal) {xterm}
  [maximize] (maximize)
  [iconify] (minimize)
  [submenu] (advanced)
    [layer] (layer)
    [extramenus] (remember)
    [sendto] (send to)
  [end]
  [separator]
  [close] (close)
[end]

As I noted before, item “Remember…” is a quick way to manage properties of open windows stored in apps file, without opening it to edit. Windows are chosen by name and class:

[app] (name=pcmanfm) (class=Pcmanfm)
  [Position]    (UPPERLEFT)     {235 246}
[end]

When window properties are “forgotten”, the relevant section in the file is cleared but not removed (the starting [app]… and final [end] row remain) to be filled in again in case we change our mind! Here is the wiki page and… nothing else!


Interesting features

fluxbox_trasparenza

Decorations transparencies

Trasparencies: Fluxbox provides basic transparency effects, although limited to windows decorations and menus, as shown in the picture on the right.

It might be enough, anyway: choosing a WM like this usually doesn’t care too much about fancy compositing effects seen in KDE or now almost abandoned Compiz. Maybe, such little eye-candy might let someone refrain from using external compositors like Compton (or, worse, its dead predecessor xcompmgr) that may act weird sometimes.

Unfortunately, I am completely addicted to “wobbly windows”, so it is hard for me to give up any graphical effect ;-).

fluxbox_toolbarToolbar: FB toolbar is quite functional. There is even a “system tray” area for programs like volumeicon (shown in picture) or NetworkManager. Other panels such as tint2, pypanel and the like can therefore be avoided (saving a little RAM amount) unless we need multiple toolbars or embedded launchers.


Distributions and Further references

There are few distributions based on Fluxbox, that is usually disregarded in favour of Openbox for low resource systems. Even Distrowatch doesn’t list Fluxbox based distros. Too bad also projects like Fluxbuntu and Mint Fluxbox have been abandoned: I tested the latter, based on Ubuntu 10.04, with great satisfaction.

Perhaps the only noteworthy distribution is the well refined Antix, based on Debian Testing, shipped with a rich collection of WMs. Users who want a ready-to-go, complete and solid Fluxbox distro should definitely choose it. I tested it for a week or so and had a really good impression. In addition to software from the official Debian repositories, developers integrated some components of their own make, available in the distribution repositories.


Conclusions

Fluxbox is a great WM, light, solid and visually appealing (with relatively little effort). In addition, Unlike Openbox, Fluxbox still seems to be under (slow) development.

Fluxbox has some points in favour: memory footprint is almost the same as Openbox although it sports a couple of features more (think about the toolbar, that is very often added) and provides a more user-friendly experience, even without modifying the defaults, for those who prefer more complete and “traditional” interfaces.


Next episode of window manager series? I don’t know, but you’ll have to wait for a while… 🙂

Annunci

Informazioni su Man from Mars

https://extendedreality.wordpress.com/

Un Commento

  1. Pingback: Window managers -1- Introduction | Extended Reality

Comments are disabled. Please comment and share on Twitter, G+, Facebook.

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: