Troubleshooters.Com and Linux Library Present:

Openbox Productivity

CONTENTS:

Introduction

Xfce appeared to be giving me trouble. My mouse and keyboard would intermittently quit working. I couldn't find a way to reproduce the problem, but I had a feeling it involved Claws-Mail somehow. Trouble is, I need Claws-Mail. So just for fun, I started a desktop environment shootout, comparing LXDE, Sawfish, Enlightenment, Openbox, FluxBox, TWM, and a few others.

LXDE is great, but it has a slow mouse, and also, it can have only one panel. Sawfish and Enlightenment looked promising, but both seemed to have weirdnesses. Fluxbox, TWM, Windowmaker, and all those other "all you see is desktop" environments seemed unproductive to me. Except for Openbox. Openbox just felt good. It's hard to explain, but from the first, it was enjoyable. Challenging, but enjoyable. Fonts looked good (though small). Its menus made sense, both with a mouse and with a keyboard. And, as is always necessary with an "all you see is desktop" environment, it was easy to assign arbitrary programs and bash commands to keyboard combinations. Like UMENU, which I consider essential for this type of environment.

As I'll explain in this document, switching to an "all you see is desktop" environment required a lot of change on my part. Also, Openbox required a lot of preliminary adjustment to get fonts how I need them (big) and menus and hotkeys the way I like them. I'm still adjusting these things, and there's no guarantee I won't go back to Xfce. But Openbox is kind of cool.

A Few Words About Desktop Environments

Abominations such as the Windows 8 interface, Unity, and Gnome3 have brought discussions of "Window Managers" and "Desktop Environments" to a boil. People are dumping whole distributions to escape these productivity destroyers, instead of just installing the desktop environment that suits them best. People discuss the the concepts of "Window Managers" and "Desktop Environments" as if they're totally different things rather than degrees on a spectrum, gleefully discussing how "Desktop Environments" use "Window Managers".

I view it like this: A desktop environment or window manager is nothing more or less than my interface to my computer. And the way I see it, when you get past all the babble, we all judge that user interface on one or both of these two properties:

I'll speak only of productivity in this document, because if I gave a flying flamingo about aesthetics, I'd pay double and get a Mac.

Productivity is a complex topic. Remember when you switched to the software you're currently using and enjoying? Didn't you hate it the first few days? Didn't it take you so long to do simple tasks that you lost your train of thought? And then, over days or weeks, didn't you adapt to your software? To the point where now, if you go back to the old software, you say "eeeuuu, I hate this!" People adapt to their software to a large degree. But some adaptations take longer. Switching between KDE, Xfce, LXDE and IceWM is trivial -- they're all variants of the Windows 95 interface category. But switching from one interface category to another takes time. Here are some interface categories:

Windows 95

This sounds strange coming from a Linux guy, but I think Windows 95 represented the greatest step forward ever taken in graphical user interfaces. Before Windows 95, the Mac had something kinda sorta like Win95 (with the Apple functioning as a Start button), but my memory of the Mac was it was confusing. Meanwhile, Windows 3.0/3.1 were atrocities in every sense of the word, OS/2 required opening pane after pane of file managers, and the Amiga and Atari ST looked beautiful, but had interfaces not accommodating to those who would like to run twenty programs at a time.

Windows 95 had a taskbar with a start button, buttons for each running application, and a system tray for little applets. You could see at a glance what was going on by looking at the task bar. The start button gave a single starting point for all computer activity, with no Apple/File/Edit/View/Label/Special like the Mac. Win95's windows all sported their own menu bar, leaving the Win95 taskbar free to do what it did best: Keep the user informed.

Many Linux desktop environments emulated the Win95 interface, which I think is a good thing. Over the years, various Linux desktops kept improving on the Win95 paradigm, adding multiple workspaces, and in some cases (Gnome 2, Xfce), multiple taskbars, now called "panels". Gnome 2 substituted three items for a single start button, reducing mouse clicks and speeding productivity.

Bastardized Windows 95

Somewhere around Windows XP, Windows began attempting to substitute an anticipation of what the user needed for a strict hierarchical menu. At first it wasn't too bad, but by Windows 7, running a seldom used program was a search for a needle in a haystack. Not to be outdone, some Linux user interfaces tried the same thing, notably the interface sported by Linux Mint starting around the middle of the 00's.

I thought I'd never see a user interface more confusing than Windows 7, but in 2010 and 2011 respectively, Unity and Gnome 3 proved me wrong. I've tried to use them a few times, just to see why a few others like them, and quit in angry frustration every time. Life's just too short. And of course, there's the Unity opt-out "phone home to advertisers" to think about.

