Building Plasma 5

KDE Plasma 5 is a collection of packages based on top of KDE Frameworks 5 and QML. They implement the KDE Display Environment (Plasma 5).

This package is known to build and work properly using an LFS-8.3 platform.

The instructions below build all of the Plasma 5 packages in one step by using a bash script.

Package Information

Plasma 5 Dependencies


GConf-3.2.6, GTK+-2.24.32, GTK+-3.24.3, KDE Frameworks-5.53.0, libpwquality-1.4.0, libxkbcommon-0.8.2, Mesa-18.3.2 built with Wayland-1.16.0, NetworkManager-1.14.4, PulseAudio-12.2, Python-2.7.15, qca-2.1.3, taglib-1.11.1, and xcb-util-cursor-0.1.3



GLU-9.0.0, ibus-1.5.19, Xorg Synaptics Driver-1.9.1, appstream-qt, KDevPlatform, libgps, libhybris, libraw1394, mockcpp, packagekit-qt, Qalculate, Qapt, SCIM, and socat (for pam_kwallet)

User Notes:

Downloading KDE Plasma5

The easiest way to get the KDE Plasma5 packages is to use a single wget to fetch them all at once:

wget -r -nH -nd -A '*.xz' -np $url

The options used here are:
  -r            recurse through child directories
  -nH           disable generation of host-prefixed directories
  -nd           do not create a hierarchy of directories
  -A '*.xz'     just get the *.xz files
  -np           don't get parent directories

Setting Package Order

The order of building files is important due to internal dependencies. Create the list of files in the proper order as follows:

cat > plasma-5.14.4.md5 << "EOF"
014d15755600481d8bd2125d82776510  kdecoration-5.14.4.tar.xz
6cafec0732d42a11618b0f7843b9cdb7  libkscreen-5.14.4.tar.xz
8b43076fe3d8845d7f890721a90b8210  libksysguard-5.14.4.tar.xz
4bea8ee0b3b165235ebfc2c02be6dc1c  breeze-5.14.4.tar.xz
858a3f7cbec03e40fbd3ee6bcf24ea85  breeze-gtk-5.14.4.tar.xz
f46412c02e11d53723c89a1f7505a3dd  kscreenlocker-5.14.4.tar.xz
a194273fcb39e57b694121d258188a7a  oxygen-5.14.4.tar.xz
34c5a84a8d6a135cb947b6ecd17803ee  kinfocenter-5.14.4.tar.xz
abc6602d3f0d986a07d8b00684599ca9  ksysguard-5.14.4.tar.xz
3d9ce77dd5671b514d9943c5119fca61  kwin-5.14.4.tar.xz
eaeaeaf57be7d45752ec92f0b5beda0b  plasma-workspace-5.14.4.tar.xz
fe29af65a55d434bfb5a1806f7ca61b0  bluedevil-5.14.4.tar.xz
f2bf818be2ebeca91985e01278f6d93f  kde-gtk-config-5.14.4.tar.xz
c38e8d0902ba37f5308cb7f05047072b  khotkeys-5.14.4.tar.xz
68bb90533998367a5a207132b91b0ac3  kmenuedit-5.14.4.tar.xz
2fd69bedd600e7bfa8e4cae6e2425fc9  kscreen-5.14.4.tar.xz
d548ae1d4b1850cc65093128a411304a  kwallet-pam-5.14.4.tar.xz
16d278360004a80db9c5a6baa2f7781b  kwayland-integration-5.14.4.tar.xz
9f36e858f57d24098c2ddb5987bf200e  kwrited-5.14.4.tar.xz
ea0c7fe6cf49049b9a68b9d0094634b9  milou-5.14.4.tar.xz
3e1200ad29cae12d7672902164449403  plasma-nm-5.14.4.tar.xz
bf60a089095cfeca423a2e1dfc7fc627  plasma-pa-5.14.4.tar.xz
5896ef78ebf9b4784ed1fb44c4af1d69  plasma-workspace-wallpapers-5.14.4.tar.xz
25e9a3d1745d0c11d8568074229671a3  polkit-kde-agent-1-5.14.4.tar.xz
fdb962c816db14a40c5e455c6f25523a  powerdevil-5.14.4.tar.xz
#2db6c86391fcb083a0ff079a14875821  plasma-desktop-5.14.4.tar.xz
420adc0e141435398e116e60da50d7ff  plasma-desktop-
16c0b5f4737a9fce99018d49858cb47d  kdeplasma-addons-5.14.4.tar.xz
3c3ba960cca9349126dcafcbf702eab1  kgamma5-5.14.4.tar.xz
878b25b3c87b13030b303c7f667c450a  ksshaskpass-5.14.4.tar.xz
#305356781ac6d6fc4bd1708b4c6f756b  plasma-sdk-5.14.4.tar.xz
1a28a56b8b76b2c84c9d880f546274c4  sddm-kcm-5.14.4.tar.xz
fbd60bfb9e66c72311e233817b94e809  user-manager-5.14.4.tar.xz
e14211fc2b0d995d3cf142168056c144  discover-5.14.4.tar.xz
#86462c52fb106e9ed753822c48456c94  breeze-grub-5.14.4.tar.xz
#9a16fa97036b5de9fa0d68d6c2d6e822  breeze-plymouth-5.14.4.tar.xz
d2ef43f119c8afa91745092f649205ff  kactivitymanagerd-5.14.4.tar.xz
14289404eeff5fd571aefbe2a025dc86  plasma-integration-5.14.4.tar.xz
78aaa3b82fe3010be8ff90a44bdd7e8a  plasma-tests-5.14.4.tar.xz
13dd25e88e6fffbff6dad7ae2e49110d  plymouth-kcm-5.14.4.tar.xz
9df4568014b9f3bc91577db4205d40d4  xdg-desktop-portal-kde-5.14.4.tar.xz
633cc3750606ad94f2c8f49a0fd3a656  drkonqi-5.14.4.tar.xz
cd1c28ad7d047861634fa091cec5cd29  plasma-vault-5.14.4.tar.xz
7a1b10a5dc4b28600a9f3f13de800bd5  plasma-browser-integration-5.14.4.tar.xz
d008931a914d5748da62f6667915c7d6  kde-cli-tools-5.14.4.tar.xz
1c119822295205f625c7fcc6ea7b01bb  systemsettings-5.14.4.tar.xz


