Software & Apps Linux 64 64 people found this article helpful How to Install and Configure Openbox Using Ubuntu Try out a more minimal approach to your Ubuntu desktop by Gary Newell Writer Gary Newell was a freelance contributor, application developer, and software tester with 20+ years in IT, working on Linux, UNIX, and Windows. our editorial process Gary Newell Updated on November 12, 2020 unsplash / Mock Up Photos Linux Switching from Windows Tweet Share Email Since 2017 the Ubuntu Linux distribution has used GNOME as the default desktop environment. In most cases, this is a perfectly decent user interface that integrates well with countless themes and plugins. Sometimes, however, if you have an older machine you will want something a little bit lighter, such as Xubuntu Linux, which uses the XFCE desktop, or Lubuntu, which uses the LXDE desktop. Other distributions, like 4M Linux, use much lighter window managers, such as JWM or IceWM. You can make something equally as lightweight by using the Openbox window manager. This is a fairly bare-bones window manager that you can build upon and customize as you so desire. This guide shows you the basics of setting up Openbox within Ubuntu, how to alter the menus, how to add a dock, and how to set the wallpaper. As of Ubuntu 20.04, the Openbox menu configuration tool, obmenu, (covered later in this guide) was removed due to technical conflicts with other software. While it's still possible to install and use Openbox on Ubuntu, customizing the menus can only be done by editing more complex text files. Installing Openbox To install Openbox open a terminal window (Press CTRL, ALT, and T) at the same time or search for "TERM" within the dash and select the icon. Type the following command: sudo apt install openbox obconf Click on the icon in the upper-right corner, then log out. How to Switch to Openbox Follow these steps to switch to Openbox. From the login screen, select your username as you normally would. When the screen expands to let you enter your password, select the gear icon in the lower-right corner of the screen. A dialog will appear with the following options: OpenboxUbuntuUbuntu on Wayland Choose Openbox, then sign in as normal. The Default Openbox Screen The default Openbox screen is a fairly bland looking screen. Right-clicking on the desktop will bring up a menu. That's all there is to it at the moment. To start the customization process, bring up the menu and choose Terminal. Change the Openbox Wallpaper Here's how to change the Openbox Wallpaper. Start by setting your display resolution. Chances are, Openbox didn't get it right to start with. Open a terminal window, and run the xrandr command to set the display resolution: xrandr -s 1920x1080 You can also include a monitor refresh rate in there to set a specific one: xrandr -s 1920x1080 -r 60 Next, create a folder for your wallpaper: mkdir ~/Pictures/wallpaper Copy some wallpaper images into the folder. If you want some new ideas, check out Unsplash. Everything on there is high resolution and completely free to use. The program that we will use to set the wallpaper background is called feh. To install feh, run the following command: sudo apt install feh When the application has finished installing, type the following command for setting the initial background: feh --bg-scale ~/Pictures/wallpaper/<nameofpicture> Replace <nameofpicture> with the name of the image you wish to use as the background. This will only temporarily set the background. To set the background every time you log in you will need to create an autostart file, such as follows: cd ~/.configmkdir openboxcd openboxnano autostart Add your xrandr command to the file so that Openbox automatically uses the correct resolution. In the autostart file, enter the following command: sh ~/.fehbg & The ampersand (&) is incredibly important as it runs the command in the background, so do not leave it out. Altogether, it should look something like this: xrandr -s 1920x1080 -r 60sh ~/.fehbg & Add a Dock to Openbox While the desktop now looks a little bit nicer, it would be good to have a way of launching applications. To do this you can install Cairo, which is a fairly classy-looking dock. The first thing you need to do is install a compositing manager. Open up a terminal window and enter the following code: sudo apt install xcompmgr Now install Cairo as follows: sudo apt install cairo-dock Open the autostart file again by running the following command: nano ~/.config/openbox/autostart Add the following lines to the bottom of the file: xcompmgr &cairo-dock -o & You should be able to restart Openbox to make this work by typing the following command: openbox --reconfigure If the above command doesn't work, log out and log back in again. A message may appear asking whether you wish to use OpenGL or not. Select Yes to continue. The Cairo dock should now load and you should be able to access all of your applications. Right-click on the dock and choose the configuration option to play with the settings. Adjusting the Right-Click Menu This is the part that no longer works on Ubuntu 20.04. The issue was caused by Ubuntu's switch to Python 3. The obmenu utility uses an outdated piece of software only compatible with Python 2. As a result, the Ubuntu developers didn't add it to the 20.04 repositories. This may change sometime in the future. Here is how to adjust the right-click menu. Open a terminal again and run the following commands: cp /var/lib/openbox/debian-menu.xml ~/.config/openbox/debian-menu.xmlcp /etc/X11/openbox/menu.xml ~/.config/openboxcp /etc/X11/openbox/rc.xml ~/.config/openboxopenbox --reconfigure Now when you right-click on the desktop you should see a new Debian menu with an applications folder that links to the applications installed on your system. Adjust the Menu Manually If you want to add your own menu entries you can use the graphical application called Obmenu. Open a terminal and type the following: obmenu & A graphical utility will load. To add a new sub menu, select where you want the sub menu to be in the list and select New Menu. You will be asked to enter a label. To add a link to a new application, select the New Item. Enter a label (i.e. a name) and then enter the path to the command to execute. You can also press the button with three dots on it and navigate to the /usr/bin folder or any other folder to find the file or program to run. To remove items, select the item to remove and press the small black arrow to the right of the toolbar, then choose Remove. Finally, you can enter a separator by choosing where you want the separator to appear and selecting New Separator. Configuring Openbox Desktop Settings To adjust general desktop settings either right-click on the menu and choose obconf or enter the following in a terminal: obconf & The editor is split into a number of tabs as follows: ThemeAppearanceWindowsMove & ResizeMouseDesktopMarginsDock The Theme window lets you adjust the look and feel of the windows within Openbox. There are a number of default themes, but you can download and install some of your own. The Appearance window lets you adjust settings such as font styles, sizes, whether windows can be maximized, minimized, behavior codified, closed, rolled up, or present on all desktops. The Windows tab lets you see the behavior of windows. For example you can automatically focus on a window when the mouse hovers over it, and you can set where to open new windows. The Move & Resize window lets you decide how close windows can get to other windows before there is some resistance, and you can set whether to move applications to new desktops when they are moved off the edge of a screen. The Mouse window lets you decide how windows get focused as the mouse hovers over them, and it lets you decide how a double-click affects a window. The Desktop window lets you decide how many virtual desktops there are and how long a notification is shown stating that you are about to switch desktops. The Margins window lets you specify a margin around the screen whereby a window cannot pass over them. The Dock tab lets you control select settings for your dock. It's not referring to Cairo. Rather, these settings apply should you choose to install a more traditional panel, like Tint2.