Beginner’s Guide to Fluxbox Configuration

On any list of lightweight Linux window managers, you’ll find Fluxbox. Originally a fork of Blackbox, Flux is well known as a fast, light, highly configurable desktop. Unfortunately, Fluxbox’s emphasis on text files for nearly all configuration often acts as a roadblock for those first trying it out. There is a GUI which provides some of the basic config options, but the bulk of it (menus, colors, keybindings) is found in text files. In this article, we’ll go over most of Fluxbox’s config files and how to tweak them to your needs.

Since we’re focusing on configuration, the remainder of the article will assume you’ve already got Fluxbox installed. All examples and screenshots were done using Fluxbox 1.1.1 on Ubuntu 9.10.

Fluxconf

Fluxconf is the basic configuration utility for Fluxbox. It doesn’t really have much beyond the most basic config options. It likely came with your Fluxbox package and so should already be installed, and can be launched with the command:

fluxconf

Main Configuration

Much of the configuration you’re likely to want to do can be done in the file ~/.fluxbox/init file. Open it with the text editor of your choice, and you can set a wide variety of common options. Some of the more notable entries include:

session.menuFile: (location of the file containing the Fluxbox menu)

session.screen0.toolbar.widthPercent: (1 to 100, width of toolbar across screen))

session.screen0.toolbar.alpha: (0 to 255, transparency of toolbar. 255 is solid)

session.screen0.toolbar.autoHide: (true/false)

session.screen0.toolbar.tools: (items to include in the toolbar, more detail in next section)

session.screen0.menu.alpha: (0 to 255, transparency of menu. 255 is solid)

Wallpaper

Setting a persistent wallpaper in Fluxbox can be surprisingly complex. There are various options to various programs that can all be used to set the wallpaper, either temporarily or permanently. For this reason, instead of going into all the complexities here, I’ll let the Fluxbox developers explain it in their own words. They have a guide here that will explain the hows and whys in detail.

Menu Editing

Fortunately, one of the more tedious aspects of configuration, menu editing, has a nice, functional GUI. The program fluxmenu, also bundled with your average Fluxbox package, does a good job of handling your menu needs.

If, for whatever reason, fluxmenu doesn’t do the job, you can edit the file ~/.fluxbox/menu by hand. Also, make sure you update the ~/fluxbox/init file to point to your custom menu file as described in the Main Configuration section of this guide.

Mouse and Keyboard Bindings

You’ll find keyboard and mouse config in the file ~/.fluxbox/keys. If, like me, you’re used to scrolling the mouse in the opposite direction to move between workspaces, you’ll find that under OnDesktop Mouse4 and OnDesktop Mouse5 near the top of the config file.

Fluxbox names some of the keys in a way that might not be obvious at first. If you find yourself confused by Mod1 and Mod4, here are the keys to which they map:

Mod1 = Alt

Mod4 = Windows (aka Super) key

Transparency

You may have set some of the transparency options in the init file in a previous section. You may also have noticed that those transparencies may not have taken effect. Fluxbox, by default, does not have full compositing capabilities on its own, but you can get it through xcompmgr. They’ve created a guide located here with all the steps necessary to get xcompmgr and Fluxbox to play happily together. I’ve had mixed results getting this to work with various hardware and software combinations, so your mileage may vary.

This seems extremely perfunctory. Giving a link instead of explaining how to set a background? Here you go: Open synaptic install Eterm In your favorite text editoropen the file ~/.fluxbox/init Find this line: session.screen0.rootCommand: Then type in this at the end of that line: Esetroot /path/to/your/file.jpg Done. Yes, you can make it more complicated, but it’s just that easy. You can also put the command in your .xinitrc file, but that’s probably not for the Ubuntu crowd. Fluxbox is the best, and I daresay it deserves a better article. It is especially well suited to small screens, which are so popular on netbooks, etc., because you can put the toolbar on top of everything and then maximize a window and not lose any space to panels or whatnot. Ah, I could go on and on. Don’t mean to be crabby, but you really just scratched the surface, and I don’t know if that’s much of a sales job.

Some of the more common options handled by the init file (like toolbar and slit options, among others) can also be changed quickly directly from the menu by choosing (main menu)->Configuration->(various options) (unless of course you’ve modified your menu to not include the items under Configuration). For instance, the toolbar width and transparency can be increased by right clicking and decreased by left clicking their respective menu items.

Fortunately, Fluxbox strong focus on text files for all configuration options makes it a dream to configure. In many cases, after saving your edits in the configuration file changes in behaviour are available immediately in the environment! Fantastic!