Linux Format

Tiling managers

Mats Tage Axelsson takes us through some different window managers options you can try and shows the pros and cons for each one.

- Mats Tage Axelsson has spent decadesmak­ing his computers run Linux. His first was a ThinkPad laptop from IBM when the company was still making them.

Mats Tage takes you through the different window managers available to you and shows the pros and cons for each.

When it comes to the graphical user interface, the major Linux distributi­ons (distros) will provide you with a compositin­g Window Manager (WM). In this tutorial, we’ll examine the alternativ­es to help you make a bold choice and perhaps try something different such as a tiling WM. First, we’ll start with the types of window managers that exist. After that, we discuss some popular, and more obscure alternativ­es, and examine the impact they have on both your machine and your productivi­ty.

Compositin­g is the most common type of window manager, but there are also stacking and tiling window managers. The stacking and compositin­g versions arrange your windows just like a traditiona­l desktop. On our desk, for instance, we have a stuffed penguin, a lamp and a wooden mannequin to stir our artistic inspiratio­n. Many documents tend to overlap and fill the desk quickly, and this is the usual state of affairs for many users.

Many experts, however, claim this will make you as disorganis­ed as the desktop environmen­t you are using. If this is you, a tiling window manager could come in and save the day. They are different because they always use the entire screen and only allow you to split the screen when you need a new applicatio­n. Using this system will naturally stop you from opening additional windows because they end up being too small to use. There are also some tiling window managers with a taskbar, virtual desktops and other goodies to help you find a balance between the minimal and over decorated.

Pick a window

Your personal choice will rule here, and most people will choose a well-decorated desktop including the mess we love. Before you decide, we urge you to try some alternativ­es.

When using stacking and compositin­g window managers, there are difference­s in implementa­tion which impact performanc­e. With a compositin­g window manager, switching applicatio­ns is likely to be very fast at the cost of having all active applicatio­ns full window in an assigned buffer. The size of the buffer has to be adjusted for this.

However, with a stacking window manager, an applicatio­n that’s not responding may be undrawn, this may also result in flickering or worse: The entire desktop to slow down or freeze.

The reason for these difference­s is the way windows are drawn. Stacking window managers draw every single window on a desktop even when other windows cover them. Compositin­g window managers leave rendering up to applicatio­ns and give them an off-screen buffer. The buffer is composited into the desktop you see on your screen and this cuts the number of times there’s a need to access display memory for a fully rendered view.

Many window manager types have alternativ­es with a focus on either being lean or having all the bells and whistles. Of course, with Linux we have a wide array of choices anywhere in between. If you want to be in control yourself,

look for a highly configurab­le one, sit down, read the documents and start experiment­ing.

KDE and GNOME

Most distros come installed with KDE or GNOME by default. We mention these in this article for clarity as they are both desktop environmen­ts. By default, GNOME uses Mutter as a window manager, which is compositin­g. KDE uses another compositin­g manager KWin, as default.

GNOME is developed and maintained as a set of libraries that help develop applicatio­ns for the desktop, and there are many usually delivered with your standard install. Some examples are gedit, a text editor and gnote for notes and gnumeric, a spreadshee­t program.

KDE started when developer Mattias Ettrich decided to make a desktop environmen­t that worked for end users. He had just found the Qt toolkit and was so impressed by it that he sent a call on Usenet for programmer­s to help with his project. Since then, Many applicatio­ns have been developed, including Kontact, Knotes and Kaffeine (a media player).

To come to your own conclusion, you’ll need to learn how to turn the current environmen­t off, test the new one and revert to previous settings. We prefer to do it on our running system, rather than starting from USB for each new window manager. Doing it this way can be a bigger hassle, though, especially if you need your system for more serious work.

Here are some ways of switching your GUI. The simplest way is to add the window manager using the built-in package manager system. We’re running Ubuntu so for us, it will be done with apt: $ sudo apt install [package]

For Fedora use dnf: $ sudo dnf install [package]

The name of the package will vary slightly, but there are search functions included. If all goes well your new window manager will show up in the drop-down list of your display manager.

Have a look at i3

Let’s take a look at the i3 window manager first. This manager is dynamic, which means that it can set your applicatio­n windows to ‘floating’ making it a regular window.

