The installation of the K Desktop Environment
Author: Bram Schoenmakers
Translation by: Donn Ingle
Revision: 1.0
Copyright © 2004 KDE-nl team
Introduction
What is KDE? On www.kde.nl it is described as "A handy graphical work environment with a shining appearance and can be customized to the smallest detail. It contains programs for file-management, contacts, e-mail, a web-browser (Konqueror), etc."
There are several ways to install KDE. One is easier than the other, but when you invest more time, you get a more optimal KDE in return. This document describes the different methods by which you can install KDE, from automatic installation to CVS-installation.
What do you need?
-
A computer that isn't too old. In principal you can run KDE on a Pentium 166 with 64MB RAM, but 128MB is recommended to get good performance. If you have less than 64 MB there are still, fortunately, some alternatives. One such is Windowmaker (http://www.windowmaker.org/). This environment is lighter than KDE, but to run programs like OpenOffice.org or Mozilla you still need heaps of memory. In truth, you can use KDE-variants under KDE just as effectively on the same amount of memory.
-
A working Internet connection. It's easier to do everything from Linux, but you can also download the necessary KDE components from another operating system and then move them to Linux to install later. This document assumes that you have a working Internet connection under Linux.
-
Some KDE programs require that you have other programs pre-installed. When you install KDE from your distro, this gets handled automatically. When you install from source-code, the configure script will indicate which other programs you need before compilation can begin.
The modules
arts – This module takes care of the sound in KDE. Install this one before you install kdelibs.
kdelibs – The heart of your K Desktop Environment. This is a compulsory component.
kdebase – This module contains the programs that allow you control, like a desktop, a taskbar, a file manager and a web-browser (Konqueror).
kdepim – Programs to allow e-mail (KMail), planning (KOrganizer) and synchronizing of your handheld (mobile telephone) with KDE (KPilot, Kitchensync).
kdenetwork – Programs that you will probably want when your computer is connected to others (like the Internet). This contains, amongst others, instant messenger for various protocols, news-tickers and chat-programs (KsIRC).
kde-i18n – This module contains all the translations for KDE programs.
kdemultimedia – Get the best out of your system with this KDE multimedia package. These modules integrate all kinds of video and audio into your KDE environment.
kdeedu – Educational programs. Various material to help you learn foreign languages or to draw complex geometrical constructions with KIG.
kdetoys – Little programs that have no real function but are fun to have, for example KWeather. This toy displays the weather from any part of the world and can be placed in your taskbar.
kdeaddons – Extra supplements for tools that are already installed, this includes for example a number of plugins for Konqueror.
kdeutils – Useful programs that you will need, like a calculator (KCalc) or a compression program (Ark).
kdegames – This module contains games ranging from monopoly to various card games.
kdegraphics – Contains various graphics programs and viewers for many kinds of file formats. It also contains a real 3D-modelling program (KPovRay).
kdeadmin – Contains programs to ease the life of a system's administrator. With these you can easily control users and groups (KUser) and your system startup (KSysV Init Editor).
kdesdk – Contains programs to make the life of a software developer a little easier. Here you will find, amongst others, a frontend for diff (Kompare) and for cvs (Cervisia). For software translators there is KBabel, a program to allow easy editing of .po files.
kdeartwork – Your friends, naturally, must see that KDE is an amazing environment to work in. Conjure the most beautiful wallpapers, screensavers and skins on your screen.
The easiest method – via your distribution
Introduction
The easiest way to install KDE is to let your distribution do the work. This differs per distribution. In most cases, KDE makes part of a standard installation, and there's a chance it's already the default environment.
If KDE doesn't load automatically after booting your system, you should change your boot options. It is frequently made possible by means of a graphical installation screen. SuSE has the program YaST, and Mandrake has the Mandrake Control Center (mcc). Consult the documentation of your distribution for more details.
Advantages
-
It takes very little effort, everything gets done for you. Within a few minutes your K Desktop Environment will be ready for use.
Disadvantages
-
It's not optimized for your system (e.g. for your processor)
-
Your distribution will (most probably) have changed the graphics and colours to suit their identity.
The easy method – Installing RPMs from the Internet
Introduction
Another easy method is to install from RPM files that you have downloaded. An RPM can be seen as a package with files within it. You install this package with the rpm command.
The installation
-
Surf to http://download.kde.org and choose the appropriate mirror. You'll find the most local mirros at the top of the list, choose one from there.
-
Following the link from 1, open the folder stable and then latest..
-
Check that your distribution is listed here. If your distribution is not listed here, you should build from source-code by means of Konstruct; open the src folder and then read the instructions below (i.e. not these RPM instructions) to continue the installation.
-
Depending on your chosen distribution you will find many folders:
RedHat/Fedora and SuSE: You should find folders named for processor types. Choose the one you have. If you have Intel or AMD then choose the folder called ix86. The various versions of KDE are then arranged within that folder.
Debian: You can find .deb files for you Debian distribution here. -
Download the RPM files to your hard drive. To see what modules you need to download, refer back to the description of the modules in this document (above).
-
From a terminal, login as root and go to the folder where you saved the RPM files.
-
Enter the following command:
rpm -Uhv module1.rpm module2.rpm module... etc.
Supply the correct names of the modules that you want to install. The list can be as long as you like, it depends on what you want to have installed. If all went well, then your startup settings should default to the new KDE.
If you have trouble with strange error messages, follow these steps: As root, type:
rpm -Uhv --force module1.rpm module2.rpm mod... etc.
-
Depending on your distribution you may need to perform further steps, for SuSE you'll need to run SuSEConfig.
Advantages
-
It requires relatively little effort to install KDE.
Disadvantages
-
KDE is not get fully optimized for your system (e.g. for your processor)
-
It can take a long time to download all the RPM files on a slow connection, and everytime you want to upgrade, you have to fetch all the RPM files again.
The difficult method – Automatic compilation from source-code using Konstruct
Introduction
You can also take a middle course with the program Konstruct. With Konstruct you compile the source-code, helped by an automatic process. This way, you get the advantages of compilation without expending too much effort.
The installation
-
To start using Konstruct, first download it from http://developer.kde.org/build/konstruct/stable/konstruct-stable.tar.bz2.
-
Open a shell and unpack it (tar xvjf konstruct-stable-tar.bz2) and enter the directory created (konstruct).
-
First you must check if your system is ready to install KDE. Go to the misc/detektive folder and issue a make install. A list will appear of the components that you need to install. You'll also need gcc-c++, which is probably not listed.
Note: This seems to work only for SuSE and Mandrake. You can check the requirements on http://www.kde. org/info/requirements/ if you use another distribution. -
Return to the main directory of Konstruct (cd ../../)
-
Next, you can affect the entire installation process by editing the gar.conf.mk file. On line 38, you can change the prefix, this is the place where KDE will be installed. Ensure that you have access rights to this prefix. You can also supply parameters to the compiler with the OWN_CFLAGS variable (lines 95 or 97), for e.g. you can specify your processor. Normally, these flags are ignored in the process, but by removing the # signs from the OWN_CFLAGS that you choose, they are activated. You can make any necessary adaptations to these flags.
-
Everything is ready to begin. Go to meta/kde and type make. All KDE modules and the necessary dependent programs are downloaded and compiled. All that is left now is a long wait...
-
Not everything gets installed in step 6, for instance the language modules. From the main directory go to i18n/ and then choose the sub-folder that matches your language. Inside that sub-folder, type make. The language module will now be downloaded and installed.
-
KDE is finished and ready to start. Log in as root and make a file in /usr/X11R6/bin called konstruct.sh with the following contents:
#! /bin/sh export QTDIR=<prefix> export KDEDIR=<prefix> export LD_LIBRARY_PATH=<prefix>/lib export PATH=<prefix>/bin:$PATH startkde
Replace the text <prefix> with the prefix that you used in gar.conf.mk. The standard is the folder kde.3.2.1 (Or whatever version is current) in your homedirectory (/home/name).
-
At the prompt type
chmod +x /usr/X11R6/bin/konstruct
-
Open the file ~/.xinitrc and search for: exec $WINDOWMANAGER and place a # sign in front of it. Then add a line underneath that, saying:
exec /usr/X11R6/bin/konstruct.sh
If your distribution has no ~/.xinitrc file, please consult your documentation to ensure that konstruct.sh gets run after you login.
-
KDE will start after your next login. You have finished!
Advantages
-
De power of self-compiled programs.
-
A relative easy installation method.
Disadvantages
-
The process can last very long on slower systems (1 to 2 days on a system with low CPU.)
-
Several hundreds of megabytes of free disk space are required to run the installation.
The hard method – KDE installation by hand via the source-code.
Introduction
This is a very time-consuming way to install KDE. Just like with Konstruct, you will use the source code. You have to configure and compile all modules separately and then install them. This is exactly the same procedure as installing any other software from source.
The installation
-
To begin, all modules must be downloaded. Go to http://download.kde.org and choose a local mirror.
-
In the mirror, open stable/latest/src
-
Select the desired modules from the list. You must have arts and kdelibs to run KDE programs. You should also choose which language modules you need in the kde-i18n folder.
-
Download the desired modules and unpack them (e.g. tar xvjf kdelibs-x.x.x.tar.bz2). You must install arts and then kdelibs before any other modules.
For every module, perform the following steps: -
Go to the folder that you just unpacked.
-
Perform a ./configure. It is recommended that you install KDE into it's own folder (e.g. /opt/kde-latest). You must supply this prefix at every configuration of every module you compile (./configure -prefix=/opt/kde-latest).
-
make && make install
Ensure that you are logged-in as root, before these commands. -
Repeat steps 5, 6 and 7 for each module.
You will have to manually ensure that KDE begins when you login. Follow the instructions from step 8 in the Konstruct build instructions above.
Advantages
-
You get a KDE system that is optimized to fit your system.
Disadvantages
-
It takes a lot of time to install the modules.
The hardest method of all – The latest KDE version from CVS
Note: This document is outdated, since KDE is using Subversion these days. Please use this page for information about retrieving the source with Subversion. However, it is still possible to retrieve the latest sources from the KDE download page.
Introduction
This method is the most space- and time-consuming, but you get the absolute latest KDE with the newest features and bug-fixes. This version contains a lot of bugs and is more appropriate for KDE developers than for end-users.
There are two ways to download the CVS-version. The first is to download the modules as tar-files, the second is to fetch the modules live from the central CVS-server using the cvs program. You do not need the cvs program for the first method. With the second method it is much easier to fetch the latest changes without having to fetch entire modules as tar-files again.
The first method is fairly similar to the description given in the previous section.
-
Go to http://download.kde.org and choose a local mirror.
-
Open unstable/latest
-
Go ahead from step 3 of the previous section.
The second method makes use of cvs:
-
Ensure that you have cvs installed. If your distribution does not have it, you can get it from http://www.cvshome.org
You also need a recent automake and autoconf in order to compile KDE CVS. Of course, all the usual requirements of KDE must be met.
-
In your personal folder make the file .cvsrc with the following contents:
cvs -z4 -q diff -u3 -p update -PAd checkout -P
-
Set the variable CVSROOT like this:
export CVSROOT=:pserver:anonymous@anoncvs.kde.org:/home/kde
-
Type
cvs login
Leave the password empty. If cvs warns that it can't find .cvspass then make the file:
touch ~/.cvspass
Try to login again.
-
Check which modules are available on the CVS-server:
cvs co -c
You should see all the sections of the modules you can download. You will also need the kde-common module.
-
Download the desired modules by typing:
cvs co kde-common arts kdelibs
You can make the list as long as you want. It will make the folders arts and kdelibs in the current directory and will fill them with all the files that belong in them. Make sure you have write permissions for the current directory.
-
To begin, you must have arts installed, so begin from the arts folder. After arts, install kdelibs. The order of the modules that follow is not important.
-
There is no configure yet, you must create one. Do this by entering:
make -f Makefile.cvs
-
In principal, you can proceed with the same steps in the previous section where you installed from the stable source. Be aware that you don't overwrite a stable version of KDE by using the wrong prefix. You should, for example, use a prefix like /opt/kde-cvs to separate the stable and unstable versions. It is also recommended that you pass the flag --enable-debug=full to configure. This will provide useful information to the KDE-developers when a program does not behave normally. Note, this will require quite a lot more hard-drive space.
-
To install the language modules is a little different. Download the kde-i18n module in this way:
cvs co -l kde-i18n cvs co kde-i18n/xx
where xx is replaced by the abreviation of the language you want.
In this way you avoid downloading all the language modules. If you want all of them, you will need hundreds of MB's of space!
Now go into the folder for kde-i18n and enter:
echo xx > inst-apps
This will make clear that you only install the language you want. Install as from step 8.
-
When the entire installation is completed, you can update the source-code with the latest changes since you last compiled. In the folder of the module who's source-code you want to renew, enter the command:
cvs update -PAd
Then enter a make && make install to complete the change.
Advantages
-
You'll get the latest version of KDE.
-
Very quick updates are possible.
Disadvantages
-
Unstable and new features may not work properly.
-
KDE CVS does not guarantee that the source-code will compile successfully.
-
You need a lot of drive space.
This document made use of the Konstrukt-HOWTO (www.vosberg.be)
Thanks to Fabrice Mous (for pointing me to the Konstruct-HOWTO), Donn Ingle (English translation and suggestions) and Leendert Meyer (proofreader).