Skip to content

wayvnc

Recipe card from the charly-selkies plugin (Images — the deployable catalog).

wayvnc – VNC server for Wayland compositors

Section titled “wayvnc – VNC server for Wayland compositors”
Property Value
Dependencies supervisord
Ports tcp:5900 (non-HTTP protocol)
Service wayvnc (supervisord, priority 20)
Install files task:, wayvnc-wrapper
  • wayvnc (RPM)
# charly.yml -- typically included via sway-desktop composition
my-desktop:
candy:
- wayvnc
Terminal window
charly check live my-image --filter vnc # run the candy's vnc: screenshot / status steps
charly settings set vnc.password.my-image … # store auth in the VNC credential store
# the candy's vnc: passwd step then configures VeNCrypt/TLS server-side

NVIDIA Headless: Fixed via Pixman + DPMS Workaround

Section titled “NVIDIA Headless: Fixed via Pixman + DPMS Workaround”

VNC screenshots work correctly on NVIDIA headless when used via sway-desktop-vnc (the standard VNC composition). Two fixes make this work:

  1. Pixman renderer — sway-desktop-vnc sets WLR_RENDERER=pixman in its candy env, forcing software rendering. The sway-wrapper skips GPU auto-detection when WLR_RENDERER is pre-set.

  2. DPMS workaround (wayvnc <= 0.9.1 only) — wayvnc 0.9.1 gates screen capture on zwlr_output_power_v1 mode events, but sway’s headless backend never emits them. The wayvnc-wrapper performs a minimal VNC handshake to trigger wayvnc to bind the power manager, then swaymsg "output <output> power on" forces the missing event. It runs ONLY when the installed wayvnc is <= 0.9.1 on headless sway: wayvnc 0.10.2 (Arch/CachyOS, the latest upstream release) serves a full frame on headless sway 1.12 with no workaround (measured). Fedora 43/44, Debian 13 and Ubuntu 25.x still ship 0.9.1; delete the workaround once none of the supported distros does.

Compositor-agnostic wrapper. The wrapper waits only for $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY; the sway IPC wait runs only when sway is running. WAYVNC_OUTPUT picks the served output (unset = wayvnc’s first output — HEADLESS-1 on a headless sway), and WAYVNC_MAX_FPS caps the frame rate. Installed from the distro package on Fedora AND Arch/CachyOS.

For boxes NOT using sway-desktop-vnc (custom sway + wayvnc setups), the wl: screenshot method (grim) remains a reliable fallback.

The wayvnc-wrapper uses a two-phase wait:

  1. Wait for Wayland display socket (wayland-0)
  2. Wait for sway IPC socket (sway-ipc.*.sock) + 2s delay

This ensures sway has set the output resolution (default 1920x1080) before wayvnc connects.

Part of the desktop composition.

Use when the user asks about:

  • VNC server setup or configuration
  • Remote desktop access to containers
  • Port 5900 (tcp protocol)
  • VNC password or TLS authentication
  • wayvnc wrapper or configuration
  • /charly-image:layer — candy authoring reference (charly.yml schema, task verbs, service declarations)
  • /charly-check:check — declarative testing (check: block, charly check box, charly check live)