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 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 distributions (distros) will provide you with a compositing Window Manager (WM). In this tutorial, we’ll examine the alternatives 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 alternatives, and examine the impact they have on both your machine and your productivity.
Compositing is the most common type of window manager, but there are also stacking and tiling window managers. The stacking and compositing versions arrange your windows just like a traditional desktop. On our desk, for instance, we have a stuffed penguin, a lamp and a wooden mannequin to stir our artistic inspiration. 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 disorganised as the desktop environment 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 application. 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 alternatives.
When using stacking and compositing window managers, there are differences in implementation which impact performance. With a compositing window manager, switching applications is likely to be very fast at the cost of having all active applications full window in an assigned buffer. The size of the buffer has to be adjusted for this.
However, with a stacking window manager, an application 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 differences is the way windows are drawn. Stacking window managers draw every single window on a desktop even when other windows cover them. Compositing window managers leave rendering up to applications 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 alternatives 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 configurable one, sit down, read the documents and start experimenting.
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 environments. By default, GNOME uses Mutter as a window manager, which is compositing. KDE uses another compositing manager KWin, as default.
GNOME is developed and maintained as a set of libraries that help develop applications 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 spreadsheet program.
KDE started when developer Mattias Ettrich decided to make a desktop environment 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 programmers to help with his project. Since then, Many applications 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 environment 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 application 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 keybindings 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 customising 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 configuration file.
First, we will open the dmenu, by using $mod+D key combination which brings up a bar at the top of the screen listing programs in alphabetical order. On our system, the first program is 2to3 and as we type ‘fire’, Firefox will show up and is alone and highlighted 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 applications 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 combinations, 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 ; respectively, 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 immediately and stay active until you have closed all windows in one and left it.
For more advanced users there are many configuration options, the keybindings are set in the i3 configuration file, usually in ~.config/i3/config. Other possibilities are to start applications at startup, assign functions to the mouse keys and assign applications 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 replacement 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 applications 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 application 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 applications 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 performance 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 applications from the command line. To find the application list, click on the background and the default list drops down. This list will need changing based on the applications 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 established 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.
Enlightenment
This window manager is slim but bursting with features. Its libraries are also in a spin-off called Tizen, which is used for
smartphones and a development environment is also currently in the works.
Enlightenment starts quickly while also providing fantastic graphical decorations for your windows. There are a huge number of themes available on the internet if you’re into customising your desktops. One interesting feature is that it has both compositing 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.
Performance issues
When measuring memory usage, you will quickly realise that the standard GNOME and KDE environments use a lot even though the binary files are tiny. The reason for this is that the desktop environment loads a lot of features, including notifications and other necessities.
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 respectively, 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, unsurprisingly, 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 configuration just to access our favourite applications 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 sophisticated 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 possibilities.
Ratpoison is an option for those who want to use the keyboard exclusively 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, Enlightenment is a good choice. E starts fast and runs quickly while supplying brilliant window decorations 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 applications, such as
need floating windows for their tool sub-windows so don’t limit yourself completely.
All window managers boast about their performance 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 performance dropped again.
The biggest performance 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 notifications 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 distractions away and finish the task— even if that task happens to be the next level of your favourite game.
Our preference is to use Enlightenment for graphical work, such as the GIMP and CAD applications. 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.