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.
This commit is contained in:
@@ -218,7 +218,7 @@ open-firewall.bat открыть порт 8080 в Windows Firewall (о
|
||||
webvnc.conf секрет: HASH= + VNC_PASSWORD= (создаётся set-password.bat, gitignored)
|
||||
|
||||
Внутренние помощники — в scripts/ (вызываются другими скриптами):
|
||||
scripts/autostart-run.bat неинтерактивный launcher для автостарта (читает webvnc.conf)
|
||||
scripts/autostart-run.bat неинтерактивный launcher для автостарта: читает webvnc.conf, ждёт 5900 до ~30 c, затем запускает web-vnc (без --spawn, если VNC уже слушает)
|
||||
scripts/ensure-vnc-password.ps1 синхронизирует VNC-пароль UltraVNC (вызывается из set-password.bat)
|
||||
scripts/get-novnc.{ps1,sh} скачать noVNC во встроенную статику
|
||||
scripts/get-vnc.ps1 скачать портативный VNC-сервер (UltraVNC) в папку vnc/
|
||||
|
||||
Reference in New Issue
Block a user