kde-nested
Recipe card from the charly-selkies plugin (Images — the deployable catalog).
kde-nested — Plasma nested in any Wayland compositor
Section titled “kde-nested — Plasma nested in any Wayland compositor”What it is
Section titled “What it is”One candy, kde-nested, with one supervised service, kde-nested, that runs
kde-nested-session:
- waits (bounded) for the host compositor’s socket in
KDE_NESTED_RUNTIME_DIR; - starts
kwin_wayland --wayland-display <host> --socket <own> --xwayland; - waits for KWin’s socket and starts
plasmashellon it.
The candy composes layer-kde-shell (Plasma without SDDM, plus the session bus via
pod-dbus and kdotool). It also strips cap_sys_nice from kwin_wayland at build
time, because the pod’s no-new-privileges refuses to exec a file-capability binary.
The knobs (environment)
Section titled “The knobs (environment)”| variable | default | meaning |
|---|---|---|
KDE_NESTED_HOST_DISPLAY |
wayland-0 |
the host compositor’s socket KWin nests into |
KDE_NESTED_SOCKET |
wayland-kde |
the socket KWin serves to Plasma and its apps |
KDE_NESTED_RUNTIME_DIR |
inherited XDG_RUNTIME_DIR, else /tmp |
the XDG_RUNTIME_DIR holding both sockets |
KDE_NESTED_RESOLUTION |
empty | WxH of KWin’s window; empty takes the host’s configure |
KDE_NESTED_BUS |
session |
session = the pod’s shared bus; private = dbus-run-session |
The composing pod sets them in its own candy env:. A later candy’s env: overrides an
earlier one’s.
| pod | host | KWin socket | runtime dir | size | bus |
|---|---|---|---|---|---|
| pod-kde-vnc | sway wayland-0 |
wayland-kde |
/tmp |
1920x1080 |
session |
| pod-kde-vnc-cdp | sway wayland-0 |
wayland-kde |
/tmp |
1920x1080 |
session |
pod-kde-vnc-cdp composes pod-kde-vnc, so it inherits the same five knobs and adds only
Chrome — there is no second nested-session configuration. The KDE_NESTED_BUS=private
knob stays: a compositor whose session bus the venue’s dbus: verb cannot see still
needs it.
Things that were measured, not assumed
Section titled “Things that were measured, not assumed”- Never
startplasma-wayland. Without a systemd session it falls back to a headless KWin that holds no connection to the host, so the host shows a black frame. - KWin needs
WAYLAND_DISPLAY=<host>as well as--wayland-display. Without it the nested output stays black. - The KWin socket must not collide with a numbered host socket. pod-sway’s sway
serves
wayland-1behind awayland-0symlink, which is why the default iswayland-kde. KDE_SESSION_VERSION=6is exported, because kdotool refuses to run without it.- Typing into Plasma goes through the transport (VNC key events, cstream control
events), never
wtype: the nested KWin re-maps a client’s private keymap and the text arrives garbled.
Checks
Section titled “Checks”The leaf’s plan proves:
- at build time: the launcher, the nesting invocation, no caps on
kwin_wayland, andkdotool; - at runtime: the
kde-nestedservice RUNNING andplasmashell.
KWin’s renderer (OpenGL, not llvmpipe) is asserted by each pod’s bed on the bus that pod
chose, e.g. dbus: call org.kde.KWin /KWin org.kde.KWin.supportInformation.
Cross-references
Section titled “Cross-references”/charly-selkies:kde-shell: the Plasma package set./charly-selkies:kde-vnc,/charly-selkies:kde-vnc-cdp: the pods that compose this leaf. The two earlier consumers retired by opencharly/opencharly#1293 are no longer published./charly-check:dbus,/charly-check:wl: the verbs the pods’ beds use against the nested session.

