From 590e7f0e4c4875b19b5383805df6695d2824b214 Mon Sep 17 00:00:00 2001 From: dragon Date: Wed, 14 Oct 2026 15:35:08 +0800 Subject: [PATCH] =?UTF-8?q?vnc=20unit:=20Restart=3Dalways=20=E2=80=94=20wa?= =?UTF-8?q?yvnc=20exits=200=20when=20its=20monitor=20goes=20away?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the test machine the monitor came back as HDMI-A-1 instead of HDMI-A-2; wayvnc logged "No fallback outputs left" and exited 0, so Restart=on-failure never brought it back and the browser desktop said "cannot connect". Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 1 + bin/omarchy-remote | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index ab49126..a5a7969 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,6 +67,7 @@ per-user desktops, and distribution through the Omarchy plugin marketplace. - Guest accounts have no password: Omarchy's idle lock (quickshell, 300 s) would lock them out for good. The `~/.local/state/omarchy/indicators/stay-awake` file disables it; there is no unlock IPC. - Tailscale SSH accepts any local user on the test machine (`ssh @`), handy for acting as a guest without sudo. - Ollama (and Vite, Rails dev…) refuse a Host that isn't localhost: 403 through every provider. `expose --host-header localhost` rewrites it (Cloudflare ingress `originRequest.httpHostHeader`, Pangolin `setHostHeader`); `tailscale serve` can't. Off by default: apps that build absolute URLs need the real Host. The demo video used a mock model, which is why this went unnoticed. +- wayvnc exits with status 0 when its output disappears ("No fallback outputs left", e.g. HDMI-A-2 became HDMI-A-1 after a replug), so the owner's VNC unit needs `Restart=always`; with on-failure the desktop silently stayed down for two days. - noVNC settings live in `$NOVNC_DIR/defaults.json`; `index.html` symlinks to `vnc.html` so `/` opens the desktop. ## Roadmap diff --git a/bin/omarchy-remote b/bin/omarchy-remote index 2d26228..986b5be 100755 --- a/bin/omarchy-remote +++ b/bin/omarchy-remote @@ -9,7 +9,7 @@ set -euo pipefail -VERSION="0.7.1" +VERSION="0.7.2" # ---- settings (override in ~/.config/omarchy-remote/config) ----------------- CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy-remote/config" @@ -141,7 +141,9 @@ PartOf=graphical-session.target [Service] ExecStartPre=$self ensure-display ExecStart=/usr/bin/wayvnc 127.0.0.1 $VNC_PORT -Restart=on-failure +# wayvnc exits 0 when its monitor goes away (unplugged, renamed after a replug), so +# on-failure would leave the desktop down; ensure-display adds a headless one if needed. +Restart=always RestartSec=3 [Install]