Bottom line, if you like any of these bastardizations of Windows 7, Openbox has nothing to offer you.

Command Line

You can do absolutely anything, within the computer's capabilities, using a command line interface. For the fast typist, who has prodigious memory capable of memorizing not only commands but their stable of options, the command line is all that's needed, except of course for actually drawing and painting things. If you've got the memory and typing speed, who needs a GUI?

Text Menu

Text menus were all the rage in the 1980's. They ran on top of a command line, and removed the necessity for prodigious memory and high typing speed, although being a touch typist helps a lot with a text menu. With Gates' and Jobs' assault on the command line, text menus came to be seen as a hack. But I'll tell you something: There's absolutely no faster way for starting programs on a computer, expecially if the text menu doesn't require the user to hit Enter after every keystroke.

The ideal text menu doesn't require the user to press Enter after each keystroke, because that's tiring and doubles the number of keystrokes. Some text menus allow multiple choices with the same letter and simply skip between alternate same-lettered choices, waiting for an Enter key, but if the user presses a letter belonging to one and only one choice, that program runs without the need to press Enter. Other text menus simply have a rule against multiple choices with the same letter. They're the fastest, but not necessarily the most convenient. On a daily basis, I use UMENU, in addition to my Desktop Environment, to run many programs. If I stick with Openbox, I'll increase my UMENU usage, and probably rename and rewrite it to make deployment easier so it has a bigger installed base.

Anyway, text menus are very compatible with other user interfaces, and the less menu driven your user interface, the more you stand to gain with a text menu (or perhaps more precisely, a keyboard driven menu system).

Chicklet (Like Windows 8)

I'm laughing as I write this. Have you ever used Windows 8? It's like a trip back to kindergarten. I regularly service my kids' laptop computers with Windows 8 (their colleges force them to use Windows), and it never fails to amaze me how difficult it is to find anything on Windows 8. Maybe that's a great interface for a smartphone, but it's ridiculous for a full sized computer. The person who enjoys Windows 8 wouldn't like Openbox at all.

All You See is Desktop

You boot the computer, you log in, and all you see is an empty desktop. What now? Or perhaps you see an aesthetically pleasing WindowMaker with its paper clip and its geegaws, but once again, what now? If you were raised on Win95 or Mac interfaces, your first thought is "now what the heck do I do? And the more you investigate this interface, the more you ask yourself why anyone would subject themselves to it. These interfaces depend on clicking the desktop to bring up a menu, and after you've opened a few programs, there's no desktop to click on. These were my exact opinions until I tried Openbox.

Many "all you see is desktop" environments make sure you're always provided with a sliver of desktop to click in. Openbox does this by allowing you to configure a "margin" which no applications will ever overwrite. Right now my Openbox is configured so that the first six pixels on the left side of the screen are margin.

First Steps

Openbox shows you an empty desktop and nothing else. A brand new installation gives you the Root Menu when you right click the desktop, and the list (menu) of all programs on all desktops (This is called the Client List Combined Menu, or Client List Menu or Client List for short) when you center-click the desktop. Center clicking might have been acceptable 15 years ago, before scroll wheels, but an action you do every two minutes should not be associated with the press of a scroll wheel. So what you're going to do is change the mouseclicks to something more suitable, and also to define hotkeys to bring up those two menus. But first, you're going to make sure there's always a piece of desktop to click on...

  1. Open the Openbox Root Menu.
  2. Select the Openbox Configuration Utility.
  3. Go to the margins tab.
  4. Set the left margin for 6 pixels.
  5. From the Openbox Root Menu, select "Reconfigure Openbox.
  6. You now have a 6 pixel stripe at the left edge of your screen on which you can always click, regardless of how many windows you have opened or maximized.

Now let's change the mouseclicks, and add hotkeys:

  1. cd $HOME/.config/openbox
  2. Back up any files you find in there, and label them "almost original". "Almost" because you changed the margins earlier.
  3. Edit rc.xml
  4. Search for and find <context\s+name="root"
  5. Look down from there. On the entry for client-list-combined-menu, change from center click to right click.
  6. On the entry for root-menu, change it from right-click to left click.
  7. Save and back up.
  8. Get to the root menu, click reconfigure, and make sure that now the root menu is left click on the desktop, and client list menu is right click. If not, troubleshoot.
  9. Back in rc.xml, copy the two mousebind sections to right below <keyboard>.
  10. Copy the <keybind key="whatever"> and </keybind> tags to where the equivalent mousebind tags now sit. Delete the mousebind tags.
  11. Set the key for the root menu to C-8, and the key for the client list to C-0.
  12. Save.
  13. Reconfigure Openbox, and make sure the new hotkeys work. If they do, back up.

