Mini KDE for a Lightweight Desktop
The only pieces I wanted from kdebase were libkonq, Konqueror, Kicker and Kwin. I was able to exclude support for xinerama, jasper, arts, Java, GL, Samba, lm-sensors, mDNSResponder-devel and libraw1394-devel. I left out the wallpapers. I also removed sounds and templates, together with the dependency from the redhat-artwork package. But, I had to put them back, otherwise RPM couldn't make it to the end for reasons not clear yet.
Here, as I needed only KMail, Kopete and KNode, I removed a lot of programs: karm, knotes, kdgantt, kgantt, korn (mail notifier), kpilot, kmobile and ksync, kandy, kitchensync, kalarm, kresources, kfile-plugins, konsolekalendar, korganizer, wizards, kontact and plugins. Even the BuildRequires dependencies from bluez-libs-devel (Bluetooth) and gnokii (Nokia phone support) went away without problems.
Table 1 shows the sizes of the resulting binary packages, the first column, compared with standard RPMs for the same source versions from Fedora Core 4 or, for KOffice, Fedora Core 3 update repositories.
Table 1. Binary Package Size Comparison (sizes in bytes)
|Package Name||Mini KDE||Fedora|
To summarize, I went from a total of 78.24MB to 57.29MB for the four packages above. This is a 26.8% reduction in file size, which doesn't look bad at all, but the final space savings was only 20.95MB. The actual impact on disk space is better, however; Mini KDE required a bit less than 150MB. The regular packages for the same four bundles, plus the extra ones they carried along, came to just less than 340MB.
Keep in mind, these are my results from only the first trial, without changing or ever looking at the source code and maintaining full compatibility with my chosen distribution, all its updates and any third-party Qt programs. All the screenshots in this article show that the resulting binaries run without problems on Fedora Core 3.
You probably noticed that the only real savings come from kdebase and kdepim. This was expected. I haven't found out yet why KOffice came out slightly bigger, but I wanted to keep functionality, so I didn't remove anything from it. I simply rebuilt the package to make sure that my reduced kdebase and kdelibs were compatible with it.
As far as the other packages go, KDE is a bundle of many programs built on a common foundation. Even if you use few programs, that set of core libraries, dæmons and what-not cannot become much smaller. This is why kdelibs and part of kdebase remained almost untouched. At the same time, saying “I want only five or six applications, not 40” is what actually made kdebase and kdepim much smaller, almost without affecting the functionality of the remaining programs.
There are surely things that I have missed, tricks that I still have to learn and space for a lot more improvement in the method I have described. However, this was only a first test: the final goal, besides reducing the package size, is to make the compilation and packaging process of this Mini KDE as automatic as possible on every distribution. In this way, whenever new KDE or KOffice versions are released, they quickly and easily could be made available to all users with limited hardware and not enough skills to start from the source.
In order for this to happen, it is necessary to discover, collect and write down as much information as possible on how the items in the several subdirs files are related to one another, as well as any other optimization tricks. Suggestions are welcome!
I will continue to experiment in this area with the folks of the RULE and Ubuntu-lite mailing list, which I thank for their support and interest in this idea. You can find all the results and instructions for Mini KDE on the RULE Web page.
Special thanks also go to Luciano Montanaro, D. Faure and all the KOffice developers who provided much of the initial information to get me started.
Resources for this article: /article/8536.
Marco Fioretti is a hardware systems engineer interested in free software both as an EDA platform and, as the current leader of the RULE Project, as an efficient desktop. Marco lives with his family in Rome, Italy.
Articles about Digital Rights and more at http://stop.zona-m.net CV, talks and bio at http://mfioretti.com