Linux GUI toolkits

We’re going to examine 7 toolkits in just a minute after discussing how to deal with this topic. These 7 are:

Some people say that Linux is all about is choice. True or not: When it comes to toolkits, it’s usually the programmers who have to make a choice. They have to check if a toolkit provides all the features they want and if they feel comfortable with its syntax and so on. However this blog entry is not about recommendations for programmers (there’s probably enough material out there already).

From which perspective are we going to look at them, if not from a programmer’s? Simple! From the perspective of a distribution creator wannabe! ūüėČ

Distributions and toolkits

For a distro creator things are much easier here – he could decide at will or even decide not to make a decision for one but support several (or all) available toolkits instead. There are reasons why this makes sense. Many modern systems combine for example Qt and GTK+ since the users often “mix” applications of both TKs. You like the well-known VLC? Then you have Qt on board. Using GIMP, too? Not without GTK+! Thanks to the theming ability, you usually won’t even notice that your default applications relay on different toolkits.

However there’s also a very good reason not to provide several toolkits by default: They all use up valuable system resources! In the planing especially for a light-weight distribution, it’s a very good idea to make a decision towards one standard toolkit and package default applications which use this particular one.

However it’s not as easy as that in this case. There are lighter and heavier toolskits. Of course the lighter ones lack several features that the others provide. But even more importantly for us: There are huge differences in the number of applications available for each TK! Unfortunately it’s the lightest TKs which have the lowest number of programs using them… So let’s take a closer look at this post’s topic!

Test criteria

As I said before, we won’t examine the TKs in their technical aspects (or distinguish between toolkit, development framework, etc). Of course things like FOX not supporting themes can be very relevant when deciding on the right standard toolkit for our distro. But that’s beyond the scope of this blog entry.

We’re just going look at the various TKs in terms of how “heavy” the are. To do this, we compare the amount of drive space they need, how long they take to compile and how many dependencies they have. The first is done with the Arch Linux packages for the particular TK and the rest on a fresh Gentoo VM (emulating a single core 2.66 GHz pc with 2 GB ram and compiling with -j1) with just X11 installed. There are however a few things which make our comparison a bit difficult – for that reason I’ll explain each toolkit on its own first and provide a table at the end of the post.

Qt4

I thought about including Qt3, too, for a moment. Why? Well, it would have made a nice comparison on how much heavier Qt4 is and besides that, Trinity DE still uses it. But Qt5 is already on its way and so I decided to discard it.

Qt4 is one colossus of a TK! The Arch package (qt-4.8.2-3-i686.pkg.tar.xz) is 21.0 MB in size and 80.4 MB uncompressed!

It’s so big that it was split into smaller packages on Gentoo (qt-script, qt-bearer, qt-sql, qt-xmlpatterns, qt-opengl, qt-core, qt-phonon, qt-test, qt-declarative, qt-demo, qt-mobility, qt-qt3support, qt-svg, qt-dbus, qt-multimedia, qt-webkit, qt-openvg, qt-assistand, qt-gui). 115 packages have to be compiled and installed and 386 MB downloaded from the net to do this! The source code for Qt alone (qt-everywhere-opensource-src-4.8.2.tar.gz) is 234 MB in size; the total compilation process takes 3:20:45 of which Qt alone takes 2:32:14!

GTK+3

GTK+3 is not actually a stand-alone TK but in fact extends and as such depends on the older GTK+2.

The Arch package (gtk3-3.2.3-3-i686.pkg.tar.xz) is 6.6 MB in size (together with GTK+2: 13.3 MB) and uncompressed it needs 51.5 MB (together with GTK+2: 106 MB).

