How to Install Openbox on Debian 12

In this guide, we will demonstrate how to install Openbox on Debian 12.

Prerequisites:

To perform the steps that are demonstrated in this guide, you need the following components:

  • A properly-configured Debian system. Learn more about installing Debian
  • If you’re running an older Debian release, check out how to upgrade to Debian 12
  • Access to root or a non-root user with sudo privilege

Openbox on Debian

Before jumping further, here’s a quick refresh on the difference of a window manager and a desktop environment:

Window managers: It’s the program that draws the windows or “boxes” on the screen. It’s responsible for managing how windows work, look, and act. For example, whenever you’re resizing a window or minimize/maximize it, it’s the window manager that’s facilitating these functions. There are a number of window managers available. For example, Openbox, i3, Compiz, etc. Check out the Arch Linux wiki on the window manager for a comprehensive list.

Desktop environments: A desktop environment is responsible for the entire desktop experience. It comes with various tools like a taskbar, a login manager, various widgets, theming support, icons, and whatnot. Some of the most popular desktop environments include GNOME, KDE, Xfce, Budgie, MATE, Cinnamon, etc.

Openbox is an open-source lightweight window manager with theming support. Many lightweight and minimalist Linux distros use Openbox as their default window manager. It’s also highly compatible with popular desktop environments like GNOME and KDE.

Installing Openbox on Debian

On Debian, Openbox is directly available from the official package repo. However, it can also be compiled and installed from the source (not recommended for compatibility reasons).

Installing Openbox from Debian

This is the recommended way of installing Openbox to ensure compatibility and stability. At the time of writing, Debian offers Openbox 3 (v3.6.1-10).

To install Openbox, run the following commands:

$ sudo apt install openbox

By default, Openbox should generate a right-click desktop menu. However, if it wasn’t generated automatically, you have to manually install an additional package:

There are two more Openbox packages that you may want to install afterwards:

  • obconf: ObConf is a tool for managing the Openbox configurations on the fly.
  • obmenu: Obmenu is a GUI tool for tweaking the Openbox menus.

Installing Openbox from the Source

Openbox is an open-source software and the source code is publicly available. This allows the advanced users to compile and install Openbox directly from the source code. However, this approach is not recommended as it may conflict with other Debian packages and cause stability issues.

To compile Openbox, we first need the following dependency packages:

$ sudo apt install git gcc gettext automake autoconf autopoint libtool libpango1.0-dev pkg-config libglib2.0-dev libxml2-dev libstartup-notification0-dev xorg-dev libimlib2-dev

Now, we grab the Openbox source code using git:

$ git clone https://github.com/Mikachu/openbox.git

Navigate to the Openbox source directory:

Run the bootstrap script to generate the configuration script:

Once generated, run the following configuration script:

$ ./configure –prefix=/usr –sysconfdir=/etc –libdir=/usr/lib64

We can now compile the source code. Run the following command:

Once the compilation finishes, install Openbox:

Using Openbox

After Openbox is installed, we can now start using it. There are a couple of ways to start Openbox.

If you’re using a desktop environment that uses display managers like KDM, GDM, or LightDM, you can choose the Openbox session from the login screen:

Alternatively, you can start Openbox using the following command:

For XDM users, this is also the recommended way of using Openbox. If you installed Openbox before installing XDM, XDM will automatically start using Openbox.

Openbox Config Files

There are multiple configuration files associated with Openbox.

The following list contains all the system-wide Openbox config files:

  • /etc/xdg/openbox/rc.xml
  • /etc/xdg/openbox/menu.xml
  • /etc/xdg/openbox/environment
  • /etc/xdg/openbox/autostart

The next list contains the user-specific Openbox config files instead:

  • ~/.config/openbox/rc.xml
  • ~/.config/openbox/menu.xml
  • ~/.config/openbox/environment
  • ~/.config/openbox/autostart

 

Keyboard Shortcuts

Openbox comes with a handful of keyboard shortcuts available:

  • Close the active window: Alt + F4
  • Cycle between windows: Alt + Tab
  • Cycle between windows (reverse order): Alt + Shift + Tab
  • Hide all windows: Win + D
  • Change the desktop forward/backward: Alt + scroll wheel
  • Go to the first desktop: Win + F1
  • Go to the second desktop: Win + F2
  • Go to the third desktop: Win + F3
  • Go to the fourth desktop: Win + F4

Check out the Openbox Debian wiki for all the available keyboard shortcuts.

Conclusion

We showcased how to install Openbox on Debian 12 from both the Debian repo and from the source. We also briefly discussed about various Openbox configurations like keyboard shortcuts.

Check out the official Debian wiki on Openbox for additional info like wallpapers, themes, icons, etc.

Happy computing!

source

Leave a Comment