You now have a setup where you can get to the root menu (often called a main menu in other desktop environments) and the client list with easy mouseclicks and easy keystrokes. This is vitally important, because there's no taskbar in Openbox, so you need ultra-quick access to both your menu and your list of windows. At this point, your Openbox is efficient enough to continue configuring without frustration.

Handy Openbox Tools

Here are some tools you'll find handy on a daily basis in Openbox. Let's start with the menus. These are always a good idea:

The Root Menu is accessible by mouse-clicking the desktop (you did leave a margin so you can always click the desktop, right?), or with a hotkey (you did assign a hotkey to the Root Menu, right?). The Root Menu looks like this:

Screenshot of the Root Menu screenshot

A few comments. Notice the line that says "Reconfigure"? That's one way to reconfigure Openbox's configuration. When you change the configuration, you must reconfigure for your changes to take effect. Speaking of changing the configuration, that's what the line saying "Obconf" does.

NOTE:

Another way to do the reconfigure is the following command:

openbox --reconfigure

Another way to run the Openbox Config program is this command:

obconf

Note that this menu is for XUbuntu 12.10: Different distros arrange things differently. The line that says "Restart" restarts Openbox. What's cool about it is that it doesn't restart X, meaning your X programs don't terminate. If your display gets bunged up, before logging out and logging back in again to your X session, try to restart Openbox.

The main part of the root menu is the part that says "Debian". Obviously it will be termed differently with different distributions. Anyway, the Debian choice is the rough equivalent of the start menu on Xfce, while the entire Root Menu is the rough equivalent of the menu bar on Gnome2.

Are you ready for something cool? The choices in the Root Menu are first letter sensitive. For instance, if you keep pressing d, it will keep alternating between Debian and Desktops. You'll choose one or the other by pressing Enter. However, if you press w for Web Server, it will go right into the Web browser because only one choice begins with W. Once you get used to this, it makes the menu system extremely fast. The following is a screenshot of the menu system drilled down several levels:

Root Menu, drilled down screenshot

See the choice on the second level menu called "Window Managers"? Don't use that. I've done it, and it's a good way of getting yourself into something you can't get out of, at least without Ctrl+Alt+F2 and killing X. And of course, doing that would kill all the GUI apps you had open.

You'll find the Client List Menu ever more important as time goes on. It's your substitute for the handy-dandy taskbar in that it shows you every GUI app that's running. And even better than a taskbar, it conveniently shows everything on every desktop, enabling you to immediately switch to something on another desktop, or just switch to another desktop. Like the Root Menu, the Client List Menu's choices can be hotkeyed by first letter, and once again if a letter's unique it just goes to that app, but if it's not, it stops and allows you to hit Enter or repeat the letter to go to the next choice beginning with that same letter. The following is a screenshot of the Client List Menu:

Client List Menu Screenshot

The Openbox Config Program, available as "Obconf" on my root menu but available by other choice names on other distros, is where you do most of your Openbox configuration, especially the simpler and more often used parts of the configuration. To the best of my knowledge, it's a graphical front end to the $HOME/.config/openbox/rc.xml file. The following is a screenshot of the Openbox Config program:

Speaking of the $HOME/.config/openbox/rc.xml file, all the usual cautions apply. You're modifying a config file, and not just any config file, but one in XML format. Be sure to back up this file before editing it. I'm not positive, but I'm pretty sure if you mess it up, the next time you reconfigure or log out and log in, Openbox won't function, and I doubt the Openbox Config program could function, even if opened in a different window manager, with a bad $HOME/.config/openbox/rc.xml file. Maybe if you're lucky you could delete the file entirely and start fresh with the Openbox Config program in another window manager, but isn't it simpler to just back up every time so if something goes wrong, you can go back to the last functioning configuration?

Using the openbox command, you can do things like reconfigure, restart Openbox, exit a running Openbox session, switch from another desktop environment or window manager to Openbox, various debugging tasks, and other things. The Openbox man page sometimes is out of sync with the executable, so the best way to find out what options your version has is to perform this command:

openbox --help

Many knowledgeable people tell me the difference between a "window manager" like Openbox and a "Desktop Environment" like Xfce is the package of tools the "Desktop Environment" comes with. OK, fine. So use other software's tools with Openbox. Personally, I install LXDE and Xfce on every computer I own. They're both too lightweight and too featureful not to. And look at all the great tools I get:

