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

298.4. krfb-26.08.2

Desktop sharing — serve this screen over VNC, through the PipeWire screencast portal on Wayland

26.08.2-1 · GPL-2.0-or-later AND GPL-3.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND BSD-3-Clause AND GFDL-1.2-only AND CC0-1.0 · 4.2 SBU · 1.3 MiB, 31 files · 44_apps, 421 of 422 · ports/core/virt/krfb

Homepage: https://apps.kde.org/krfb/

Krfb shares this desktop over VNC: it runs a VNC server from libvncserver on TCP port 5900, advertises it over DNS-SD with kdnssd, and asks before each connection is let in. On Wayland it reads the screen from a PipeWire stream through kpipewire, obtained from the desktop portal’s ScreenCast interface, and injects the remote pointer and keys through the portal’s RemoteDesktop interface; unattended-access passwords are kept in kwallet. krfb-virtualmonitor serves a second, virtual screen to a VNC viewer such as a tablet, through KWin’s screencast protocol.

Depends on: cmake, ninja, pkgconf, extra-cmake-modules, qt6-qtbase, qt6-qtwayland, wayland, ki18n, kconfig, kcoreaddons, kdbusaddons, kdnssd, kdoctools, knotifications, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui, kstatusnotifieritem, kcrash, libX11, libXext, libXdamage, libXtst, libxcb, xcb-util-image, libvncserver, kpipewire, pipewire, plasma-wayland-protocols, kwayland.

Required by (1): kde-gear-core.

Sources: krfb-26.08.2.tar.xz (1.2 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install krfb'

build.sh:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D DISABLE_PIPEWIRE=OFF \
	-D CMAKE_REQUIRE_FIND_PACKAGE_PlasmaWaylandProtocols=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Qt6WaylandClient=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

Programs: krfb, krfb-virtualmonitor.

Libraries: libkrfbprivate.so.

Directories: /usr/lib/qt6/plugins/krfb, /usr/share/doc/HTML/en/krfb, /usr/share/krfb, /usr/share/licenses/krfb.

find_package(X11 REQUIRED) and the XCB components make the X client libraries requirements whatever the session. The XCB framebuffer and the XTest input plugin are built from them and can capture and drive only an X server, which on KDOS is Xwayland: they share an X client’s view, never the Plasma desktop. The XTest plugin links libXtst unconditionally, so it is in depends.

The ScreenCast and RemoteDesktop portals are answered by xdg-desktop-portal-kde in the Plasma session; elsewhere Krfb starts and shares nothing. The firewall drops incoming connections, so a viewer on another machine reaches Krfb only once the firewall’s vnc service (TCP 5900) is opened (see Opening a service).