Linux Format

A DESIGNER DISTRO

-

Linux distros are assembled in a modular fashion, which gives you the flexibilit­y to swap resource-draining components for faster lightweigh­t alternativ­es. The most important and often wasteful component in a desktop is the window manager that controls the placement and appearance of windows within the graphical interface.

One of the most popular ones is Openbox – it’s so bare you might not even notice it’s there! All you get is a wallpaper-less background and a cursor. An applicatio­n menu only appears in the right-click context menu. You can use the menu to launch applicatio­ns that run within windows with the usual controls and behave as you’d expect in any desktop. You can customise the window manager using the separate obconf configurat­or.

Lego it up

Besides the window manager, you’ll also need a file manager. We’ll use PCMANFM, which includes several useful features like network management and an impressive context menu without taxing resources. Openbox also lacks a panel, so we’ll use the lightweigh­t Cairo-dock and even the Xcompmgr compositin­g manager to add some polish to your lightweigh­t desktop. All these components are available in the official repositori­es of virtually every desktop distro and can be easily pulled using your package manager. After installing the components, you’ll have to instruct Openbox to assemble them into a desktop environmen­t.

Setting up Openbox is rather straightfo­rward as its display and behaviour is controlled by only a handful of files. There’s the autostart file, which contains the list of the other components that the desktop will automatica­lly run when it’s starting up. Then there’s menu.xml, which describes the content of the desktop’s right-click applicatio­n menu. Openbox’s main configurat­ion file that contains keybinding­s, virtual desktop settings and more is rc.xml. The global versions of these files exist under /etc/xdg/openbox.

Instead of tweaking the files there, you should first copy them to your current user’s directory with cp -R / etc/xdg/openbox ~/.config/ and then edit the startup file, like this:

$ nano ~/.config/openbox/autostart pcmanfm --desktop & sleep 2s pcmanfm --set-wallpaper=/home/bodhi/pictures/ wallpaper.jpg --wallpaper-mode=crop cairo-dock -o & xcompmgr -c -f &

In this file we’ve first invoked PCMANFM as the desktop manager. By default, PCMANFM will display icons for all files and folders in the ~/Desktop folder. If you want shortcuts for applicatio­ns on your desktop, you need to copy the respective .desktop files from /usr/share/applicatio­ns into the Desktop folder. The & symbol at the end of some lines tells the distro to run the program in the background and move on to the next item. Without this symbol, the distro would run the first line and wait until that program was completed before running the next line, which would prevent our desktop from loading.

We then pause the script for two seconds for

PCMANFM to settle down, before we invoke it again to draw the wallpaper. Next we use the -o option to force Cairo-dock to use the hardware-accelerate­d Opengl backend. The last line calls xcompmgr along with support for soft shadows and translucen­cy. It also enables a smooth fade effect when you hide and restore windows.

That’s all there is to it. Now log out and log back in, but make sure you change your desktop environmen­t to Openbox in the login manager. Now enter your authentica­tion details and you’ll be logged in to your custom Openbox-managed desktop.

You can now spend some time configurin­g individual pieces such as cairo-dock and even Openbox itself to your liking. Once you get the hang of creating custom desktops, you can replace components with alternativ­es. Try different docks, place widgets on the desktop with gdesklets, Conky or Gkrellm, or perhaps even an applicatio­n launcher like Synapse. Ultimately, there’s no better way to hack your way to a pleasantlo­oking desktop.

 ??  ?? You can edit Openbox’s config files by hand, but it’s more efficient to tweak the desktop’s behaviour via the obconf tool.
You can edit Openbox’s config files by hand, but it’s more efficient to tweak the desktop’s behaviour via the obconf tool.

Newspapers in English

Newspapers from Australia