This is a guide to upgrading KDE from the 1.1.2 version that shipped with
Slackware 7.1 to the (then) just released KDE 2.0.1 that I wrote back in
2001.
It was originally published on userlocal.com.
Upgrading KDE 1.1.2 to KDE 2.0.1 on Slackware Linux 7.1
Since the release of KDE 2.0.0 a lot of people have asked me to help them upgrade their existing Slackware based boxes from KDE 1.1.2 (which ships with Slackware 7.1) to KDE 2.0.1 that can be found in the slackware-current tree. So instead of answering the same question over and over, I decided to write this article, and describe the entire procedure in detail. I hope you'll enjoy reading it and that it will be of use to anyone wanting to upgrade to KDE 2.
First of all you should be aware that the packages you need to install come from the slackware-current tree, and since that is the development tree things may not be completely in sync with your installed system. Usually the procedure I describe below works fine, but as the files in -current change quite often you may experience problems if your installed system is a lot older that the stock 7.1.
Since KDE 2 depends on very recent versions of some other libraries, these will need to be upgraded as well and a few new ones will need to be installed. This is not a difficult procedure, but it can lead to big problems if done incorrectly, so please follow the instructions carefully. The libraries in question are; glibc, qt and openssl.
Ok, let's get on with it.
Read it all through once before making any changes (just to make sure you know what steps are involved),
then start at the top again and do everything in the order shown.
And remember, BACKUP ANY IMPORTANT DATA NOW! An upgrade involves overwriting old files with new ones, installing completely new files and deleting some existing files completely. If there should happen to be errors in some of the packages or something fails or something unforeseen happens, then you could loose data. It is always a good idea to have recent backups before performing an operation such as this one. Make those backups NOW - you have been warned :-)
First of all make sure you have all the needed files before we begin.
Start by making a directory called /updates and then make sure you have
all of the following files in that directory (these should all be
downloaded from the slackware-current tree from the slackware ftp server,
I have shown what subdirectory the packages can be found in):
glibcso.tgz (slakware/a1/) ! glibc.tgz (slakware/d1/) ! qt2.tgz (slakware/kde1/) ! mesa.tgz (slakware/x1/) ! openssl.tgz (slakware/n1/) ! ksupport.tgz (slakware/kde1/) ! kdelibs.tgz (slakware/kde1/) ! kdebase.tgz (slakware/kde1/) ! kdeutils.tgz (slakware/kde1/) * kadmin.tgz (slakware/kde1/) * htdig.tgz (slakware/kde1/) * kdoc.tgz (slakware/kde1/) * kde-i18n.tgz (slakware/kde1/) - kdegames.tgz (slakware/kde1/) - kdepim.tgz (slakware/kde1/) - kdetoys.tgz (slakware/kde1/) - kgraphic.tgz (slakware/kde1/) - kmedia.tgz (slakware/kde1/) - knetwork.tgz (slakware/kde1/) - koffice.tgz (slakware/kde1/) -
You will notice that I have marked the packages with 3 different symbols
(!, * and -). Packages marked with '!' are packages that you MUST HAVE,
we cannot do this if you do not have those. Packages marked with '*' are
those that I consider very nice to have but not absolutely essential. And
the ones marked with '-' are the ones I consider to be optional.
If you don't know very much about what are in the packages and want to
make sure you have a complete KDE 2 desktop (and you have enough
diskspace) then install everything - at least install the packages marked
'!' and '*'.
For the purpose of this guide, make sure that the /updates directory contain ONLY the files shown above. This is important for some of the commands that I run at the very end of the guide.
Secondly, we are about to update some central system libraries and your
graphical user interface, so you should not be running said user
interface while we do this. In other words; exit from KDE completely and
use a plain textmode commandline to do ALL of the following. If your
system boots directly into X then change that to have it boot to a
textmode console (you can change it back when we are done).
To make sure that you boot to a text console and not X, use a text editor
(as the root user) to edit the file '/etc/inittab' and find the lines
that looks like this:
# Default runlevel. (Do not set to 0 or 6) id:4:initdefault:
These lines are close to the top of the file. The number in the second line is the important one - if it is set to 4 (as in my example) then your machine boots into X by default, and if it is 3 then you boot to a text mode console and type startx to start the GUI (this is what we want for now). Change the number to be 3 (or leave it like that if it is already 3) save the file, and reboot your machine. It is possible to do the entire upgrade without rebooting, but it will make it a bit more complicated so I will not describe that.
When your machine boots up it should present you with a plain text login
prompt. Log in as the root user (the administrator).
We are now ready to start the real upgrade process. This is where the fun
starts :-)
1. Change into the /updates directory where you stored all the files we need. Like this:
cd /updates
2. upgrade the glibc library like this:
/sbin/upgradepkg glibcso.tgz /sbin/upgradepkg glibc.tgz
wait for each command to finish before executing the next. When both commands have finished then run this command (it is not really needed, just a safeguard):
/sbin/ldconfig
Make sure you use the 'upgradepkg' command to do this. Glibc is a very important library to your system, almost all other software depends on it, so if you where to first remove the library with 'removepkg' then you would be unable to install the new one with 'installpkg' (in fact your entire system would then be quite useless - it is possible to recover from that situation, but trust me, it's not something you want to try). 'upgradepkg' makes sure to first install the new library before removing the files belonging to the old one, so do it like I show above!
3. By now we should have the new glibc library firmly in place. You may
want to reboot your machine at this point just to make sure that
everything is still working properly - this is the really critical part,
and if everything is still working by now then we should have no problems :-)
A reboot is not strictly required, but it's a nice little test. If you
reboot, then re-login as root and execute step 1 again, then continue
with step 4.
4. Now we need to get the new QT library in place. To do that, execute the command below:
/sbin/installpkg qt2.tgz
then when the command finishes run /sbin/ldconfig again (ldconfig updates
a system database of all library locations).
QT is the library that KDE uses to display all your icons, windows, drop-down
boxes (in short widgets). Versions of KDE prior to KDE 2.0.0 used QT version
1.44 but the new one depends on QT 2.2.x
Notice that contrary to the glibc upgrade we do not use the 'upgradepkg'
command. There is a very good reason for this. If you ever want to install any
KDE 1 applications, then you'll need to have the old QT 1.44 library present on
your system, using 'installpkg' installs the new library side by side with the
old one (this is true since the old package was named qt.tgz and the new one is
qt2.tgz) so you are able to run both new and old KDE applications.
Note: if KDE 2 applications seem to crash for no apparent reason after the upgrade
then it could be that it is still using the old QT 1.44 library. To fix this, find
the location where the new QT lib is installed (should be /usr/lib/qt-2.2.3) and add (or edit)
a line like this in /etc/profile :
export QTDIR=/usr/lib/qt-2.2.3
and restart KDE 2.
5. Next step is to install the mesa library. You may think that you don't need mesa, but you probably do. Some of the new KDE 2 programs are linked with that library and will not run if it's not installed. If you already have mesa installed, then just upgrade it like so:
/sbin/upgradepkg mesa.tgz
if you do not yet have mesa installed, then install it with this command:
/sbin/installpkg mesa.tgz
if you are not sure if you have mesa installed or not, then you can just
run the upgradepkg command and if that fails (it will tell you it cannot
find the old package), then run installpkg - if it succeeds, then all is
well :-)
Again run the ldconfig command (just to be sure).
6. The final library we need to install is openssl. Slackwares version of KDE 2
is linked with the openssl library, so if you do not install it some
applications will crash for no apparent reason (most notably the Konqueror
file/web browser).
Just like with the mesa library use 'upgradepkg' or 'installpkg' depending on
whether or not you already have openssl installed. Like this:
/sbin/upgradepkg openssl.tgz
if you do not yet have openssl installed, then install it with this command:
/sbin/installpkg openssl.tgz
And now you might as well just run ldconfig :-)
Now we have everything installed KDE 2 needs, so now we move on to the really fun part of actually installing KDE 2 itself.
Before we move on I want to give you a little warning.
I have performed this upgrade on quite a few machines, and in most cases
just upgrading the kde1 packages to their kde2 equivalents have worked
fine, but on a few machines it has caused some problems with kdm (the kde
login program) and a few other programs. The solution on those problem
machines has been to completely remove kde1 before installing kde2.
I suggest that we attempt to just do an upgrade, and if you experience
problems starting kde2, then follow the steps at the very end of this
guide to remove kde completely and make a clean install of kde2.
In any case, remember to backup important files so you do not lose data
if any of this fails.
If you choose to remove KDE 1 before installing KDE 2, then just change all my references to upgradepkg to installpkg instead.
In any case, your previous KDE 1 installation may not contain all the
packages of KDE 2, so if upgradepkg ever complains about not finding the
previously installed package (the one it's supposed to upgrade), then
just run installpkg instead to install the package.
In short: if upgradepkg fails, then use installpkg instead.
7. First we need to install or upgrade the ksupport package. It contain a lot of small utillity programs needed by kde 2. This is the command to do it:
/sbin/upgradepkg ksupport.tgz
8. Next on the list are the kdelibs package. This one contain all the essential libraries that KDE 2 needs to function. Do this:
/sbin/upgradepkg kdelibs.tgz
Now would be a good time to quickly run ldconfig again.
9. Now we just need to install the basic kde 2 programs and then we will have a minimum kde2 installation. Here's what to type:
/sbin/upgradepkg kdebase.tgz
Now we have all the essential stuff in place and KDE 2 should actually be able to run by now (although not all of its tools, documentation, games and such are installed).
Now it's time to decide how much of the optional KDE stuff you want to
install. I strongly recommend that you install the packages I marked with
a '*' as that will give you the most used KDE tools and the documentation
(notice that if you install the kdoc package, then you have to install
the htdig one aswell to be able to actually use it). If you have diskspace
enough, then go ahead and install all the rest of the packages, then later you
will not be wondering why you cannot find a specific feature ;-)
If english is not your native language, then you should very much
consider installing the kde-i18n package as that will give you the
ability to switch KDE2 to use a number of different languages other than
english.
10. The procedure for installing the rest of the packages is just the same as in step 7, 8 and 9. Just run upgradepkg with the package name as the only parameter (or substitute with installpkg if upgradepkg fails), and you should soon be enjoying KDE 2.
11. When the last package is installed, reboot your machine a final time and try starting your graphical user interface by typing
startx
you should now see KDE 2 in all its glory (note: it can take a while to start up the first time).
If everything works as it should, then log in as root and edit the /etc/inittab file back to its original setting (to boot text or GUI as before we started the upgrade).
Finally we are almost done. I promised a short note on removing kde completely and then performing a fresh install of kde2.
The easy way to do it is to go into your /updates directory and run this command to remove all the kde packages (this is the command I referred to when I said at the top that /updates should only contain the files for the update):
ls -1 k*.tgz | awk -F . {'print $1'} | xargs -i removepkg {}
if you type in the above line exactly as it is shown, then your system
should start removing all kde packages (you need to be root to do this).
When all packages are removed, then do a fresh install of them all with
installpkg (steps 7 to 11).
A faster way to install all the packages (now that you know the system is clean)
is to run these commands in /updates :
installpkg htdig.tgz
ls -1 k*.tgz | awk {'print $1'} | xargs -i installpkg {}
I hope you enjoyed reading this article and that you will enjoy using KDE 2. It is a huge improvement over KDE 1 and I think you'll be glad you upgraded.