Getting Started with the openbox windows manager in Fedora

Openbox is a lightweight, next generation window manager for users who want a minimal enviroment for their Fedora desktop. It’s well known for its minimalistic appearance, low resource usage and the ability to run applications the way they were designed to work. Openbox is highly configurable. It allows you to change almost every aspect of how you interact with your desktop. This article covers a basic setup of Openbox on Fedora.

Installing Openbox in Fedora

This tutorial assumes you’re already working in a traditional desktop environment like GNOME or Plasma over the Wayland compositor. First, open a terminal and run the following command using sudo.

Curious about the packages this command installs? Here is the package-by-package breakdown.

openbox is the main window manager package

xbacklight is a utility to set laptop screen brightness

feh is a utility to set a wallpaper for the desktop

conky is a utility to display system information

tint2 is a system panel/taskbar

xorg-x11-drv-libinput is a driver that lets the system activate clicks on tap in a laptop touchpad

volumeicon is a volume control for the system tray

xorg-x11-server-utils provides the xinput tool

network-manager-applet provides the nm-applet tool for the system tray

Once you install these packages, restart your computer. After the system restarts, choose your user name to login. Before you enter your password, click the gear icon to select the Openbox session. Then enter your password to start Openbox.

If you ever want to switch back, simply use this gear icon to return to the selection for your desired desktop session.

Using Openbox

The first time you login to your Openbox session, a mouse pointer appears over a black desktop. Don’t worry, this is the default look and feel of the desktop. First, right click your mouse to access a handy menu to launch your apps. You can use the shortcut Ctrl + Alt + LeftArrow / RightArrow to switch between four virtual screens.

If your laptop has a touchpad, you may want to configure tap to click for an improved experience. Fedora features libinput to handle input from the touchpad. First, get a list or input devices in your computer:

In this example, the touchpad has the Tapping Enabled property set to false (0).

Now you know your trackpad device ID (11) and the property to configure (278). This means you can enable tapping with the command:

xinput set-prop <device> <property> <value>

For the example above:

xinput set-prop 11 278 1

You should now be able to successfully click in your touchpad with a tap. Now configure this option at the Openbox session start. First, create the config file with an editor:

vi ~/.config/openbox/autostart

This example uses the vi text editor, but you can use any editor you want, like gedit or kwrite. In this file add the following lines:

# Set tapping on touchpad on:
xinput set-prop 11 278 1 &

Save the file, logout of the current session, and login again to verify your touchpad works.

Configuring the session

Here are some examples of how you can configure your Openbox session to your preferences. To use feh to set the desktop wallpaper at startup, just add these lines to your ~/.config/openbox/autostart file:

# Set desktop wallpaper:
feh --bg-scale ~/path/to/wallpaper.png &

To use tint2 to show a task bar in the desktop, add these lines to the autostart file:

# Show system tray
tint2 &

Add these lines to the autostart file to start conky when you login:

# Show system info
conky &

Now you can add your own services to your Openbox session. Just add entries to your autostart file. For instance, add the NetworkManager applet and volume control with these lines:

#NetworkManager
nm-applet &
#Volume control in system tray
volumeicon &

The configuration file used in this post for conky is available here you can copy and paste the configuration in a file called .conkyrc in your home directory .

The conky utility is a highly configurable way to show system information. You can set up a preferred profile of settings in a ~/.conkyrc file. Here’s an example conkyrc file. You can find many more on the web.

You are now able to customize your Openbox installation in exciting ways. Here’s a screenshot of the author’s Openbox desktop:

Configuring tint2

You can also configure the look and feel of the panel with tint2. The configuration file is available in ~/.config/tint2/tint2rc. Use your favorite editor to open this file:

Like this:

I am not a computer professional, but rather am a finance and accounting ´s professional , but I am fond of everything that has to do with these things is my hobby, recently started using Fedora in version 15 (Verne) but I really like this distro up to the point of wanting to support in any way with Fedora.

19 Comments

Joao Rodrigues

Hello,

What about keyboard shortcuts? Does Openbox use the same shortcuts as Gnome?

I frequently use Ctrl+Alt+Direction to change Virtual Desktop or Ctrl+Alt+Shift+Direction to move the active window to another Virtual Desktop. Other shortcut that I use is Super+Direction to Maximize, Un-maximize, maximize to half left and maximize to half right.

Joao Rodrigues

Found a post where you configure keybindings to resize to half-screen (and quarter-screen) but it relies a fixed display resolution (so it won’t work if you connect to an external display with different resolution)

The official docs say that for MoveResizeTo action arguments like width and height, “You may also specify the {width,height} as a fraction or a percentage, eg 50% or 7/8.” That may allow it to dynamically configure to different screen sizes.

xmetax

The Openbox default keybinds for this are Shift + Alt + Direction. You can easily add your own keybinds in the $HOME/.config/openbox/rc.xml file. In case it wasn’t created automatically you may copy the /etc/xdg/openbox/rc.xml to $HOME/.config/openbox/ and use it as a template for your user specific customization.

xmetax

So, this worked pretty well and is only using 186 MiB of RAM. However, I installed under a fresh minimal install of Fedora 27, so adding packages like sddm (personal preference) and xterm were needed. Afterwards, I had to run ‘systemctl set-default graphical.target’ and ‘systemctl enable sddm’. I also had to add a user with useradd and set a password with passwd. Afterwards, rebooting shows the login screen.

Yes, the post assumes you have a active graphical session like Gnome (aka Workstation) or Plasma (aka KDE), nice to know that you were able to setup a working minimal desktop enviroment over your minimal fresh install and thank a lot to share the aditional steps you need to make it works.

LD

I use Openbox and Gnome on my machine. My regular season is pretty much default Workstation with the Arc theme. When I want to play a game with Wine, I switch to an Openbox session with X.
To make the look more consistent, I have installed Obconf to do settings – and the Arc theme for Openbox:https://github.com/dglava/arc-openbox
That makes for a good setup.
Also, I edit the rc.xml file for my keyboard shortcut settings. If you look for the section, you can see how it works.
I am used to do Alt-F2 for a runbox, so I install dmenu and set Alt-F2 to execute dmenu_run. Once you have s runbox, everything is available!

This is kind of a weird time to be pushing OpenBox, since (as people are discovering in the comments) it’s kind of an orphaned project. The version that’s currently in Fedora, 3.6.1, was released on June 1, 2015, and that’s also the last time the source code was touched at all.

OpenBox users like to say that it’s “feature complete” and doesn’t need any development, but the fact is that it has not kept up with recent developments in the Linux desktop world.

There is absolutely no Wayland code in OpenBox. (I don’t know how it even runs under Wayland, if it does I’m guessing it’s using the Xwayland compatibility layer?)
There is absolutely no HiDPI support in OpenBox. (There are some workarounds, as Daniel mentioned, but they tend to leverage X11-specific things like XRandR. Regardless, without direct support in the OpenBox code itself they will always be imperfect hacks.)

Most projects that have relied on OpenBox are looking for a path away from it, at this point, because they want to move onto modern technologies like Wayland and OpenBox isn’t prepared to come along for the ride. (Sway seems to get a lot of attention, as a potential replacement. http://swaywm.org/ )

Subscribe to Fedora Magazine via Email

Contribute to the Magazine

The opinions expressed on this website are those of each author,
not of the author's employer or of Red Hat. Fedora Magazine aspires to
publish all content under a Creative Commons license but may not be able
to do so in all cases. You are responsible for ensuring that you have the
necessary permission to reuse any work on this site. The Fedora logo is a
trademark of Red Hat, Inc. Terms and Conditions