Mini KDE for a Lightweight Desktop

Do you need a memory hog of a desktop environment simply to run a few essential programs? This experiment says you might not.
kdebase

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.

kdepim

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.

KOffice

Nothing was done here, except for the addition of the -without-arts configure directive.

Final Results

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 NameMini KDEFedora
kdebase-3.4.1-1.0.kde.i386.rpm17,798,75527,736,762
kdelibs-3.4.1-1.0.kde.i386.rpm15,109,88218,140,844
kdepim-3.4.1-1.1.kde.i386.rpm9,864,43618,089,962
koffice-1.3.5-3.0.kde.i386.rpm 14,514,82614,276,427

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.

Figure 3. Konqueror for Mini KDE

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.

Conclusion and Credits

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

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

can you provide the mini kde

Anonymous's picture

can you provide the mini kde binary files for download??

vexed by daemons

box opener's picture

so we're talking about saving a few mb of diskspace here?

i'd love to know how to use a KDE app without the intractible 'lag' feeling which occurs on even modern machines, probably due to all the layers of abstraction built up ..first libc, then xlib, then qt, then kdelibs, then the app.. the feeling is similar to running OSX on my G3, and my G3 is a lot slower..

or how to use a KDE app without having to twiddle your thumbs for 30 seconds while waiting for a gravy-train of daemons to startup like kdeinit, kded, kcminit, klauncher, dcopserver, arts, ksmserver, knotify,etc.. it rains on the parade of otherwise-nice apps like konqueror or amarok in a dreadful way.

the problem seems to have been compounded with the move to 64bit, the sheer number of pointers means reading thru a hundred or two mb of libs which on a laptop hd is arduous torture at best.

its just funny to see apps written in "slow" scripting languages like TCL/Tk startup instantly and behave just as reponsively as those in "fast" C++, just due to the sheer number of abstractions that had to be built on top of C to be able to easily build usable/flexible apps like those of KDE..

So what do you recommend ..

Anonymous's picture

So what do you recommend .. ???

Speedup KDE

Anonymous's picture

Use Prelink it greatly speeds up KDE startup and application loading.

http://www.linuxforum.com/man/prelink.8.php

I use it and it halves the startup time.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix