...making Linux just a little more fun!

<-- prev | next -->

Windows Defectors: Upgrading a KDE Installation to Version 3.3

By Tom Brown

[This article is a follow-up to this TAG thread]

There's an old joke about how a burgler makes a cake. The recipe begins "To bake a cake, first steal two eggs". Of course, if you really don't want to do any baking in the first place, and all you really wanted was a simple pre-packaged cupcake, all this recipe stuff (not to mention hunting down the different ingredients needed) may be more trouble than it's worth. Occasionally, that's been my experience migrating from Windows to Linux. One such occasion has been my recent attempt to upgrade KDE from version 3.1 to 3.3. Only in this case, the instructions were: "To install KDE, first find one recipe".

Now, Windows users are a picky bunch. We expect to double-click on an icon, usually "setup.exe", and everything works automagically. The logic of what to uninstall, what to install, and what questions need to be asked of the person doing the installation, are all built into the process. With KDE, there's no such thing. Apparently, nobody feels it's needed, despite the multitude of different packages which must be installed (and uninstalled) in a particular order. But some sort of automation is desperately needed here. There is no excuse, in my opinion, for the installation of software to be difficult. Now, a lot of people who read LG will wonder what the fuss is about. This is Linux, after all, and you need to learn how to do all this. At the risk of being called a troll, I say that's just the wrong attitude to have. Installation (of device drivers as well as software) is an area in which Linux still has a very long way to go. I don't want to bake the cupcake, blast it, I just want to eat it!

First, my thanks go to Faber Fedor for pointing me in the right direction in my KDE upgrade. There are days when my googling skills fail me miserably, and I appreciate Faber's help. I still didn't have an easy time doing the upgrade, and haven't gotten everything working (a few tiny annoyances still remain), but on the whole I managed it.

Technical details: I'm running SuSe 9.0, with the original KDE 3.1 installation that came with the distro. I upgraded using the binary RPM files from the SuSe website. That website still claims the files are for KDE version 3.2, when in fact most of them are now for version 3.3 (dated August 19, 2004). Unfortunately, the KDevelop RPM there has not been updated, and won't install into KDE 3.3. That's one I'll tackle later, since for the moment, I don't need it. Using RPM files built specifically for your distro is the easiest way to do the upgrade, but if you can't find any, then you'll either have to build from source or wait for the right RPMs to become available. Notice that I'm installing the KDE development packages. Even if you don't intend to do any software development in KDE, some of this might be needed if you install software from the sourcecode.

Before beginning, you should backup your system. If you're using drag-and-drop to do this, remember that the ".kde" directory in each user's home directory is normally hidden, so make sure you're showing hidden files in Konqueror before doing so.

Now, because I'm a Windows Defector using SuSe (and therefore, Yast2), I did the entire installation from inside KDE, not the command line. I had to do one extra step at the end to compensate for this rash and risky approach, but the benefit was double-clicking on the RPM file to perform the installation, instead of all that command-line nonsense (sorry, it's a Windows Thing).

Now it's only fair to tell you that a lot of folks recommend a different procedure for installing KDE. First, boot to the Linux command line instead of the GUI. In SuSe's Yast2, click the "System" icon, then the "Runlevel Editor" icon. Select the "Expert Mode" radio button in the subsequent dialog box, then change the drop-down list from "5: Full multiuser with network and xdm" (or what is called "runlevel 5") to "3: Full multiuser with network" (or what is called "runlevel 3"). If you're not using SuSe, then you'll have to edit the bootup runlevel setting in the file "/etc/inittab". Either way, the next time you reboot the machine, you'll get a command-line logon prompt, instead of the GUI one. From here, logon as root, uninstall all of KDE (and QT as well), install the new KDE (in the order I'm about to present), and reset your logon to runlevel 5. If you're running SuSe, you can do this from Yast2, either directly from the command line, or through the GUI by using the command "startx" to run the X server, and KDE. Now that Yast2 has been released under the GPL, hopefully it will be more widely available.

