kde-vnc
Recipe card from the charly-selkies plugin (Images — the deployable catalog).
kde-vnc — fullscreen KDE Plasma over VNC, GPU-accelerated
Section titled “kde-vnc — fullscreen KDE Plasma over VNC, GPU-accelerated”The stack
Section titled “The stack”| layer | provided by | detail |
|---|---|---|
| base image | podcdi.pod-cdi |
CachyOS; the GPU driver is injected from the host through CDI |
| outer compositor | pod-sway |
headless sway 1.12; serves wayland-1 with a wayland-0 symlink; gles2 on the GPU |
| VNC | pod-wayvnc |
wayvnc 0.10.2 on :5900; no power-on workaround needed at 0.10.x |
| session | pod-kde-nested (kde-nested service) |
nested kwin_wayland + plasmashell (Plasma 6 without SDDM via layer-kde-shell; kdotool, spectacle) |
| this repo | kde-vnc-session candy |
composes the above, sets KDE_NESTED_* for sway’s sockets, and the sway kiosk drop-in |
How the session starts
Section titled “How the session starts”The kde-nested service is pod-kde-nested’s shared launcher (/charly-selkies:kde-nested).
This pod sets the following knobs:
KDE_NESTED_HOST_DISPLAY=wayland-0(sway);KDE_NESTED_SOCKET=wayland-kde;KDE_NESTED_RUNTIME_DIR=/tmp;KDE_NESTED_BUS=session.
It deliberately sets no KDE_NESTED_RESOLUTION: empty means KWin takes the size of the
output it is nested in, so RESOLUTION — this pod’s one documented knob — sizes the sway
output AND the fullscreen Plasma session that fills it. Setting a second geometry here would
let a consumer override RESOLUTION and get a sway output and a KWin window of different
sizes.
The launcher waits for sway’s socket, then starts kwin_wayland --wayland-display wayland-0 --socket wayland-kde --xwayland (no size flags, so it fills the output) and then plasmashell. It exports
KDE_SESSION_VERSION=6, which kdotool needs, and pod-kde-nested strips cap_sys_nice from
kwin_wayland at build, because the pod’s no-new-privileges refuses a file-capability
binary.
The ambient session — the image’s default, and when to name it
Section titled “The ambient session — the image’s default, and when to name it”The pod sets the image’s session environment, so anything started inside it without an override joins Plasma:
WAYLAND_DISPLAY=wayland-kde— the socket users actually see. pod-sway’s candy setswayland-0for ITS clients, but that is the compositor BEHIND the fullscreen Plasma window: a window drawn there is invisible in the VNC stream. This pod overrides it.KDE_SESSION_VERSION=6— what every KDE client, andkdotool, expect.
It is a DEFAULT, not a guarantee — a check step must still name its display. A check step’s
in-container command environment carries the OPERATOR’s environment (measured: a runner on a
Wayland desktop leaked its own WAYLAND_DISPLAY into the container, so setsid konsole inherited
a socket that does not exist inside the pod and never opened a window). The bed therefore writes
WAYLAND_DISPLAY=wayland-kde on the Konsole launch and KDE_SESSION_VERSION=6 on the kdotool
call: not a workaround, but the explicit statement of which session the step targets.
Other consequences:
- sway and wayvnc keep their own service-level
WAYLAND_DISPLAY=wayland-0: a service must not depend on ambient drift, and those two must reach the compositor socket, not the session one.kde-nesteduses theKDE_NESTED_*knobs instead. - The image’s own values are checkable HOST-side (
podman image inspect … .Config.Env), not from a check step:charly check imageruns its probes with the host environment forwarded, so an in-imageprintenv WAYLAND_DISPLAYreports the runner, not the image (measured).
Fullscreen and keyboard
Section titled “Fullscreen and keyboard”The nested KWin window has no app_id. Its title is
KDE Wayland Compositor WL-0 — Press right control key to grab pointer, so kde-vnc.conf
matches title="^KDE Wayland Compositor" and makes it fullscreen and borderless. sway
starts in passthrough mode, so its Alt bindings never swallow keys meant for Plasma.
Alt+Pause toggles passthrough off for sway administration.
GPU acceleration
Section titled “GPU acceleration”KWin renders through EGL on the GPU behind sway’s buffers. With NVIDIA through CDI,
pod-sway’s wrapper picks gles2 with the NVIDIA GBM/EGL vendor. Measured:
Compositing Type: OpenGL ES, OpenGL renderer string: NVIDIA GeForce RTX 4080 SUPER.
The same stack on an AMD GPU composites on radeonsi. Check it live with:
qdbus6 org.kde.KWin /KWin supportInformation | grep -E 'Compositing Type|OpenGL renderer'Testing (check-kde-vnc-pod)
Section titled “Testing (check-kde-vnc-pod)”| what | verb |
|---|---|
| services RUNNING | command: supervisorctl status |
| KWin fullscreen | command: swaymsg -t get_tree → "fullscreen_mode": 1 |
| hardware GL | command: KWin supportInformation, renderer not llvmpipe |
| VNC up and the frame | vnc: status, vnc: screenshot + artifact_min_dimensions + artifact_not_uniform |
| input reaches Plasma | vnc: type + vnc: key Return into a Konsole, then file: the marker it created (absence asserted first) |
Drive keyboard input with vnc:, never wl: type: wtype’s private keymap is re-mapped
by the nested KWin, so the typed text arrives garbled.

