Previous Next Contents

2. Finding and Installing KDE

2.1 Should I install the current version, or wait for a stable public release?

KDE is open and free software, so you are always at liberty to install, build, and generally fiddle with any version that you like. However, the current release is ALPHA software, and is fairly unstable. If you enjoy (and are capable of) tinkering with Makefiles, pouring over source code in search of errors, applying daily patches, etc., then install away.

If, on the other hand, you're a little less experienced with programming and are really just looking for a great GUI, you may be better off waiting until the first BETA release is ready. With the current state of flux in the libraries and applications, KDE may be more trouble to you than it's worth (in its current form). When the BETA is ready, an announcement will be posted on comp.os.linux.announce.

2.2 Where can I get KDE?

KDE is available from the following ftp sites. The main site is listed first, while those that follow are mirrors.

2.3 What files make up KDE and what else do I need?

KDE is made up of various libraries and applications that sit on top of other software. The best way to see how all this fits together is to look at a diagram:

This may look a little intimidating, but it's actually quite straightforward. If you are reading this document (a safe assumption!), you probably already have a working UN*X box. To install KDE, you just need to work backwards up the diagram. All the steps are detailed in what follows.

2.4 What files should I download and install first?

The first major component of any KDE installation is the Qt library. This software must be installed and working on your machine before any of KDE can be compiled. It is available for download from Troll Tech. KDE now requires Qt v1.2, so if you have v1.1 (or older) you will have to upgrade.

To install KDE itself, you have two broad options: install one of the prepackaged distributions (highly recommended!), or install all the bits and pieces yourself (see the following two sections).

2.5 How do I install the tgz distribution?

Grab the library, support, base, and applications bundles from the ftp site(s). You need to choose a location to unpack the archives (many people use /usr/src/kde). If, for example, you have downloaded the .tgz files into a directory called /home/herbie/, you will issue a set of commands (as root) such as:

        cd /usr/src/
        mkdir kde
        cd kde
        tar -xvzf /home/herbie/kdeapps-970704.tar.gz    
        tar -xvzf /home/herbie/kdebase-970704.tar.gz    
        tar -xvzf /home/herbie/kdelibs-970704.tar.gz    
        tar -xvzf /home/herbie/kdesupport-0.9.00.tgz    
        

Next, you must choose a location for files that are created during the building process to be installed to. This is referred to as your KDE directory, and most people use /usr/local/kde. Do this with a series of commands (as root) such as:

        cd /usr/local/
        mkdir kde
        export KDEDIR=/usr/local/kde
        export PATH=$PATH:KDEDIR/bin
        

To ensure that these variables are available to all users on your system, you may want to add the last two export commands to your /etc/profile file. If you only want KDE to work for a particular user (eg. yourself), then you can just add these export commands to the .bash_profile file in that user's home directory. Note that if you are using a different shell than bash (such as csh), the syntax for exporting environment variables is slightly different (anyone know what it is?).

Now that you have the source files unpacked and the KDE destination directory setup, you can begin building the software. Change directories into the kdesupport directory and type ./configure. This will customize the Makefiles for your particular machine. (Note that ./configure can be passed command line options. See configure options.) You should also have a look at the Next, type make and sit back while the jpeg and gif libraries included in the kdesupport package are created. If all goes well, you can then type make install to have these libraries installed in the KDE directory hierarchy.

