Commit Graph
2 Commits
Author SHA1 Message Date
Codex f315618bfc fix(autostart): wait for the VNC server before starting web-vnc
autostart-run.bat checked 5900 once at startup; at boot the UltraVNC service may
not be up yet, so web-vnc either spawned a 2nd VNC server (conflict) or started
serving on :8080 before the VNC server was ready, breaking browser connections.

Now autostart-run.bat polls 127.0.0.1:5900 for up to ~30s (one PowerShell loop:
TcpClient + Start-Sleep 1, exits on first accepted connection) and only then
launches web-vnc.exe -- without --spawn when 5900 already listens, or spawning a
local server (portable vnc\winvnc.exe / tvnserver.exe, else auto-detect) if it
never came up. Docs (AGENTS.md, README.md) updated.
2026-08-05 16:14:39 +03:00
Codex 754f77a8d0 feat: autostart as a service + separate password setup (set-password.bat)
- set-password.bat: one-time password setup -> writes webvnc.conf (HASH + VNC_PASSWORD), syncs UltraVNC via ensure-vnc-password.ps1; if the 'web-vnc' task is installed, restarts it (elevated) to reload the new password, skipping restart when the password is unchanged.
- run.bat: no longer prompts for the password; reads it from webvnc.conf (asks to run set-password.bat first if absent). Also clears --spawn-command (not just --spawn) when 5900 is already listening, to avoid spawning a 2nd VNC server.
- scripts/autostart-run.bat: non-interactive launcher for the scheduled task (reads webvnc.conf, finds only a LOCAL VNC server, never downloads at boot).
- scripts/install-autostart.bat / uninstall-autostart.bat: register/remove a 'web-vnc' scheduled task (ONSTART, SYSTEM, HIGHEST) via schtasks.
- scripts/restart-autostart.bat: restart the task to apply a new password; checks whether web-vnc.exe is running (stop+start, or just start).
- .gitignore: ignore webvnc.conf (secret).
- AGENTS.md / README.md: document the autostart flow, set-password.bat, the new scripts, and that the running gateway must be restarted to apply a password change.
2026-08-05 15:23:58 +03:00