Skip to content

vnc unit: Restart=always (wayvnc exits 0 when its monitor goes away) — 0.7.2 - #13

Merged
longzhi merged 1 commit into
mainfrom
fix/vnc-restart
Oct 14, 2026
Merged

longzhi merged 1 commit into
mainfrom
fix/vnc-restart

Conversation

@longzhi

@longzhi longzhi commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Problem

The browser desktop showed noVNC's "cannot connect to server". On the test machine the monitor had come back as HDMI-A-1 instead of HDMI-A-2 two days earlier; wayvnc logged Selected output HDMI-A-2 went away … No fallback outputs left. Exiting… and exited with status 0, so Restart=on-failure never restarted it.

Fix

Restart=always on the owner's omarchy-remote-vnc.service (users' units from user add already had it). On restart, ensure-display attaches to whatever output exists, or creates a headless one. Existing installs pick it up by running the installer again (or omarchy-remote setup). VERSION 0.7.2; CLAUDE.md gotcha added.

Tested

  • shellcheck
  • on the test machine: units rewritten with setup, wayvnc killed with a clean exit → back within a few seconds

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@longzhi
longzhi merged commit 6619840 into main Oct 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants