Install Openbox on FreeBSD

🕐 4 minutes

📅 2022-01-27

Openbox is a very stable and fast window manager. It is characterized by its high adaptability and low resource requirements, and is therefore also ideal for less powerful computers. Openbox is the standard window manager of the desktop environments lxde or lxqt. Different unixiode linux variants also rely on openbox. Openbox is not a complete desktop environment, it does not come with a panel or other extensions.

Openbox can, however, be upgraded with many useful additional tools. Openbox includes a drop-down menu similar to what most desktop environments make available when you click on the taskbar. With this fully configurable menu, you can exit openbox or start the programs organized into groups.


We will install openbox with the following command:

$: doas pkg install openbox

It is recommended to use the graphical configuration tools obconf and obmenu to install with.

$: doas pkg install obconf obmenu

The design and behavior of openbox can be configured with the program obconf. With obmenu the context menu (which is called up with the right mouse button) is adapted to your needs and workflow.

Obmenu can not only create individual program starters, it can also create submenus.


To configure openbox there is a utility called obconf, the openbox configuration manager.

The configuration of the window manager using XML files is unusual. Icccm and ewmh are supported, as well as working with several monitors at the same time by xinerama.

By editing only three files, you can adapt it to your preferences. But there are also programs that can be used to graphically configure settings and menus.

After the installation and the first start of openbox, the global XML configuration files are in the folder /usr/local/etc/xdg/openbox/. We copy the entire contents of the folder /usr/local/etc/xdg/openbox/ into our home directory to ~/.config/openbox. This folder in the home directory created automatically when openbox was started for the first time.

Existing files will be overwritten. We ensure that these files can be read and written/changed.

$: mkdir ~/.config
$: mkdir ~/.config/openbox

$: cp /usr/local/etc/xdg/openbox/*.*  ~/.config/openbox

We start the openbox configuration manager to change the appearance and design.

Themetopic selection (window decoration, colors)
Appearancefonts and layout of the headline of a window
Windowsspecial window functions
Move und Resizebehavior when changing the position and/or size of a window
Mousewindow focus and behavior when double-clicking the title line
Desktopsnumber of virtual desktops
Marginsbehavior of the edge areas of the desktop
Dockadditional toolbar/program bar

Now we can edit the menu.xml with the configuration tool obmenu and adapt it to our needs.

Set up wallpaper

We install feh to display a wallpaper of our choice.

$: doas pkg install feh


The standard version of the openbox window manager is quite spartan. That is why we are expanding it with additional useful tools and functions. These are entered in the home directory in the folder ./config/openbox in the autostart file.

A typical autostart configuration looks like this:

$: nano ~/.config/openbox/autostart => 

tint2 &
volumeicon &
feh /home/daniel/Archiv/Images/bsd.png

tint2 provides openbox with a panel.

volumeicon is a volume control.

With feh a wallpaper loaded and displayed.


If we work without a login manager and start x with startx from the console, we have to create a .xinitrc in the home directory and enter the following there:

$: nano ~/.xinitrc =>

exec openbox-session


Openbox makes sense and is therefore recommended, even if lightweight software such as

installed and used. The speed advantage is due, among other things, to the fact that no additional services started automatically, and no dependencies unnecessarily increase or inflate the storage requirements. Openbox can be upgraded with additional tools up to a full-fledged desktop. The great flexibility is one of the great strengths of openbox.

Openbox screenshot