Mini KDE for a Lightweight Desktop
Many users need computers only for basic office productivity, Web access and e-mail. Free software for all of these tasks exists, but it has a hidden cost. Often, students, schools and charities can afford only hardware that is five or more years old, with limited CPU power and disk space. As weird as it seems, the latter often is the most serious, apparently unsolvable problem. You may need only five or six small programs, but they are available only in big bundles, which in turn have many more dependencies. The real, total space requirements can be heavy enough to make the installer abort for lack of space.
Often, installing current but feature-light applications is useless. Desktop computers are communication tools. Today, that means, at least, digital signatures, IMAP support, checking one's bank account by way of SSL or XHTML Web forms and so on. It also means support must be provided for OpenDocument, an office file format, default in OpenOffice.org 2.0, that has raised great interest in the European Union and soon will become an ISO standard.
Installing older distributions is useless for the same reasons and is dangerous to boot: why would people go on-line and expose themselves to a bunch of security holes that have been known about for years? Furthermore, free on-line support for five- and six-year-old code is practically nonexistent, unless you have the time and skills necessary to hack together a fix for yourself.
All this is why, a few years ago, I and others started the RULE Project—to make it possible to use old hardware with current, mainstream GNU/Linux applications by installing only what truly is needed. Our approach, however, offers several advantages to modern hardware as well. First, the RULE Project makes it easier to run any computer at its greatest possible speed.
The second advantage is running normal x86 software with something built today that is much smaller and less power-hungry than a laptop. Last year, a user working to make a desktop box out of a Norhtec Microclient wrote that he “was delighted to see that RULE provides ALSA, Udev and all the other up-to-date goodies...in only 232MB...because Fedora 3 provides them”.
The third big stimulus to trim down modern programs also has nothing to do with vintage computers: bootable Linux CD-ROMs and USB drives are great as portable emergency desktops but require little space.
There is one final reason why all this exercise is worthwhile, but it is of interest only to KDE developers and packagers, so I'll mention it later.
What are the characteristics of a useful yet lightweight desktop? To me, they are the ones just mentioned. This is why I decided to re-package together KOffice, Konqueror, KMail, KNode and almost nothing else.
KOffice does not have as many features as does OpenOffice.org, but it is much lighter, is less reliant on Java, is more integrated with Linux and could, some day, share single-file SQL databases with OpenOffice.org (see the on-line Resources). Above all, KOffice's roadmap officially foresees full support for OpenDocument. The result, which we hereby call Mini KDE, must require the smallest possible disk space and RAM to run. The rest of this article summarizes what I did to achieve this goal.
I wanted to end up with binary packages, because many desktop end users don't know how to compile by themselves, and it would be time consuming to do it on six- or seven-year-old boxes (if not impossible, because compiler, libraries, source code and intermediate compilation files would, again, not fit on a smaller hard disk). Generally speaking, one can obtain optimized KDE packages by using three different methods:
Optimize the source code of the application(s) and related libraries with the proper compiler options.
Compile, package and install only selected pieces of the bundle.
Configure the result so that applications start and run more quickly.
The last method can or must be applied even after installation. For KDE applications, it already is documented in the KDE performances tips page (see Resources).
The first method is distribution- and compiler-dependent; it's also beyond the skills of nonprogrammers such as myself and most general users. Another problem is almost no related information is available on-line; even asking on developers lists didn't turn up much more help. Carried to the extreme, this method also implies compiling against a custom version of Qt, stripped as discussed on the RULE Web site, which is almost like creating yet another distribution. From my point of view, however, the biggest limit of this method is that it does not greatly reduce the size of the whole package, which we saw as the first obstacle.
The most promising strategy, and the one I discuss in the rest of this article, is the second one—to leave out as much as possible from the original bundles in a way that minimizes effort, required skills and risk. The explanations that follow are based on building RPMs for Fedora 3, but the general procedure is valid for every GNU/Linux distribution or packaging format. Apart from the biggest space savings, another great advantage of this method is the resulting binaries remain compatible with Fedora Core or whichever other mainstream distribution you started with.
Articles about Digital Rights and more at http://stop.zona-m.net CV, talks and bio at http://mfioretti.com
- Geek Guide: The DevOps Toolbox
- Nmap—Not Just for Evil!
- Download "The DevOps Toolbox: Tools and Technologies for Scale and Reliability"
- High-Availability Storage with HA-LVM
- Resurrecting the Armadillo
- DNSMasq, the Pint-Sized Super Dæmon!
- Real-Time Rogue Wireless Access Point Detection with the Raspberry Pi
- March 2015 Issue of Linux Journal: System Administration
- Localhost DNS Cache
- Days Between Dates: the Counting