Building it on Gentoo means compiling and installing 89 packages whose source code is 132 MB in size of which the GTK+3 source makes up 12 MB (together with GTK+2: 24.6 MB. Compiling takes 45:51 minutes of which 5:37 are for compiling GTK+3 (together with GTK+2: 11:27 minutes).

GTK+2

The Arch package for GTK+2 (gtk2-2.24.10-3-i686.pkg.tar.xz) is 6.7 MB in size and 54.4 MB uncompressed.

To install it on Gentoo, 88 packages have to be built and 120 MB of sources downloaded. GTK+2 source code makes up 12.6 MB of that. Compiling the whole thing takes 40:00 minutes and GTK+2 alone takes 5:50 minutes.

GNUstep

GNUstep, being based on the objective-c language, has the disadvantage that the whole GCC needs to be recompiled with OBJ-c enabled on Gentoo. This is of course a very big factor, but while I wanted to mention it, I’ll subtract the GCC recompile on the comparison.

GNUstep consists of several packages by default. The Arch packages (gnustep-back-0.22.0-3-i686.pkg.tar.xz, gnustep-base-1.24.0-3-i686.pkg.tar.xz, gnustep-gui-0.22.0-3-i686.pkg.tar.xz, gnustep-make-2.6.2-2-any.pkg.tar.xz) are together 3.9 MB in size and 16.7 MB uncompressed.

Building on Gentoo means installing 93 packages for which 206 MB of source code needs to be downloaded (including GCC recompile) or 92 packages, 141 MB in size (without GCC recompile). The packages (gnustep-base-1.24.0.tar.gz, gnustep-gui-0.22.0.tar.gz, gnustep-make-2.6.2.tar.gz, gnustep-back-0.22.0.tar.gz) are 7,0 MB in size. Compiling takes 1:27:13 (including GCC recompile), 43:51 minutes (without it) and 4:22 minutes for GNUstep alone.

FOX

The Arch package for FOX (fox-1.6.40-1-i686.pkg.tar.xz) is 3.9 MB in size and 13.8 MB uncompressed.

Building it on Gentoo means compiling 6 packages whose source is 5.0 MB in size of which FOX’s source code makes up 4.3 MB. Compiling it all takes 5:59 minutes and FOX alone takes 4:49 minutes.

OpenMotif

OpenMotif’s Arch package (openmotif-2.3.3-2-i686.pkg.tar.xz) is 3.3 MB in size and 10.3 MB uncompressed.

Installing it on Gentoo means building 4 packages for which 6.7 MB of source code has do be downloaded, 5.9 MB of source for OpenMotif alone. Building it takes 3:29 minutes while OpenMotif alone takes 2:58 minutes.

FLTK

FLTK (pronounced “fulltick”) is a very light toolkit. It’s Arch package (fltk-1.3.0-3-i686.pkg.tar.xz) is just 1.0 MB in size and uncompressed it only takes 4.7 MB of space.

To install it on Gentoo, 7 packages have to be built, which needs 7.2 MB of source code downloaded from the net. 4.0 MB of which is for FLTK source. Building only takes 2:42 mintes and for FLTK alone it’s as little as 1:04 minutes!

Comparison

Toolkit Arch size Gentoo Src size Build time (h:m:s)
FLTK 1.0 / 4.7 7 pkgs 7.2 / 4.0 0:02:42 / 0:01:04
OpenMotif 3.3 / 10.3 4 pkgs 6.7 / 5.9 0:03:29 / 0:02:58
FOX 3.9 / 13.8 6 pkgs 5.0 / 4.3 0:05:59 / 0:04:49
GNUstep* 3.9 / 16.7 92 pkgs 141 / 7 0:43:51 / 0:04:22
GTK+2 6.7 / 54.4 88 pkgs 120 / 12.6 0:40:00 / 0:05:50
GTK+3** 13.3 / 106 89 pkgs 132 / 24.6 0:45:51 / 0:11:27
Qt4 21.0 / 80.4 115 pkgs 386 / 234 3:20:45 / 2:32:14

All sizes in MB.
*) without recompiling GCC for OBJ-C support
**) Including GTK+2

Conclusion

The winner and most light-weight toolkit is easily FLTK. It has the smallest installed size, smallest source and shortest compilation time, both including dependencies and on its own. Only in the number of dependencies it’s beaten by OpenMotif and FOX which are quite light-weight in the other aspects, too. With GNUstep things become a lot more heavy and GTK+ or Qt are of course full-blown toolkits which provide about every feature you’d need but are also very bloated.

We’ll drop FOX and GNUstep from now on, since there’s no working desktop environment using them at the moment (There’s a project to create a FOX DE, but it seems to be inactive since 2005 and √ątoil√® (GNUstep) is a mess right now) which makes them irrelevant for our purpose. There was of course some value in adding them to this comparison, though.

What’s next?

Before we go on with comparing TKs and DEs while running some standard applications somewhen next month, the next post will deal with creating a live-cd. This will be an essential task sooner or later and I also need it for “DDD”, one of Eerie’s sub-projects which was not yet revealed (don’t expect too much, though).

Advertisements

Linux desktop comparison (pt. 5): Exotic DEs

This is the final part of our desktop testing series. We’ll deal with the rather exotic desktop environments in this entry. Most of them are built on top of some unusual toolkits.

These are:

For test criteria and the basic Arch system, please refer to the first part of this test.

OpenCDE

OpenCDE was a project to recreate the proprietary Unix desktop CDE. However the original CDE has been open-sourced recently and OpenCDE is likely to be discontinued since its developers joined the developement of CDE. It is however a very light DE but also quite incomplete.

The OpenCDE desktop

Installation

pacman -S xorg-server xorg-xinit virtualbox-archlinux-additions libxpm
pacman -U opencde-620-4-i686.pkg.tar.xz

Statistics

Memory usage right after starting up OpenCDE (with a second login on tty2) and used disk space after removing pacman cache. Here are the values I got with cat /proc/meminfo and df respectively df -h:

