Running KDE 2.x and KDE CVS on Same Machine

Q. Can I run KDE 2.x and KDE CVS on the same machine?

Yes! You can run any number of different versions of KDE on the same machine. This allows you, for example, to keep a stable & reliable version of KDE, yet try out the latest release. For developers it's often useful to compare the behavior of a bug on multiple releases.

Step 1: Get ready

KDE can install in many ways. KDE may be scattered among assorted system directories (like "/usr/bin" and "/usr"). The prepackaged binarary distributions (like RedHat rpm's) are often hardwired to one directory scheme, and limit you to one version of KDE.

KDE can also run out of a single self-contained user directory. If you're willing to compile it yourself, you can run as many different KDE versions as space permits. Compile each to a different target location, and keep seperate ".kde" directories for each version.

Step 2: Check your P's & QT's, compile safely

It's easy to make a mistake compiling a second KDE. You must be sure to get only the include files, KDE libraries and QT libraries that you have compiled. At the time the "configure" script is run, be sure to have the $KDEDIR and $QTDIR environment variables set to your intended locations. Make sure your library loader is looking for libraries the proper location. For example:
export QTDIR=/home/bryce/kde3source/qt-copy
export KDEDIR=/home/bryce/kde3binary
export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH

gmake -f Makefile.cvs
./configure --enable-debug
If your system uses ldconfig, replace the $LD_LIBRARY_PATH line with:
ldconfig -m $KDEDIR/lib
ldconfig -m $QTDIR/lib

Step 3: Start KDE

The following example is the proper setup of/etc/X11/xinit/Xclients for RedHat Linux. Note that KDE 3 is given a seperate ".kde" directory. Other distributions will be similar in spirit. Find how your current KDE is started, and extend the same mechanism.

Warning: The ".kde" directory is used to store settings for KDE and KDE programs (including, unfortunately, Konqueror bookmarks). It's not compatible from version to version. For example, if you let KDE 3 attack this directory, it will never run on KDE 2 again. Be sure to set $KDEHOME as the example does:

    elif [ -n "`grep -i KDE /etc/sysconfig/desktop`" ]; then
PREFERRED=`which startkde`
exec $PREFERRED
elif [ -n "`grep -i KD3 /etc/sysconfig/desktop`" ]; then
echo "Starting test KDE 3"
export QTDIR=/home/bryce/kde3source/qt-copy
export KDEHOME=/home/bryce/.kde3
export KDEDIR=/home/bryce/kde3binary
export PATH=/home/bryce/kde3binary/bin:$PATH
export PREFERRED=/home/bryce/kde3binary/bin/startkde
exec $PREFERRED

Step 4: Try it out, solve problems

You may have to delete some of the "mcop" and "dcop" temporary files that kde writes in /tmp.

See the kde-config FAQ for information on how to verify your KDE path settings are correct.

Enjoy!

KDE and K Desktop Environment are trademarks of KDE e.V.