Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the official website. This article will pertain to running Openbox under Arch Linux.

Template:Filename is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.

Template:Filename controls the Openbox application menu that appears when you click on your desktop. The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the Openbox website.

Stand-alone window manager

To run Openbox on its own, simply add the following to the bottom of Template:Filename:

exec openbox-session

If you have used another window manager before, such as Xfce, and Openbox wont start after logging out of X, try moving the autostart folder:

mv ~/.config/autostart ~/.config/autostart-bak

Window manager for Desktop Environments

GNOME

GNOME 2.26

Follow the next guide for GNOME 2.24. If it fails try this:

If after installing openbox and trying to log into the 'Gnome/openbox' session but it always fails then you can do the following as one way to achieve running openbox as your window manager every time you log into the 'Gnome' session from your login manager (xdm, gdm, kdm, entrance, slim, etc.)

Log into your Gnome only session (which would still be using metacity as its window manager) if you aren't already.

KDE

Xfce4

Log into a normal Xfce4 session. From your terminal of choice, do:

$ killall xfwm4 ; openbox & exit

This will kill xfwm4, run Openbox, and close the terminal.

Log out, making sure to check the "Save session for future logins" checkbox. On next login, Xfce4 will use Openbox as its WM. To be able to exit the session using xfce4-session, open your file Template:Filename (if it isn't there, copy it from Template:Filename).

Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.

If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your Template:Filename file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).

If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:

$ xfdesktop --quit

However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.

(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)

Preferences

Currently, there are two options for configuring the core Openbox preferences; manually edit the Template:Filename, or use the ObConf tool.

Manual configuration

To configure Openbox manually, simply edit Template:Filename with your favorite text editor. The config file provides plenty of comments throughout, and full documentation is available at the official website.

ObConf

ObConf is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.

To install ObConf, run:

# pacman -S obconf

Note: ObConf cannot be used to configure keyboard shortcuts and some other advanced features. For these modifications, you must edit Template:Filename manually (see above). Other option is ObKey application (available in AUR).

Application configuration

Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:

Manual configuration

MenuMaker

MenuMaker is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.

MenuMaker is available in the community repository:

# pacman -S menumaker

Once installed, you can generate a complete menu by running:

$ mmaker -v OpenBox3

By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:

Download the one you like (maybe you'll prefer the head version of course). You can put the file anywhere, I used ~/Documents/build/xdg-menu (just modify the menu entry later according to YOUR filename/path.)

Then open your menu.xml with your favourite text editor and add the following entry where you want the new menu (of course, you can modify the label however you want):

Pipe menus

Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly. Some examples are system monitors, media player controls, and weather forecasts. Many examples can be found on the openbox site.

Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg). The relevant forum posts for these utilities are here and here

Startup programs

Openbox features support for running programs at startup. This is provided by the "openbox-session" command.

There are two ways to enable autostart:

If you use startx/xinit to log into your X session, edit Template:Filename and change the line that executes openbox to execute openbox-session instead.

If you log in with GDM/KDM, then select the Openbox session and it will automatically use autostart.

# ~/.gtkrc-2.0
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Rezlooks-Gilouche/gtk-2.0/gtkrc"
include "/home/username/.gtkrc.mine"
# -- THEME AUTO-WRITTEN DO NOT EDIT

You can use lxappearance to choose GTK icon themes. Please refer to the above section.

Mouse cursors

Extract the desired Xcursor theme to either /usr/share/icons (system-wide access) or ~/.icons (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.

Login managers

Qingy is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses DirectFB, therefore it does not start X Windows unless you choose X Windows session. See article about Qingy at Arch's wiki.

Composite desktop

Xcompmgr is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.

Bashrun

bashrun provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section Template:Filename:

Launchy

Launchy is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.

# pacman -S launchy

It is launched by Ctrl+Space key combination.

LXPanel

LXPanel If LXPanel is used as a taskbar manager, the run utility from the LXPanel menu can be executed with Template:Codeline.

gnome-panel

The gnome-panel run dialog can be executed with

gnome-panel-control --run-dialog

Clipboard managers

You may wish to install a clipboard manager for feature rich copy/paste ability. xfce4-clipman-plugin, parcellite, or glipper-old may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.

RSS-Reader

Tips and tricks

Copy and paste

From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.

Transparency

By using the program transset-df, it is virtually the same as transset, (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in Template:Filename you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):

Xprop values for applications

To use, run Template:Codeline and click on the running program that you'd like to define with per-app settings. The result will display only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:

Xprop for Firefox

For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless Template:Codeline is used, regardless of what xprop reports as the actual WM_CLASS values.

Linking the menu to a command

Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is available on AUR. To use it, simply add the following code to the <keyboard> section of your Template:Filename:

Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:

# xdotool key ctrl+alt+q

Of course, you can change the shortcut to your liking.

Urxvt in the background

With Openbox, running a terminal as desktop background is easy. You won't need devilspie here.

First you must enable transparency, open your Template:Filename file (if it doesn't exist yet, create it in your home folder).

URxvt*transparent:true
URxvt*scrollBar:false
URxvt*geometry:124x24 #I don't use the whole screen, if you want a full screen term don't bother with this and see below.
URxvt*borderLess:true
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.