Openbox: the lightweight and highly configurable window manager for Linux

Introduction to Openbox

Openbox is a stacking window manager for the X Window System that stands out for its low resource consumption and great flexibility. Unlike full desktop environments, Openbox only manages the placement, resizing, and decoration of windows, leaving the user free to choose which panels, launchers, and applets to use. This minimalist philosophy makes it a popular choice among users seeking maximum performance on older hardware or who prefer to build their own customized work environment.

Installation on popular distributions

In most Linux distributions, Openbox is available in the official repositories. On Ubuntu or Debian it can be installed with the command:

  • sudo apt update
  • sudo apt install openbox obconf obmenu

On Fedora the package is named openbox and is installed with:

  • sudo dnf install openbox obconf obmenu

On Arch Linux, the openbox group includes the manager and configuration tools:

  • sudo pacman -S openbox obconf obmenu

After installation, simply log out and select Openbox as the environment in the display manager (GDM, LightDM, SDDM, etc.) to start a pure Openbox session.

Basic operation concepts

Openbox does not include a panel or a menu by default; these elements are added via external applications. The most common components are:

  • Panel: tint2, xfce4-panel, or lxpanel provide a taskbar, system tray, and launchers.
  • Application menu: obmenu generates a root menu based on the system’s .desktop files; dynamic menus such as xdg-menu can also be used.
  • Wallpaper manager: feh, nitrogen, or hsetroot allow setting the wallpaper.

Openbox’s behavior is primarily controlled via the file ~/.config/openbox/rc.xml, where themes, keyboard shortcuts, window rules, and focus options are defined.

Menu and rc.xml configuration

To customize the menu, simply run obmenu from a terminal. This graphical tool allows adding, removing, or reordering entries and saving changes to ~/.config/openbox/menu.xml. A typical menu includes sections such as Accessories, Development, Office, and System, each with its respective launchers.

Regarding rc.xml, some of the most frequently edited sections are:

  • theme: specifies the name of the Openbox theme that controls the appearance of window borders and titles.
  • keyboard: here keyboard shortcuts are assigned for actions such as opening a terminal (W+Return), launching the menu (W+space), or switching between desktops (W+Tab).
  • mouse: allows defining click and drag actions on the desktop, on the title bar, or on window borders.
  • focus: configures the focus behavior (click-to-focus, sloppy-focus, or follow-mouse).

After modifying any of these files, the configuration is reloaded with openbox --reconfigure or simply by restarting the session.

Themes and appearance

Openbox’s appearance is managed via themes located in ~/.local/share/themes or /usr/share/themes. A theme consists of a themerc file that defines colors, textures, and dimensions of window elements. Some popular themes are:

  • Clearlooks-Openbox