--- id: known-bugs/vnc-mirror-can-orphan-duplicate-x11vnc-across title: "VNC mirror can orphan/duplicate x11vnc across sidecar restarts" theme: known-bugs status: done created: 2026-08-01 date_source: stated order: 3 --- **VNC mirror can orphan/duplicate x11vnc across sidecar restarts.** FIXED 2026-08-01 in the Xvnc rewrite. The diagnosis was right and survived the move off mirroring: the running desktop is tracked in module-level state, so a sidecar restart forgot it while the server kept running orphaned, and `waitForPort` treated ANY listener on 5900 as success — so the next start reported success while the browser talked to the stale process. Now `reclaimPort` frees 5900 (TERM, then KILL after 2s) before spawning, and `waitForPort` also fails if the process we spawned has exited, so a listener that is not ours can no longer be mistaken for a healthy start.