Roadmap

Here's where we go for the rest of this document:

Understanding the Differences

If you're migrating from a Win95 clone like Xfce, LXDE, IceWM, Gnome2, Windows XP or KDE, or even a bastardized Win95 Clone like Gnome3, Unity, the default Mint Interface, or Windows Vista or 7, or even if you're migrating from Chickletville (Win 8), upon seeing Openbox, you'll be saying "Toto, I don't think we're in Kansas anymore. Openbox is an "all you see is desktop" interface. No taskbar, no start button, every millimeter of screen available for windows (before you set the margin).

If you're migrating from a Command Line Interface (CLI) or a text menu, once you find out how to invoke the root menu and pull up a terminal, you'll be right at home. Likewise, if you're migrating from a tile-only interface like Awesome or Ratpoison, you'll have enough tolerance for inconvenience that you'll easily be able to get through the first few days of Openbox, after which you'll wonder why you weren't using it all along.

So I guess the remainder of this article is for refugees from Win95 clones. Perhaps you got sick of the encroachment of geegaws onto your valuable desktop space. Perhaps you got tired of the instability many Win95 clones tend to have, or the bloat, of if you're from LXDE land, the pitifully slow mouse. And if your last OS was Windows, well, we all know why you left! Anyway, Openbox is miles away from the Win95 interface you grew up with.

The most obvious difference is actually a trivial thing: The lack of a start button. Once you set Openbox so clicking on the margin brings up the root menu, that difference is gone. Even better, you can set up a hotkey combo for the root menu that you can really use.

Next, there's the fact that you have no list of running applications at the bottom of your screen. If you're used to glancing at a taskbar, you'll be amazed at how confused you get when you don't have one, in part because you formerly used the taskbar as a crutch reminding you of what you were doing just before the task you completed or interrupted. Fortunately, it's easy to adapt to this new reality, using the client-list-combined-menu.

Probably the toughest hurdle in adapting to "all you see is desktop" environments is the lack of system tray stuff: CPU monitor, network icon, clipboard tool, desktop list, clock, and the like. I haven't yet figured out how to replace these things, but I'm working on it. Some will probably involve frequent use of the client-list-combined-menu (list of tasks), some will involve regular apps, placed on their own desktop, to replace the tray apps (gkrellm for CPU usage, for instance), and some will involve a text menu. UMENU, in my case.

Text Menu

With an "all you see is desktop" environment, you have a lot less to click your mouse on. You make up the lost functionality with the keyboard, and as you know, keyboard work tends to be quite a bit faster than mouse work. The best way to concentrate loads of commands and tasks is with a text menu. In my opinion, by far the fastest text menu interfaces are those that never require pressing the Enter key. UMENU is one such text menu, I'm sure there are others. A well crafted text menu completely replaces the start button, and is much faster than Openbox's existing root menu.

Working With Desktops

Desktops (workspaces) play a stronger role in an "all you see is desktop" environment, because they provide context and direction. With Xfce, desktops were just extra places to put apps in an ad-hock way. With Openbox, different desktops contain different things. In Openbox, it makes sense to name the desktops. Right now I have 8 desktops (as usual), but now I name some of them, with #1 being "Main", #2 is "Current Project", #4 is "Config" for various configuration programs that are running, #7 is "Stash" for things like terminals that have run graphic programs and need to keep running, or rarely used menus and other programs. #8 is called "Adjustments", and is for adjustments like Alsamixer and status viewers like gkrellm.

For me, the easiest and quickest way to switch between desktops is to use the Ctrl+Alt+Right and the Ctrl+Alt+Left hotkeys. When you "go too far" with one of these hotkeys, it just jams on either the last or first desktop, depending on the hotkey. This makes switching very fast. Note that when you use these hotkeys, the desktop name flashes on the screen, so if you forget which desktop you're on, you can find out with the sequence Ctrl+Alt+Left, Ctrl+Alt+Right. Or better yet, on my setup, just pressing Ctrl+Alt+Up tells me what desktop I'm on, and that message will stay on the screen as long as I have Ctrl+Alt pressed. No need to ever get lost.

If you get complete vertigo and forget where you are or what's around you, that's the time to invoke the client-list-combined-menu. The way my Openbox is set up, I can get to that by right-clicking on the desktop, or pressing Ctrl+0.

Fonts

If your first Openbox experience is anything like mine, you'll find that the fonts are really screwed up! On mine, many fonts were tiny, thin, reedy, and hard to read for someone with my vision. Don't worry about it, you can fix it.

