Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

238.6. krdp-6.8.2

RDP server library and krdpserver, which shares a Plasma desktop over the Remote Desktop Protocol

Version 6.8.2, release 1
Shelf virt — Virtual machines, their tooling, and remote-desktop and VNC protocols
Phase 43_toolkits (Toolkits), 334 of 344 in build order
Licence (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-2-Clause
Homepage https://invent.kde.org/plasma/krdp
Build time 1.9 SBU
Installed size 1.1 MiB in 20 files
Recipe ports/core/virt/krdp/kpkgbuild

About

KRdp is Plasma’s Remote Desktop Protocol server. The library takes the session’s screen through kpipewire and the screen-cast portal, encodes it and serves it with freerdp’s server library, and feeds the client’s keyboard and pointer back through libei. krdpserver is the program that does this for a logged-in user, and the “Remote Desktop” page of System Settings configures it; KDE Connect’s virtual-monitor plugin links the library to put a tablet beside the screen as a second output.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, pkgconf, qt6-qtbase, qt6-qtdeclarative, qt6-qtwayland, kconfig, kdbusaddons, kcmutils, ki18n, kcoreaddons, kstatusnotifieritem, kcrash, kguiaddons, kirigami, kirigami-addons, freerdp, kpipewire, libxkbcommon, qtkeychain, plasma-wayland-protocols, pam, libei, openssl.

Required by (2): kde-plasma, kdeconnect.

Patches

build.sh applies these; kpkg applies nothing by itself.

kcm-no-systemd.patch lets the settings page run the server without a systemd user manager; it is to be offered upstream as a merge request against plasma/krdp. Upstream’s page starts, stops, enables and reads krdpserver only through org.freedesktop.systemd1 on the session bus, which nothing on KDOS provides, so it would hide its on/off switch and show “Systemd not found”. With the patch krdpserver owns the unique D-Bus name org.kde.krdp-server through KDBusService, and when systemd1 is absent the page starts /usr/bin/krdpserver itself, stops it by calling quit on that name’s /MainApplication, shows it running while the name is owned, and turns “start at login” into ~/.config/autostart/org.kde.krdpserver.desktop, a copy of the installed desktop entry, which Plasma’s autostart runs at the next login. A second krdpserver hands over to the first and exits, so a login start and a switch never run two servers on one port.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install krdp'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/virt/krdp.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/virt/krdp
echo 'd4e651aca79f83d6da71de1b36e87d38b123fa8fcf066c2294a55a43b3675de4  krdp-6.8.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/krdp
SRC=$SRC_ROOT/krdp-6.8.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf krdp-6.8.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 --no-backup-if-mismatch -i "$PORT_SRC/kcm-no-systemd.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_TESTING=OFF \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D BUILD_EXAMPLES=OFF \
	-D BUILD_PLASMA_SESSION=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_Systemd=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/lib/systemd"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/krdp, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf krdp-6.8.2-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/krdp, and runs the triggers its paths call for.

Contents

Installed programs: krdpserver.

Installed libraries: libKRdp.so.

Installed directories: /usr/lib/cmake/KRdp, /usr/share/licenses/krdp.

Notes

The configure requires FreeRDP’s server library, FreeRDP-Server 3.1 or later, beside the client libraries; the freerdp port builds it, with -DWITH_SERVER=ON.

The install puts a systemd user unit, app-org.kde.krdpserver.service, and a preset file under /usr/lib/systemd; build.sh removes the directory, since KDOS has no systemd (see No systemd); the page manages the server through the patch above instead. krdpserver reads the settings the page writes, and a running server takes changed ones after the page’s restart.

With password authentication through PAM turned on in the settings, the server checks the RDP user’s password against the login PAM service.

The server needs a TLS certificate and key and refuses to start without them. The settings page writes both when it opens with automatic certificates on, upstream’s default, by running openssl req into ~/.local/share/krdpserver, so openssl is in depends for run time; without the program no certificate is written and krdpserver does not start.