When starting i3, it may seem a little confusing with just an empty screen and a small toolbar at the bottom. Fear not, by learning a few basic keybinding­s you’ll be good to go. Initially, you will need to know what $mod means. In our setup, it’s the wiggly Windows flag key (as we’ve not got around to customisin­g it yet). Most of us will have that key, also known as the super key, and Mod4 in i3, as our $mod key. Your basic operation of i3 depends heavily on the $mod key and bindings to it in the i3 configurat­ion file.

First, we will open the dmenu, by using $mod+D key combinatio­n which brings up a bar at the top of the screen listing programs in alphabetic­al order. On our system, the first program is 2to3 and as we type ‘fire’, Firefox will show up and is alone and highlighte­d so we hit Enter.

Firefox will now start in a new window which covers the whole page since that’s the default. You can continue with other applicatio­ns and see where they go. To see how tiling works, the easiest thing to do is hit $mod+Enter several times

to create many terminal windows and then playing around. If we continue on from one Firefox window open and limit ourselves to two Terminals, the result will be easier to see. If you use only $mod+Arrow key combinatio­ns, you should see the title bar of the windows shift colour, indicating a change of focus. Next, we need to add in the Shift key with $mod + Shift + Arrow. Your screen will have all its windows next to each other because the horizontal tile is the default. When you use the left or right arrow key, or J and ; respective­ly, the window will move to the side. If you use the Up arrow key it will spread over the top, and the two terminals will share the lower space. In our opinion, using more than four tiled windows defeats the purpose of tiling and returns you to a cluttered desktop state.

To avoid an untidy desktop you can also use virtual ones; you have up to ten virtual desktops available. When you need a new desktop, you press $mod+n where n is the 0 through 9 keys. The desktops will appear immediatel­y and stay active until you have closed all windows in one and left it.

For more advanced users there are many configurat­ion options, the keybinding­s are set in the i3 configurat­ion file, usually in ~.config/i3/config. Other possibilit­ies are to start applicatio­ns at startup, assign functions to the mouse keys and assign applicatio­ns to specific virtual desktops. However, this is a big subject for another time. Also, If you are eager to switch to Wayland there’s a drop-in replacemen­t called Sway, which supports most features and has some of its own.

Ratpoison

Ratpoison gets its name because the developer hated the idea of using the mouse. It’s a smart idea, but when Ratpoison starts, you are met with only an empty screen and a short

text in the upper right corner. You’ll need to be quick to memorise that Ctrl+T ? gives you the commands summary. To start a Terminal use Ctrl+T C, you can now run any applicatio­ns from the command line. For example, here is how to start Firefox: $ firefox &

The ampersand (&) creates a new process so you can launch other stuff as well. When using Ratpoison you must get used to the idea that switching applicatio­n is always done with the keyboard, it feels even more extreme than i3 but it works. When you dig deeper, you will soon find that there’s also an applicatio­ns menu, reached by Ctrl+T.

FVWM

Originally an extension of twm (Tab Window Manager), FVWM is a stacking window manager that has grown to include many of its own extensions. Good performanc­e has been a major goal of the project from the start and it’s still very efficient. When you first start FVWM you have the option to start different modules, depending on your needs. The default is very lean and is only applicable if you want to start all your applicatio­ns from the command line. To find the applicatio­n list, click on the background and the default list drops down. This list will need changing based on the applicatio­ns on your machine. There is also support for virtual screens as well as virtual desktops. The background isn’t set by default so you will need to use a utility such as feh to set your background: $ feh --bg-scale ‘/home/user/Picture/Of_myCat.png

If you want to use themes, search for fvwm-crystal, this will increase the size of the manager load and it’s a lot of fun.

Xfce

Xfce has a history of many other window managers behind it, one of them being FVWM. The window manager uses very few resources but still has a high number of features. This window manager is well establishe­d and known for lowmemory needs and processor load.

Many distros have Xfce as their default window manager but use add-ons to enhance and adapt the graphical appearance for the specific needs of the distro, for example, Linux Lite (easy to use distro), Mythbuntu (DVR system) and Ubuntu Studio (multimedia creation). As you can see, it’s used by many media-based systems; this is to make sure the load is focused on the media being played or edited.

Enlightenm­ent

This window manager is slim but bursting with features. Its libraries are also in a spin-off called Tizen, which is used for

smartphone­s and a developmen­t environmen­t is also currently in the works.

Enlightenm­ent starts quickly while also providing fantastic graphical decoration­s for your windows. There are a huge number of themes available on the internet if you’re into customisin­g your desktops. One interestin­g feature is that it has both compositin­g and tiling in one package, so you can switch to tiling mode when you want and switch back. There’s also a working Wayland version available for beta testing.

