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 crazy cool desktops people had. 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.

My Fluxbox, Let Me Show You It

This is my Fluxbox. There are many like it, but this one is mine. My Fluxbox is my best friend. It is my life. I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless. rAmen.

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.

Next page: Aterms

About these ads

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

  1. 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).

  2. Pingback: Links 04/08/2009: GNOME Dropping Icon Clutter, KDE 4.3 Finally Liked by SJVN | Boycott Novell
  3. “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”

    Have you ever tried devilspie/gdevilspie(gui)? it let’s me do that and a lot more in xfce. I’m sure you’ll like it…

    check them out:

    code.google.com/p/gdevilspie/downloads/list

    burtonini.com/blog/computers/devilspie

  4. Good post. You’ve inspired me to tweak my own FluxBox configuration a bit more. I’m going to have to play with the startup and apps files, and of course the keys file. :-)

  5. Thanks. Glad I could help. My keys file really isn’t that complicated, but you can google and find all sorts of amazing example files. Have fun!

  6. Pingback: Fluxbox and dockapps « The Linux Critic
  7. nice guide to Fluxbox, really.. I definitely share your enthusiasm about Flux’s speed, lightweight-ness, and ease of configuration/customization!

  8. Pingback: Mint Enlightenment « The Linux Critic
  9. 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.

  10. 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.

  11. Hello Patrick,

    Tnaks for this great tutorial !

    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 ?

    Thanks in advance !

  12. You all are welcome. Glad to see this is still helpful even if some of the links are broken. =D But I knew that would happen eventually.

  13. @Guillaume
    I know it’s been months and you’ve probably found your answer already, but I’ll respond anyway. What you’re asking is really two different questions.

    First, to launch apps on startup, see here:
    http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file

    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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s