From b5465e3cb13c18f19c606698a3b3e24eaabbf09c Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 5 Jun 2025 23:34:36 +0200 Subject: [PATCH] novnc: autoconnect=true --- Dockerfile | 1 + docker-entrypoint.sh | 2 +- test/webgl.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 55560fb..82f70b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # Partially from https://github.com/microsoft/playwright/blob/main/utils/docker/Dockerfile.noble +# Ubuntu 24.04 LTS (Noble Numbat) FROM ubuntu:noble # Configuration variables are at the end! diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 58b7eb0..2ace652 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -35,6 +35,6 @@ fi echo "TurboVNC is running on port $VNC_PORT ($pwt) with resolution ${WIDTH}x${HEIGHT}" # TODO keep websockify just for custom NOVNC_PORT? https://www.perplexity.ai/search/how-to-specify-the-novnc-port-rfv96C9tTZufnyFPRye5xA#0 websockify -D --web "/usr/share/novnc/" "$NOVNC_PORT" "localhost:$VNC_PORT" 2>/dev/null 1>&2 & -echo "noVNC (VNC via browser) is running on http://localhost:$NOVNC_PORT" +echo "noVNC (VNC via browser) is running on http://localhost:$NOVNC_PORT/?autoconnect=true" echo exec tini -g -- "$@" # https://github.com/krallin/tini/issues/8 node/playwright respond to signals like ctrl-c, but unsure about zombie processes diff --git a/test/webgl.js b/test/webgl.js index 754c331..3f6d00e 100644 --- a/test/webgl.js +++ b/test/webgl.js @@ -4,6 +4,7 @@ import { cfg } from '../src/config.js'; const context = await chromium.launchPersistentContext(cfg.dir.browser, { headless: false, // don't use cfg.headless headless here since SHOW=0 will lead to captcha + viewport: { width: cfg.width, height: cfg.height }, locale: 'en-US', // ignore OS locale to be sure to have english text for locators recordVideo: cfg.record ? { dir: 'data/record/', size: { width: cfg.width, height: cfg.height } } : undefined, // will record a .webm video for each page navigated; without size, video would be scaled down to fit 800x800 handleSIGINT: false, // have to handle ourselves and call context.close(), otherwise recordings from above won't be saved