KDE Pre-installation Configuration

[Note]

Note

If you did not install Xorg in /usr, some of the CMake modules in KDE look for packages at hard coded locations. To accommodate this issue, create the following symbolic link (as the root user):

ln -sv $XORG_PREFIX /usr/X11R6

Installing in /usr

One option is to put KDE into the /usr hierarchy. This creates a simpler setup but makes it more difficult to try multiple versions of KDE.

export KDE_PREFIX=/usr

Installing in /opt

A method of building multiple versions installs KDE in the /opt hierarchy:

export KDE_PREFIX=/opt/kde

If you are not installing KDE in /usr, you will need to make some additional configuration changes. Best practice is to add those to your system or personal profile:

cat > /etc/profile.d/kde.sh << 'EOF'
# Begin /etc/profile.d/kde.sh

KDE_PREFIX=/opt/kde
KDEDIR=$KDE_PREFIX

pathappend $KDE_PREFIX/bin             PATH
pathappend $KDE_PREFIX/lib/pkgconfig   PKG_CONFIG_PATH
pathappend $KDE_PREFIX/share/pkgconfig PKG_CONFIG_PATH
pathappend $KDE_PREFIX/share           XDG_DATA_DIRS
pathappend /etc/kde/xdg                XDG_CONFIG_DIRS

export KDE_PREFIX KDEDIR

# End /etc/profile.d/kde.sh
EOF

Add to your /etc/ld.so.conf:

cat >> /etc/ld.so.conf << EOF
# Begin kde addition

/opt/kde/lib

# End kde addition
EOF

Several KDE packages install files into D-Bus and polkit directories. When installing KDE in a location other than /usr, D-Bus and polkit need to find these files. The easiest way to achieve this is to create the following symlinks (as the root user):

install -d $KDE_PREFIX/share &&
ln -svf /usr/share/dbus-1 $KDE_PREFIX/share &&
ln -svf /usr/share/polkit-1 $KDE_PREFIX/share
[Tip]

Tip

Sometimes, the installation paths are coded into installed files. This is the reason why /opt/kde is used as installation prefix instead of /opt/kde-4.14.1. After installing KDE, you may rename the directory and create a symlink:

mv /opt/kde{,-4.14.1} &&
ln -svf kde-4.14.1 /opt/kde

Later on, you may want to install other versions of KDE. To do that, just remove the symlink and use /opt/kde as the prefix again (KDE must not be started). Which version of KDE you use depends only on where the symlink points to. No other reconfiguration will be needed.

Last updated on 2014-08-24 11:34:04 -0700