I started using Linux a few years back now. In my learning path, I encountered myself with hundreds of possibilities to do whatever I wanted to do at several aspects, including the chance to get a system that looks how I want it to look. I am the kind of user who like to give a personal touch to what I use and, in the past, that wasn’t easy for me to do with my desktop.
When I finally was able to switch to Linux, I encountered myself with a pretty powerful combination: Openbox + Picom + tint2 + jgmenu; and when I finally gave them most of the personal touches I always had in mind, I made a tutorial at Medium for users like me that may want to have a desktop that looks both good, minimalistic and functional and don’t know exactly where to start. I initially wrote this article at Medium, but now I've decided to give it a shot here as well. All the settings I’ll provide here were done by me after a process of trials, errors, frustrations and successes while reading the guides to use the pieces I putted together to get to the results I’ll share. Everything is customizable beyond the customizations I’ll expose here and I encourage you to do some modifications on your own. The process of creating something as personal as your own desktop with your own hands can be a funny and gratifying process.
What is Openbox?
At the main page of its official wiki, Openbox is described as it follows:
Openbox is a highly configurable, next generation window manager with extensive standards support.
Openbox lets you bring the latest applications outside of a full desktop environment. (…) With support for the latest freedesktop.org standards, as well as careful adherence to previous standards, Openbox provides an environment where applications work the way they were designed to.
Openbox is a highly configurable window manager. It allows you to change almost every aspect of how you interact with your desktop and invent completely new ways to use and control it. It can be like a video game for controlling windows. But Openbox can also be kept extremely simple, as it is in the default setup, meaning that it can suit just about anybody. Openbox gives you control without making you do everything.
Openbox can be used as a replacement of the window managers on desktop environments like XFCE and Mate or it can also be the default one at LXQt (or at its predecessor: LXDE). But one of its most noticeable features is that it can be also used as a standalone solution without any desktop environment at all.
The latest stable version available of Openbox is the 3.6.1 and it was released in 2015. Openbox is open source and its source code can be found in its GitHub repository.
Its installation process is pretty simple and it can be found at the repositories of nearly every distro available nowadays. If you need help to install it or you want to get more info about it, one of the best places to get the help you may need can be its official wiki or the Arch wiki.
What is Picom?
Picom is a lightweight standalone compositor created for the X Window System. It is a fork of Compton (which is a fork of xcompmgr-dana, which is also a fork of xcompmgr) and it is suitable for use with window managers like Openbox that do not provide compositing effects on their own. If you want to learn more about its history, then you should visit this page or, if you are interested in knowing a bit more about it, you can check its page on the Arch wiki.
Picom is also open source and you can find its code at its GitHub repo. The version of Picom used for this tutorial was the 10.2–1 version.
What are tint2 and jgmenu?
At its Arch wiki article you can find that tint2 is described as a simple, unobtrusive and light panel for Xorg. It can be configured to include a system tray, a task list, a battery monitor and more. Its look is configurable and it only has few dependencies, making it ideal for window managers like Openbox that don’t come with panels to show action icons and/or tasks. It is open source as well and you can find its source code at its GitLab repo.
On the other hand, as you can read at its GitHub repo, jgmenu is a simple, independent and contemporary-looking X11 menu, designed for scripting, ricing and tweaking. It is hackable, has a simple code base and does not depend on any toolkits such as GTK and Qt, but uses cairo and pango to render the menu. It can optionally use some appearance settings from XSettings, tint2 and GTK; and it has UTF-8 search support.
The version of tint2 used for this tutorial was the 17.0.2 while, in the other hand, the version of jgmenu used was the 4.4.1.
What settings to use?
Settings for Openbox
Whether you choose to start Openbox from a display manager or not, the result will always be the same when it starts on its own. You’ll always get a black screen without anything else than a menu that appears when you right click anywhere inside of it… and it is completely normal. That is just the starting point and the goal of this guide is precisely to help you to turn that black screen into a good looking workspace.
The first thing you need to do is to install additional tools that we will use later like ObConf (to configure basic settings of Openbox), feh (to set the wallpaper), cbatticon (to have a battery icon for the system tray), volumeicon (to have a volume control applet available) and a network manager applet like, for example, nm-applet.
After that, you need to set up the list of applications that will run automatically when Openbox starts. There are, basically, two ways of doing this: one is modifying the Xorg autostart file and the another one is modifying the autostart file of Openbox itself. Either method you choose, the modifications are almost the same since both files use a similar format to specify the programs to load with Openbox; though I recommend to use Xorg autostart file specially when you don’t use any display manager at all and use Openbox’s autostart files when you do use a display manager.
If you choose to modify the autostart file of Openbox, just open or create the file ~/.config/openbox/autostart and paste the following inside of it:
If you had to create the file, don’t forget to make it executable (just to prevent any issue) by executing:
chmod +x ~/.config/openbox/autostart
But if you choose to modify the autostart file of Xorg placed at your home directory instead, just open the ~/.xinitrc file and put the following lines at the end of that file:
Remember that, as I’ve said, I strongly recommend you to use the Openbox’s autostart file when you use a display manager. I haven’t tested this last variant when a display manager is in use and I suspect that some issues may appear in that kind of scenario.
After that, you need to set up other aspects of Openbox like the theme you will use for it.
This part takes a little history time. I used Linux Mint in the past. It was the first distro I used for a long period of time and loved the Mint Y themes very much. Then I started using Openbox and I never was able to find themes for Openbox that somehow recreate how Mint Y themes look; so after a few months I came with a decent enough understanding of how Openbox themes are made and I created a Python script to generate themes for Openbox that look somehow similar to Mint Y themes. That script is still a work in progress, but it works decent enough for me at the moment I’m writing this; and you can find it following this link to its GitHub repo.
I currently use the dark red variant of the themes I created, but you can pick any other theme of your choice to set up Openbox using ObConf from the generated themes or from other sources like, for example, this GitHub repo, this webpage or from the following archived website. Now, to ease the process, I’ll just paste here the content of the file ~/.config/openbox/rc.xml I have created. That file is where Openbox stores and reads its settings, and the content of mine is the following:
Settings for tint2
As you may have noticed in the initial screenshot, I use two panels: one placed in the bottom of the screen and another one on top. I always use the top panel to place the applets, the clock and the action buttons to shutdown the computer, reboot it or finish my session; and then I leave the second panel to add a button to open the applications menu, show the list of running tasks in the middle of it and put a button to minimize/restore running apps. To achieve that with tint2, we only need to start two instances of it with different settings.
The first settings file you’ll need to edit is the default one. Just open ~/.config/tint2/tint2rc and replace its content with the following:
To finalize the configuration of the bottom panel of tint2, you’ll only have to place an image icon at your home directory with the name ic_menu.png. That picture file will be the source for the image that will be showed in the button of the panel to show the applications menu.
After that, you need to define the settings for the top panel. As you may have noticed after reading the list of programs that will run with Openbox, the file you need to create and edit is ~/.config/tint2/tint2rc_top. Just create it, open it and paste the following inside of it:
Settings for jgmenu
When you read the guides to set up jgmenu, you will find that it is pretty customizable and that you can give your own touch to it with ease. In my case, as I use a dark red theme for Openbox, I setted it to match that theme; but you can make it look the way you want by just following the guides to set it up.
My current setup for jgmenu requires three files. The first file you need to create or modify is ~/.config/jgmenu/jgmenurc. You only need to copy and paste the following lines inside of it:
The next file you need to create or modify is ~/.config/jgmenu/append.csv. Then just replace its content with the following:
After doing that, the last file you need to create is ~/.config/jgmenu/prepend.csv and, then, just replace its content with the following:
What we just did was to define the settings of jgmenu while adding some special items at the top and bottom parts of the menu that jgmenu will render. In the ~/.config/jgmenu/append.csv file is where we define the set of stuffs that will be showed in the bottom part of the rendered menu while at the ~/.config/jgmenu/prepend.csv file we define the stuffs that will be showed at the top part of the rendered menu. In this case, we are adding a search box on top of the menu while placing a button to finish the session and grouping other buttons to suspend, reboot or shutdown the computer from the menu on the bottom.
Picom settings
I left Picom as the last one because is the one I think that will cause more “troubles” outside of Arch. Even when its settings are almost the same everywhere, if you don’t use Arch, I truly recommend you to read the documentations of the distro you are using to find out the version they are currently distributing in their official repositories and find information of the settings available there for Picom. You will also have to read the docs and experiment a bit with the backends they provide to get to the best result for you. Another thing that you must have in mind is that the settings I’ll place here were made while using the newest versions of the backends and that some issues may appear if you use them with the legacy backends.
To set up Picom, all you have to do is to create a file named picom.conf and place it either at the ~/.config directory or at the ~/.config/picom directory. The directory you choose to place the file doesn’t make much difference, but it is usually located at ~/.config.
Once you’ve created the picom.conf file, just open it and put the following lines inside of it:
Additional recommendations
By following this guide and performing the aforementioned configurations, we are able to get a pretty good looking, minimalistic and functional workplace indeed; but we may be still missing some components like, for example, a file manager app, an application to configure GTK themes, a text editor, a calculator, a web browser or a media player. For those tasks and any other remaining customization tasks like, for example, customizing the mouse pointer, all I can say is that I encourage you to find the solutions that suits you the best.
Just in case you wonder, I personally use Nemo as file manager. I also use the GTK+ 3 version of LXAppearance to configure the GTK themes, Xed as text editor, galculator as calculator app, Chromium is my web browser, SMPlayer is my media player and I haven’t customized anything else… yet.
I hope this guide has been helpful for you and, please, always have in mind that the customizations I shared here were done by me to build my own environment and I decided to share them as a guide for people who may not know how to turn Openbox into more than just a black screen, for those who may want to customize Openbox quickly and for anybody else that may find here some piece of information they may find helpful. Feel free to modify the settings you find here as much as you want and, please, leave an upvote here and/or at the original Medium article if you found this article helpful.
Top comments (0)