A Novel about my FreeBSD journey

Install Openbox on FreeBSD

In this tutorial, I'll explain how to install the Openbox window manager on FreeBSD.

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.

Installation

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, but it can also create submenus.

Configuration

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 them to your preferences. But some programs 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 was 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.

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

Autostart

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.

Start

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

Conclusion

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.

Discuss...