Arch Linux + OpenCDE (620)
MemTotal: 1030652 kb
MemFree: 971424 kb
Buffers: 7348 kb
Cached: 28084 kb
Rootfs: 739756 / 723M
RAM used at startup: 59228 / ~58 MB
Disk space (less basic system): 85468 / ~83 MB

CDE

CDE or “Common Desktop Environment” is the original Unix desktop that was often bundled with retail Unix versions. It was quite innovative in its time but today it shows that the opened source code of the program is really dated (it was last worked on in about 1999). And while this DE is not extremely popular with Linux users, it does have a certain user base and is actively worked on again. It comes with the full load of tools that were part of the DE back then.

The CDE desktop

Installation

pacman -S xorg-server xorg-xinit virtualbox-archlinux-additions
pacman -U ncompress-4.2.4.4-1-any.pkg.tar.xz
pacman -U openmotif-2.3.3-archcdepatched-1-i686.pkg.tar.xz
pacman -U cde-git-20120828-1-i686.pkg.tar.xz

Statistics

Memory usage right after starting up CDE (with a second login on tty2) and used disk space after removing pacman cache. Here are the values I got with cat /proc/meminfo and df respectively df -h:

Arch Linux + CDE (2.2.0a-alpha)
MemTotal: 1030548 kb
MemFree: 956616 kb
Buffers: 8748 kb
Cached: 34344 kb
Rootfs: 756248 / 739M
RAM used at startup: 73932 / ~72 MB
Disk space (less basic system): 101960 / 100 MB

Equinox DE 2

The Equinox Desktop Environment is the result of a project aiming to create an extremely light-weight DE. It has been around for a while but never got much attention. With version 2.0 released this year the project proved to be alive even though many people thought that it was already dead. This new version is a huge step ahead: EDE 2 is now fully FreeDesktop.org compatible. It just offers a simple DE – no more, no less. A very promising project!

The EDE 2 desktop

Installation

pacman -S xorg-server xorg-xinit virtualbox-archlinux-additions libxpm
pacman -U edelib-2.0.1-1-i686.pkg.tar.xz
pacman -U ede-2.0-3-i686.pkg.tar.xz

Statistics

Memory usage right after starting up EDE 2 (with a second login on tty2) and used disk space after removing pacman cache. Here are the values I got with cat /proc/meminfo and df respectively df -h:

Arch Linux + EDE 2 (2.0)
MemTotal: 1030652 kb
MemFree: 959044 kb
Buffers: 8084 kb
Cached: 30896 kb
Rootfs: 832676 / 814M
RAM used at startup: 71608 / ~70 MB
Disk space (less basic system): 178388 / 174 MB

√Čtoil√©

√Čtoil√© aims to be a resource-saving, modular and easy to use DE. It uses the GNUstep toolkit and kind of resembles the Mac OS X style in many aspects. The last stable build is quite old now and the newest versions are not in usable shape right now (not even recommended by the developers). So if you like the idea of this DE, it’s more or less something to keep in mind for the future.

The √Čtoil√© desktop

Installation

I have not been able to compile and install it on a current Arch machine. The screenshot is from a modified Ubuntu version from 2009. It *might* be possible to get the DE to work with a current Arch system, but that would most likely be a lot of work and it surely is far beyond my skills. If anybody is up to that challenge – please tell me! I would be very much interested to get the last stable version 0.4.1 (spring 2009!) working!

Mezzo

Mezzo was a DE that tried to go new ways. It places control icons in all four corners of the screen; system-related items are in the upper left, file-management in the upper right, restarting / shutting down in the lower right and applications in the lower left. It avoids nested menus and tries to abandon the concept “the desktop is a folder”. This innovative DE was developed as part of the now discontinued SymphonyOS and was never really available outside of it.

The Mezzo desktop

Installation

I have not been able to compile and install it on a current Arch machine. The screenshot here is from the 2008 edition of SymphonyOS which was the only one I could still find on the net. There has been a 2011 release as well, but I had no luck finding it. Honestly, I have not even been able to even find the source code for Mezzo, the DE I’m actually interested in. Looks like it’s gone (which is a real shame). Perhaps it’s not gone for good?

Conclusion

We have two DEs that could not be tested this time; √Čtoil√© and Mezzo are interesting projects for sure but not available right now.
OpenCDE is really tiny in every aspect – with less than 60 MB of RAM needed and just about 80 MB installed (including Xorg)! However it also doesn’t offer much and is most likely dead. CDE does well with little more than 70 MB of RAM. It’s quite old now but actively developed again – yet it’s uncertain if it can be turned into a modern DE without breaking the CDE concepts. And then there’s EDE 2. This one is very frugal with about 70 MB of RAM needed. A great DE with a classical feeling perfectly fit for systems with low RAM.

What’s next?

The next entry will be a summary of all five parts of our test.