How to Install Openbox GUI on Alpine Linux

Openbox is an open-source, lightweight and highly configurable window manager that is the standard windows manager for LXDE and LXQt desktop environments. It is highly configurable and allows you to make multiple tweaks that determine how you interact with your desktop environment.

In this guide, you will learn how to install Openbox desktop environment on Alpine Linux.

Installing Openbox in Alpine Linux

To get off the ground, refresh the local repositories using the following apk command.

# apk update

Next up, install Openbox, xterm, and terminus-font packages as follows.

# apk add openbox xterm terminus-font

This installs a host of additional packages and libraries as shown in the output below.

Install Openbox in Alpine Linux
Install Openbox in Alpine Linux

Next, move on, and install the Xorg display server. You can achieve this by running the command:

# setup-xorg-base
Install Xorg in Alpine Linux
Install Xorg in Alpine Linux

If you have a normal regular user configured on Alpine, you can make Xorg work with this user by adding the user to the following groups: video and input.

To do so, run the following commands. Replace tecmint with your own user residing on your system.

# addgroup tecmint input
# addgroup tecmint video

Next, configure Openbox to act as the default Windows manager as shown.

# echo 'exec openbox-session' >> ~/.xinitrc

Next, copy the Openbox configuration files to your home folder.

# mkdir /home/tecmint/.config
# cp -r /etc/xdg/openbox  ~/.config

To modify Openbox, edit the files in the ~/.config/openbox directory.

To launch Openbox, run the startx script.

# startx

This pops open a black window. To access the menu option, right-click and scroll through the options.

NOTE: The default configuration for Openbox is minimal and most options won’t work unless you install additional packages or customize Openbox. Check out the Openbox configuration documentation for additional customization options.

Openbox Desktop
Openbox Desktop

There you have it. We’ve successfully installed Openbox windows manager on Alpine Linux distribution.

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.