Aug 19, 2024 6 min read

How to Install Openbox on Debian 12

Install Openbox on Debian 12 with our step-by-step tutorial. Openbox is a lightweight and customizable window manager for Linux.

Install Openbox on Debian 12
Install Openbox on Debian 12
Table of Contents

Introduction

Before we begin talking about how to install Openbox on Debian 12, let's briefly understand – What is Openbox?

Openbox is a lightweight and customizable window manager for Linux. It offers a minimalist desktop environment that allows users to efficiently manage their windows. Openbox provides various features like virtual desktops, a dynamic menu system, and highly customizable keybindings.

With its small memory footprint, Openbox offers fast and efficient performance on both low-end and high-end systems. This flexible window manager empowers users to tailor their desktop experience according to their preferences. So, if you're looking for a sleek, lightweight, and customizable window manager, Openbox is the perfect choice for you.

In this tutorial, you will install Openbox on Debian 12. We will also address a few FAQs on how to install Openbox on Debian 12.

Advantages of Openbox

  1. Lightweight: With its small memory footprint, Openbox offers fast performance and is suitable for low-end devices.
  2. Customizable: Openbox allows users to personalize their desktop experience by easily modifying keybindings, themes, and menus.
  3. Efficient Window Management: It provides a minimalist environment for effectively managing multiple windows and virtual desktops.
  4. Fast and Responsive: Openbox's lightweight design ensures quick response times, enhancing user productivity and overall system performance.
  5. Versatile: Openbox can be integrated into different desktop environments, making it a flexible choice for users seeking a customizable window manager.

Prerequisites:

To follow along with the instructions in this article, you will need the following:

  • A Debian system that is setup correctly.
  • Update to Debian 12 if you're using an older version of the operating system.
  • root privileges or sudo privilege for a non-root user

Installing Openbox on Debian

Openbox can be downloaded straight from the official package repository on Debian. It is also possible to compile and install it straight from the source, though this is not advised due to compatibility issues.

Installing Openbox from Debian

Installing Openbox in this manner is advised in order to guarantee stability and compatibility.

You can use the following commands to install Openbox:

sudo apt update

Output:

sudo apt install openbox

Output:

Openbox ought to produce a right-click desktop menu by default. If it wasn't generated automatically, though, you'll need to install an extra package by hand:

sudo apt install menu

Output:

You might then want to install the following two Openbox packages:

  1. obconf: A tool for dynamically managing Openbox configurations.
  2. obmenu: To modify the Openbox menus, use the Obmenu GUI tool.

Installing Openbox from the Source

Openbox is provided as free software, with the source code accessible to everyone. This makes it possible for experienced users to build and set up Openbox straight from the source code. This method is not advised, though, as it can interfere with other Debian packages and lead to unstable conditions.

We first require the following dependencies packages in order to compile Openbox:

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

Output:

Now, we use git to obtain the Openbox source code:

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

Output:

Go to the source directory of Openbox:

cd openbox/

Output:

To create the configuration script, run the bootstrap script:

./bootstrap

Output:

Run the following configuration script after it has been generated:

./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64

If above command not worked, use below command:

./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-dependency-tracking

Output:

The source code can now be compiled. Execute the subsequent command:

If make-tool is not present in your system make sure to install it with apt install make before running below command

make -j$(nproc)

Output:

After the compilation is complete, install Openbox:

sudo make install

Output:

Using Openbox

Now that Openbox is installed, we can use it. There are two methods for launching Openbox.

In a desktop environment that employs display managers such as KDM, GDM, or LightDM, the login screen allows you to select the Openbox session:

Login screen
Login screen

As an alternative, you can use the following command to launch Openbox:

exec openbox-session

This is also the recommended way to utilize Openbox for users of XDM. XDM will launch using Openbox by default if Openbox was installed prior to XDM.

Openbox Config Files

Openbox has several configuration files linked to it. All of the system-wide Openbox configuration files are listed in the following list:

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

Instead, the user-specific Openbox config files are listed in the following list:

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

Keyboard Shortcuts

There are several keyboard shortcuts available with Openbox:

  • Use this shortcut to logout of Debian: Ctrl+Alt+Delete
  • Use this shortcut to switch between open programs: Alt+Tab/ Super+Tab
  • Use this shortcut to switch between system controls such as Windows, Top Bar, and Desktop: Ctrl+Alt+Tab
  • Use this shortcut to directly switch between system controls: Ctrl+Alt +Esc
  • Use this shortcut to lock the screen: Super+L
  • Use this shortcut to get an overview of open windows: Alt+F1
  • Use this shortcut to open the Run command dialog: Alt+F2
  • Use this shortcut to close the current window: Alt+F4
  • Use this shortcut to select the current window for moving: Alt+F7
  • Use this shortcut to minimize or maximize the current window: Alt+F10

FAQs to Install Openbox on Debian 12

Can I install Openbox alongside my current desktop environment? 

Yes, Openbox can be installed alongside your existing desktop environment. You can select Openbox from the login screen's session options.

How do I switch between Openbox and my default desktop environment? 

On the login screen, click on the session or gear icon and choose "Openbox" or your desired desktop environment from the available options.

Can I customize the appearance of Openbox? 

Yes, Openbox is highly customizable. You can edit its configuration file (~/.config/openbox/rc.xml) to change themes, keybindings, and window behaviors.

How can I set keyboard shortcuts in Openbox? 

Open the ~/.config/openbox/rc.xml file, locate the <keyboard> section, and add keybindings following the provided examples. Save the file and restart Openbox for changes to take effect.

How do I configure multiple virtual desktops in Openbox? 

Open the ~/.config/openbox/rc.xml file, find the <desktops> section, and specify the desired number of desktops. Save the file, restart Openbox, and right-click on the desktop to switch between them.

Are there any additional packages needed to run Openbox on Debian 12? 

No, Openbox is a stand-alone window manager. However, you may want to install additional programs like a panel, file manager, or wallpaper manager for a complete desktop experience.

Which display managers are compatible with Openbox on Debian 12? 

Openbox can work with various display managers like LightDM, GDM, or SDDM. Choose the one you prefer or use the default display manager.

Conclusion

We hope this tutorial helped you understand how to install Openbox on Debian 12. Click here to read more about Openbox.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.