Openbox Fonts

The first fonts to change are the Openbox fonts. These adjust the size and style of the root menu, the client list menu, as well as various boxes and tools displayed by Openbox. To adjust the Openbox fonts, run the Openbox config program, choose the Appearance tab, and change the fonts. Personally, I make the active window title huge, and the inactive window title tiny. This is one more way to choose the active window at a glance. The menu header and menu item fonts give you a tradeoff between being able to fit lots of apps on the client list, and being able to quickly see individual items at a glance.

Qt Fonts

Applications made with Qt have their menu and dialog box fonts set with the qtconfig program. Run it, click the "fonts" tab, and adjust the fonts to your liking. After setting the font, File->Save and exit, then rerun qtconfig to see the effect of the new fonts. Keep tweaking them til you get it the way you like it.

Gtk Fonts

Fonts for Gtk apps are hard to adjust, and my experience tells me that Gtk apps are the ones that most need adjustment after switching to Openbox. Gtk font adjustment is also the most complex, and my experience is that none of the Gtk configuration programs are effective in changing Gtk fonts.

Examples of Gtk apps include Gimp, Thunar, Claws-Mail, and Gnumeric, to name a few. In other words, they're very important to your computing epxerience, and they must have legible fonts. That's why you'll go through all this hassle to set these fonts. Here are the steps:

  1. cd
  2. echo include \'/home/slitt/.gtkrc.mine\' > .gtkrc-1.2-gnome2
  3. echo include \'/home/slitt/.gtkrc.mine\' > .gtkrc-2.0
  4. Edit .gtkrc.mine

The following is how I set my .gtkrc.mine:

gtk-theme-name = "Clearlooks"

# NOTE, may need to repeat this for style "schrift".

gtk-font-name = "Liberation Sans 16"
style "user-font"
{
  font_name="Liberation Sans 16"
}
widget_class "*" style "user-font"

So, as you can see, I set user-font to Liberation Sans 16, and in doing so made my Gtk apps like Thunar, Gimp, Gnumeric, Claws-Mail and the like.

A word of caution: Gtk fonts don't always work like this. If they don't, be sure you're specifying a font that actually exists on your computer. For instance, if I didn't have the Liberation Sans font, the preceding wouldn't have worked.

A Final Word On Fonts

I don't know why Openbox (and it's not the only one to do this) prints fonts so small on the screen. Unless you have excellent vision, it's a Pain in the Posterior. There are so many places where apps can be changed for so many parts of so many apps, that if your experience is anything like mine, you'll never find out how to fix all of them. Right now I'm typing this on the Bluefish editor, and Bluefish's menu and dropdown fonts are so small that when you select something, the highlight obscures the readability of the choice.

That being said, my experience is that you can fix enough fonts on enough programs that Openbox is very useable. And like I said, plenty of other desktops have this "tiny fonts" problem too. Sometimes it seems like every software developer and every web designer has 20/10 vision and expects everyone else to have the same. The point is, you can get the apps you need readable on Openbox.

Theme

Go into the Openbox Configuration Program, and pick a theme you want in the Themes tab. Then you can go to the Appearance tab to set fonts and to pick where you want the various titlebar elements to go: Window icon, Title, Minimize, Maximize, Close, Shade, and Omnipresent (on all desktops). On the Windows tab you can choose the focus model and a few other things.

Getting Used to the Keyboard

An "all you see is desktop" interface requires much more keyboard use.

Incorporating a Text Menu

A text menu hugely boosts your productivity on an "all you see is desktop" interface. Text menus not requiring you to press Enter after making a selection are much more productive, especially when you need to plunge into several levels of choices. Whatever text menu you use, connect it to a hotkey. Here's how I configured mine in $HOME/.config/openbox/rc.xml:

    <keybind key="C-9">
       <action name="Execute">
          <command>rxvt -fn 10x20 -fg yellow -bg black -e "/d/bats/mm_startmenu"</command>
       </action>
    </keybind>

The main thing is, your action name is "Execute", and your command is whatever you'd do to run it from the command line. Notice in my case, I run the menu in a terminal (rxvt), because it's a text menu and therefore needs a terminal for visible output and keyboard input. Once I put in that code and reconfigure Openbox, pressing Ctrl+9 brings up my text menu.

Getting Newly Installed Software on the Root Menu

I haven't yet found a good way to guarantee that newly installed software gets on the Root Menu. Instead, I recommend that you put the newly installed software on your text menu, or that you use xfce4appfinder to run the newly installed program.

Note:

This document is not yet complete.