Set your computer free

Menu

Fluxbox In-Depth: Mad Customization And Other Tips

Introduction

When I was first preparing to switch to Linux many years ago, I went into research mode and looked around the net a bit. At the time, part of the allure of Linux were the crazycooldesktopspeoplehad. After I switched I tried Gnome, then KDE, and was depressed at how uncool and *dozelike they were. Eventually, I discovered that all those amazing desktops were the result of Fluxbox (or the other *box forks). I switched immediately.

To my surprise, I found that not only was I able to get a really cool appearance, but Fluxbox made all the things I wanted out of a window manager, and some I didn’t know I wanted, simple. It turned out that I was not the only user to have noticed those operating system limitations and failings I’d been grumbling about for years, particularly with *doze. The Fluxbox crew apparently knew my pain and had gone about addressing all of those complaints.

For example, one particular thing I had tried way back in the dark years was a DOS script to launch a bunch of applications at bootup with attempts to get them to their proper window sizes and such. It worked in a very limited fashion. Controlling *dows startup folders and services by their methods is a joke. It’s just poorly implemented by Microsoft, and while certainly better in Linux, still not exactly perfect. Fluxbox handles this as elegantly as one could wish.

You see, as a guy with a programmer background, repetition of effort utterly disgusts me. So when I restart my computer or even just a program, I absolutely detest having to resize and relocate windows to the way I had them before the restart. Just having to restart apps after reboot is too much wasted effort and time. With Fluxbox I found a solution to this issue completely built in, along with many, many more time-saving ideas. In a word, it’s brilliant.

Many people’s first reaction to seeing a Fluxbox desktop is to be taken aback by its barren aspect. They notice the complete lack of pretty little icons and don’t quite understand the spartan nature of it. Well, it’s like this: If everything you use on a regular basis already starts for you, and the rest either has keyboard shortcuts or can be found in a moment in your customized menu… what the hell do you need pretty little icons covering up your badass desktop image for? That’s not to say you can’t have pretty little icons if you want, but Fluxbox defaults to a simplistic, stay-out-of-the-way style.

In the following article, I will describe my particular layout of the Fluxbox desktop: workspaces, monitors, and applications. While technically not part of Fluxbox itself, part of what makes those Fluxbox desktops so cool are the terminals, so I’ll give a fairly in-depth explanation of my aterm setup. Most Fluxbox descriptions, the Fluxbox website included, describe things entirely by files, so I think I’ll try to use a chronological approach wherever possible. To this end, I will next discuss the X/Fluxbox startup script sequence, and show you what happens as I start Fluxbox. After that, I will talk about the heart of Fluxbox: the configuration files. Finally, I’ll wrap up with some other features and things worthy of notice. I hope you enjoy and benefit from my experience.

Fluxbox, like many other window managers these days, allows for having multiple desktops. In Fluxbox these are called “Workspaces.” I usually use five workspaces, each devoted to separate purposes, and thus, each have specific applications. Let me describe them for you, but first let me note that all my workspaces are two monitors wide despite some images being cropped to show only the primary left-hand monitor.

For now, let’s skip over the first workspace. The second I use for web browsing with Firefox or Seamonkey, as well as Open Office documents. Between multiple FF windows and several documents, this workspace can get pretty crowded at times.

On my third workspace I keep two Bluefish (a simple text editor) projects of eight or so text files each. One of these projects is for Linux notes, commands, simple howtos, etc. The other is for things like to-do lists, shopping lists, books/movies/tunes to get, etc. I’ve found I’m far more likely to take note of things if these files are already open for editing, so devoting a workspace to having these simple files permanently open works really well for me.

The fourth Fluxbox workspace I keep my file manager on; at the moment I’m using XFE. I also do my torrenting from here, and basically anything media related. And the fifth is my workspace for actual work. I usually have a couple terminals open, maybe some editors, I use the Gimp here, etc.

Now back to the first. On it I have seven terminals sized to fit together nicely and display various bits of useful information. I tail /var/log/messages, debug, syslog, secure, and my current X session’s log (I redirect the output of the startx command to this log file). I use one terminal for displaying disk usage info, and I have one that I use every once in a while for brief commands (frequently process kills).