The breeze-grub, breeze-plymouth, and plymouth-kcm packages above are all for customized support of Plymouth which is designed to be run within an initial ram disk during boot (see the section called “About initramfs”). The plasma-sdk package is optional and used for software development.

Installation of Plasma5



When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

  1. Run the entire script as the root user (not recommended).

  2. Use the sudo command from the Sudo-1.8.27 package.

  3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"

export -f as_root

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

while read -r line; do

    # Get the file name, ignoring comments and blank lines
    if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
    file=$(echo $line | cut -d" " -f2)

    pkg=$(echo $file|sed 's|^.*/||')          # Remove directory
    packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory

    tar -xf $file
    pushd $packagedir

       mkdir build
       cd    build

             -DCMAKE_BUILD_TYPE=Release         \
             -DBUILD_TESTING=OFF                \
             -Wno-dev ..  &&

        as_root make install

    as_root rm -rf $packagedir
    as_root /sbin/ldconfig

done < plasma-5.14.4.md5


cd /usr/share/xsessions/
[ -e plasma.desktop ] || as_root ln -sfv $KF5_PREFIX/share/xsessions/plasma.desktop

Configuring Plasma

Linux PAM Configuration

If you built Plasma with the recommended Linux PAM support, create necessary configuration files by running the following commands as the root user:

cat >> /etc/pam.d/kde << "EOF" 
# Begin /etc/pam.d/kde

auth     requisite
auth     required

auth     required uid >= 1000 quiet
auth     include        system-auth

account  include        system-account
password include        system-password
session  include        system-session

# End /etc/pam.d/kde

cat > /etc/pam.d/kde-np << "EOF" 
# Begin /etc/pam.d/kde-np

auth     requisite
auth     required

auth     required uid >= 1000 quiet
auth     required

account  include        system-account
password include        system-password
session  include        system-session

# End /etc/pam.d/kde-np

cat > /etc/pam.d/kscreensaver << "EOF"
# Begin /etc/pam.d/kscreensaver

auth    include system-auth
account include system-account

# End /etc/pam.d/kscreensaver

Starting Plasma5

You can start Plasma5 from a TTY, using xinit-1.4.0.

To start Plasma 5 using xinit-1.4.0, run the following commands:

cat > ~/.xinitrc << "EOF"
dbus-launch --exit-with-session $KF5_PREFIX/bin/startkde


The X session starts on the first unused virtual terminal, normally vt7. You can switch to another vtn simultaneously pressing the keys Ctrl-Alt-Fn (n=1, 2, ...). To switch back to the X session, normally started at vt7, use Ctrl-Alt-F7. The vt where the command startx was executed will display many messages, including X starting messages, applications automatically started with the session, and eventually, some warning and error messages. You may prefer to redirect those messages to a log file, which not only will keep the initial vt uncluttered, but can also be used for debugging purposes. This can be done starting X with:

startx &> ~/x-session-errors

When shutting down or rebooting, the shutdown messages appear on the vt where X was running. If you wish to see those messages, simultaneously press keys Alt-F7 (assuming that X was running on vt7).

If you intend to start Plasma using a display manager such as lightdm-1.28.0, there will be two entries for Plasma, one for use with Xorg, and another for Wayland. Modify the Xorg entry with the following command, as the root user, so that you can differentiate between the two:

sed '/^Name=/s/Plasma/Plasma on Xorg/' -i /usr/share/xsessions/plasma.desktop


Installed Programs: There are too many plasma programs (50 in /opt/kf5/bin) to list separately here.
Installed Libraries: There are too many plasma libraries (39 in /opt/kf5/lib) to list separately here.
Installed Directories: There are too many plasma directories (over 1000 in /opt/kf5) to list separately here.

Last updated on 2015-09-24 16:44:04 -0500