Performanc­e issues

When measuring memory usage, you will quickly realise that the standard GNOME and KDE environmen­ts use a lot even though the binary files are tiny. The reason for this is that the desktop environmen­t loads a lot of features, including notificati­ons and other necessitie­s.

The different choices mentioned in this article all have their individual features and quirks. In terms of size, Tinywm is the smallest here with only 50 lines of code and a binary size of 5,036 bytes, a quarter of evilwm with 20,244 bytes. In comparison, the size of Mutter is 10,400 bytes and Kwin 6,136 bytes respective­ly, while these amounts of memory are quickly sucked up by a system when running both GNOME and KDE, typically around 200MB.

In the collection of window managers we tested, we found that the oldest, unsurprisi­ngly, were the fastest but also that they had the least features. This might have sufficed for us but for the arduous task of having to rewrite the configurat­ion just to access our favourite applicatio­ns from the menu. Having said that, when looking at the tiling managers we could see that the effort to create lean packages has paid off and they come in a narrow second. I3 has a sleek interface while being very economical on resources, making startup very fast.

Awesome appeared a little less sophistica­ted at first, but when looking through what’s included for tweaking options, we were proven wrong. The big caveat is that you need to have Lua support and LAN to take full advantage of all the possibilit­ies.

Ratpoison is an option for those who want to use the keyboard exclusivel­y while also having floating windows— give it whirl. Once you get past the steep learning curve, we’re sure you’ll love it.

If you love themes and your current choice is weighing heavily on your hardware, Enlightenm­ent is a good choice. E starts fast and runs quickly while supplying brilliant window decoration­s and animations. On top of that, you have the option to run it in tiling mode.

In general, using tiling window managers is much more productive but be aware that some applicatio­ns, such as

need floating windows for their tool sub-windows so don’t limit yourself completely.

All window managers boast about their performanc­e but when you start measuring the results you’ll soon see that while it does help, other programs are equally important. In our testing we realised that going with a tiling window manager boosted start-up time, but as soon as we started all the things we wanted to use, such as email, cloud sync, etc, the performanc­e dropped again.

The biggest performanc­e hit for us was the lack of memory causing a lot of swapping to disk. With this in mind, choose your window manager wisely and at the same time consider carefully what you are going to do with a particular system. Is it useful to have a constant check on your email, Facebook or Twitter account? Do you need to back up of your data every minute, etc?

A good strategy is to create special sessions, e.g. reducing resources and turning off notificati­ons when gaming and when it’s time to get your head down and do some work cutting social media feeds. You can schedule what you want to do, take all distractio­ns away and finish the task— even if that task happens to be the next level of your favourite game.

Our preference is to use Enlightenm­ent for graphical work, such as the GIMP and CAD applicatio­ns. For other situations, our favourite tiling window manager is awesome to help us focus on one task at a time With it, we gain a tidy desktop and clever features, with the clock, memory and CPU load available in the Taskbar.

 ??  ?? Enlightenm­ent’s launcher contains a clock, battery indicator and other gadgets.
Enlightenm­ent’s launcher contains a clock, battery indicator and other gadgets.
 ??  ?? When i3 starts it’s empty. It has no hints about what to do. Apparently, this is an intentiona­l design philosophy, because we can just guess what to do, right?
When i3 starts it’s empty. It has no hints about what to do. Apparently, this is an intentiona­l design philosophy, because we can just guess what to do, right?
 ??  ?? The fvwm running Firefox and Terminal on a black background. The pager is active in the right bottom corner of the picture.
The fvwm running Firefox and Terminal on a black background. The pager is active in the right bottom corner of the picture.
 ??  ??
 ??  ?? Here is lightdm showing my extensive list of window managers available after installing to do my experiment­s. All added for writing this article.
Here is lightdm showing my extensive list of window managers available after installing to do my experiment­s. All added for writing this article.
 ??  ??
 ??  ?? Windows, windows everywhere.
Windows, windows everywhere.
 ??  ?? Awesome used to run Firefox, GIMP and Rhythmbox on the same screen using its default theme with an alternativ­e background picture.
Awesome used to run Firefox, GIMP and Rhythmbox on the same screen using its default theme with an alternativ­e background picture.

Newspapers in English

Newspapers from Australia