I happen to have two monitors, the second of which is smaller and always displays XChat no matter which workspace I’m using. This is called the “Sticky State” in Fluxbox. I also run GKrellM in what’s called the “Slit” which is the Fluxbox method for keeping docked applets permanently visible and outside the normal Fluxbox window rules. In this way, GKrellM always shows across workspaces, and maximized apps do not cover it up – although like everything else with Fluxbox that behavior can be changed.

I keep my Fluxbox Toolbar at the top and only across the left-hand monitor, and I let it autohide itself. I usually have four apps in the System Tray: XChat, KMix, KTorrent, and Amarok, none of which show up on the Iconbar portion of the Toolbar; the Iconbar being the primary section that displays icons for each app open on that workspace; the Toolbar being the whole thing, clock and all (some definitions).

All of these programs start automatically when I start X/Fluxbox. They always start exactly where I want. They all start at the proper sizes. My two Bluefish projects start opened. XChat starts stickied on the right hand monitor. KMix, KTorrent, and Amarok all start minimized to the Sys Tray. I no longer suffer monkey-like duplication of effort. It is perfection.

You might also note that I leave a small corner of the desktop visible under GKrellM. This is so I can right click to access the Fluxbox Root Menu easily. I have a keyboard command that will pop it up, but as counterintuitive as it might sound, the mouse seems to be the easiest for me to do this. I also have set Fluxbox (via the Keys file) so when I mouse over the desktop and scroll the mousewheel up or down, I scroll between workspaces. Between accessing the menu and flipping workspaces, having a tiny portion of the desktop showing is very convenient and not at all a waste of real estate.

Post navigation

15 thoughts on “Fluxbox In-Depth: Mad Customization And Other Tips”

Great writeup, Pat. I’m actually going to have to play around with the Fluxbox Apps file… there’s a lot of cool functionality in that particular file that I’m just still not using, and I could get used to some of those things really quick.

You’ve already spoiled me with the stuff I’ve lifted from your Keys file (particularly the window sizing and movement key bindings… those are really handy, and I’ve only been using them for a few weeks).

Hi! Just want to say thank you. I’m trying out fluxbox and thanks to what you wrote and generously shared, I was able to make out what to do with it! Now I’m loving it! Keep up the good work. Take care and God bless.

Quick suggestion: If you like Firefox, try Swiftfox, a speed-optimized Firefox for Linux only! While it hasn’t been updated to version 4 yet, it runs much faster than FF and goes well with Fluxbox, plus it has access to all of the extensions and add-ons as FF! Also, if you’re wanting to use a minimalistic file manager (which most Fluxboxians are), try PCManFM. It’s quick, it’s easy, and it gets the job done well.

I never found the answer to my question on the launch of programs on several desktops at fluxbox startup :
Is it possible to launch, for example, appli#1 on desktop#2, appli#2 on #desktop#4, appli#3 on desktop #3 and so on ?

(desktop#n = virtual desktop in fluxbox)

If it was possible, could you tell us how to do in the startup file, to obtain this result ?

Second, to get them to open on the different desktops (fluxbox calls them “workspaces”) you can edit the Apps file to include “[Workspace] {4}” under that app (change the number). You don’t have to edit it by hand though. If you run the app you want on the workspace you want, right-click the app’s titlebar, go down to Remember, and check the box next to Workspace. This will add the line to the Apps file for you.

About the Linux Critic

I'm a professional troubleshooter (a.k.a. IT Guy) who has been using Linux as his main desktop OS for over a decade.

I'm more technical than the "average user" by quite a ways, but I like to think that there's no reason why Linux and Free/Open Source Software can't find a home on the average user's desktop as a part of their everyday computing life.

I love to play around with technology, and I love to talk about it, so stick around and let me know what you're thinking.

DISCLAIMER: The posts I write and publish on this blog are my own opinions and the opinions of those who contribute to The Linux Critic, and in no way reflect the opinions or official positions of my employer or any of the employers of my contributors.

All content on this blog is copyright (C) Trent Isaacson unless otherwise indicated.