Note: Read this entire document carefully before trying any of it on your computer! Make sure you have all the materials necessary, and don't close any windows or reboot until you're done.

The order in which you install KDE is important, no matter how you do it. The first thing that gets installed isn't KDE, but QT, which is the graphics layer beneath KDE. Install the package "qt3.rpm". In SuSe, this is done by double-clicking on the file's icon. Trying to install this package results in a lot of dependency warnings/errors, which is to be expected for such a low-level package. In Yast2, a dialog box will list these dependencies, and offer three alternatives: don't install, force the install, ignoring the dependencies, and remove the offending packages. The dependency problem with qt3 is primarily with qt3_devel and qt3-non-mt. You're going to replace those two anyway in a moment, so go ahead and remove them before installing qt3 (forcing the install may also be ok in this circumstance, but I thought removal was safer. It might not make any difference). Before you do, though, take a good look at the dependencies on your machine. If you see anything other than QT or KDE stuff in that list, stop right there until you know what it is you're removing. On my machine, Yast2 informed me that 20 packages were in conflict, every one of which being some part of QT or KDE that was going to be replaced anyway.

Once "qt3.rpm" is installed, go ahead and install "qt3-devel.rpm", followed by "qt3-non-mt.rpm". QT has now been updated.

You now have to update arts, the audio support used by KDE. Install "arts.rpm", followed by "arts-gmcop.rpm", and then "arts-devel.rpm. I'm not sure if these last two have to be done in that order, but that's what worked for me.

Next on the agenda are the KDE libs. First install "kdelibs3.rpm", and then "kdelibs3-devel.rpm"

We're getting to the good stuff now. Install the file "kdebase3.rpm". Once more, you will get dependency errors. Two of these, the kate text editor and the konqueror browser you can safely remove, as you're going to replace them with 3.3 versions anyway before you're done. The nasty bit in my case was the reference to "kdebase-suse", which isn't part of the KDE release, but an add-on in the original SuSe distro. In this case, I simply forced the installation, ignoring the error, and Nothing Bad Happened.

Install the file "kdebase3-devel.rpm" to finish the base installation.

Now, re-install kate with "kdeaddons3-kate.rpm" and konqueror with "kdeaddons3-konqueror.rpm", so you don't forget.

Finally, install the remaining KDE packages. It doesn't matter in which order.

If you performed the upgrade from within KDE, as I did, you need to do one more thing, or you'll see lots of error messages that say "Unable to create io-slave". Delete the directory "/tmp/kde-user", where "user" is your login id (for example, I had to delete "/tmp/kde-tbrown"). Log out then back in to restart the X server and KDE. The upgrade is done.

My KDE upgrade works just fine, except for the KDevelop and screensaver issues. I did install an updated "kdeartwork3-xscreensaver.rpm" file, but there must be something that I missed. One additional oddity is that windows generated by Superkaramba are now always on top, with no setting I could find that would make them behave like any other window. Obviously, something has changed between version 3.1 and 3.3 in the way KDE treats those windows, since they worked fine before the upgrade.

I may be in the minority here, but I'd welcome a single-file installer for KDE, however large it would have to be to include all the necessary pieces. Most Linux programs don't need an installer, but KDE isn't one of them. Still, with a little information and experimentation, I managed to do without.


[BIO] Tom has been a software developer since the early days of the Commodore 64, with such commercial classics as Prototerm-64 and Colorez-128, and has seen lots of operating systems come and go. Every one he's liked is either discontinued (OS/2) or out of business (Commodore Amiga). He currently likes Red Hat Linux, which won't be supported after April '04. As a result, we've been trying to get him to fall in love with Windows, but so far no luck.

Copyright © 2004, Tom Brown. Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 106 of Linux Gazette, September 2004

<-- prev | next -->