The kdelibs package is built and installed in a similar fashion; change directories to kdelibs/, run ./configure, type make, wait for the libraries to build, and then type make install. This process will create all the libraries that KDE applications require, including libkdecore (common look 'n feel, UI widgets, etc.) and libkhtml (set of HTML routines). They will be installed in KDEDIR/lib.

Next, you need to ./configure, make, and make install the base package from the kdebase directory. This process can take a little time, as the directory includes kwm (the KDE window manager), kfm (the KDE file manager), kpanel (application organizer and launcher), kdehelp (hypertext help system), and a number of other applications.

Finally, you need to install the actual applications. You do this in exactly the same way, by changing into the kdeapps directory, and going through the same ./configure, make, and make install process.

Once everything is finished building and installing, fire up X and try out a few programs (eg. run kfm). To setup KDE as your default X environment, you'll have to change your .xinitrc file (located in your HOME directory). A typical one might look like this:

        #!/bin/sh
        exec kfm &
        exec kdisplay -init &
        exec kpanel &
        exec kwm
        

If you have any problems, see if you can find an answer in the rest of this FAQ (see Problems). If that doesn't help, then you can always find more information on the mailing lists ( see More Info). If you find a bug in a particular package, then please send e-mail to the relevant maintainer.

2.6 Can I give the ``./configure'' command any options?

Like virtually all implementations of configure (ie. scripts generated using the autoconf package), the KDE configure scripts can be passed a number of command line parameters. These can be useful for specifying the location of your Qt files, your (desired) KDEDIR, etc. To get a summary of what options are available to each of the configure scripts (the one for support, the one for libs, the one for base, etc.), just use the following coammand:

        ./configure --help
        

2.7 How do I install the RedHat distribution?

If you're running A RedHat system, then you'll probably find the rpm distribution of KDE a little more straightforard to install. Go to the rpm section of the distributions area at the ftp site and get the latest version. It should look something like this:

        kde-0.10.2-1.i386.rpm
        

Grab the README file included with the RedHat distribution and refer to it for more details. The general idea is to change to the directory where you downloaded the package, become root, and type:

        rpm -Uvh kde-0.10.2-1.i386.rpm
        

2.8 How do I install the Debian distribution?

Like any other Debian package, the KDE related .deb's can be installed from the command line with:

        dpkg -i package_name.deb
        

An equivalent form of this command is:

        dpkg --install package_name.deb
        

2.9 How can I build up a KDE installation from scratch?

If you'd rather build a KDE installation by hand (ie. if you enjoy making your life more difficult than it needs to be), then you need to begin by grabbing the individual library files. You'll need the gif, jpeg, deui, core, and html widgets libraries.

You can unpack these archives anywhere you like; ``cd'' to wherever you installed them, become root, and try ``make''. If you receive no error messages, make sure that you have declared KDEDIR and try ``make install''. If you do get errors while building, it may be that the programs cannot find all the bits and pieces of Qt that they need. Ensure that all of your Qt environment variables have been declared as per the Qt documentation. If you are still having problems, it's time to join a mailing list (see More Information).

Once you have the libraries in place, you have to inform your system that these new libraries exist. One way of doing this is to make symbolic links from files in a conventional library directory (such as /usr/lib/) to your KDE library directory (eg. /usr/local/kde/lib/). You can do this with a command like ``ln -s /usr/local/kde/lib/libkdecore.so /usr/lib/libkdecore.so'' (NB: You must do this for each of the libraries that now exist in your KDE lib/ directory). You can then let your machine configure itself to use these new libraries by typing ``ldconfig''.

An alternative method, and one that is probably much easier in the long run, is to add your KDE lib/ directory to the set of directories that ldconfig checks whenever it is invoked. Just edit the file /etc/ld.so.conf and add your kde lib/ directory to the list. Then just make sure to run ldconfig each time you install new KDE libraries.

The next step is to download, compile, and install the five KDE core components:

In each case, make sure to check the included READ.ME's in each archive to get the latest information about the package. Each of these five components should configure themselves with the `` ./configure'' command, build with the ``make'' command, and install themselves in the right place with ``make install''.

Any problems that you cannot solve yourself should be directed either to the author of the package or to one of the relevant mailing lists.

Having got the basic system up and running, you are now free to install whatever KDE applications you like. These are all designed to build and install in an analogous way.

2.10 What parts of KDE are essential?

In addition to the libraries (libkdecore, libkhtml), the absolutely essential pieces of KDE are:

These seven packages all assume the other six are available on your system. You can find useful summary information about the current state of these packages at http://www.kde.org/components.html.

2.11 What parts are optional?

All the rest of the KDE applications are optional, although since it is the applications that actually let you do something useful, you will certainly want to install some of them. Current KDE applications include a calculator, text editor, ghostscript previewer, and a dvi viewer. You can find useful summary information about the current state of these packages at http://www.kde.org/components.html.

2.12 Is there a binary release of KDE?

The status of KDE binaries is a little unstable as we are still at the ALPHA stage. Stable binaries for general use will be made available as soon as we have progressed to the BETA stage.

2.13 How do I uninstall a tgz distribution?

Although not quite complete, the command make uninstall already reverses most of intallation process.

2.14 How do I uninstall a Redhat distribution?

Just use the same command you would with any other RedHat package. That is, to uninstall the base distribution, try:

        rpm -e kde      
        

Likewise, a development distribution can be uninstalled with:

        rpm -e kde-devel
        

2.15 How do I uninstall a Debian distribution?

To uninstall a Debian KDE package, use a command like this:

        dpkg -r package_name
        

or (equivalently):

        dpkg --remove package_name
        

2.16 Has anyone got KDE installed on non-Linux boxes?

Varying degrees of success have been reported with FreeBSD, NetBSD, Sun, Irix, etc. As the code matures towards a first public release, compatibility with other platforms will become increasingly important, but, for the time being, your best bet is to just try and install the latest distribution and hope for the best. As with any other problems, the mailing lists (see More Information) are a very useful source of advice.


Previous Next Contents