From 0e767c815818b49f16c786d60843f2ac01f5ffab Mon Sep 17 00:00:00 2001 From: Catherine Jue Date: Thu, 24 Apr 2025 19:43:48 -0700 Subject: [PATCH 1/2] Add noVNC window size configs --- containers/docker/Dockerfile | 2 ++ containers/docker/README.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/containers/docker/Dockerfile b/containers/docker/Dockerfile index 60ffaedc..c9b1d820 100644 --- a/containers/docker/Dockerfile +++ b/containers/docker/Dockerfile @@ -33,9 +33,11 @@ DISPLAY=:1 chromium \ --no-sandbox \ --disable-dev-shm-usage \ --disable-gpu \ + --start-maximized \ --disable-software-rasterizer \ --remote-allow-origins=* \ --no-zygote >&2 & + echo "Setting up ncat proxy on port $CHROME_PORT" ncat \ --sh-exec "ncat localhost $INTERNAL_PORT" \ diff --git a/containers/docker/README.md b/containers/docker/README.md index 652285aa..af57c370 100644 --- a/containers/docker/README.md +++ b/containers/docker/README.md @@ -23,6 +23,13 @@ This exposes three ports: - `9222`: Chrome DevTools Protocol for browser automation via Playwright and Puppeteer - `8501`: Streamlit interfaced used by Computer Use +## Live View Configuration +You can set the browser width and height with the environment variables `WIDTH` and `HEIGHT` in the `docker run` command: + +```bash +docker run -e WIDTH=1920 -e HEIGHT=1080 -p 8501:8501 -p 8080:8080 -p 6080:6080 -p 9222:9222 kernel-chromium +``` + ## 👾 Connect via Chrome DevTools Protocol We expose port `9222` via ncat, allowing you to connect Chrome DevTools Protocol-based browser frameworks like Playwright and Puppeteer (and CDP-based SDKs like Browser Use). You can use these frameworks to drive the browser in the cloud. From 471e68d3bd08b5eb721286dfe87317f7be24aa97 Mon Sep 17 00:00:00 2001 From: Catherine Jue Date: Thu, 24 Apr 2025 19:49:35 -0700 Subject: [PATCH 2/2] update unikernel wrapper --- unikernels/unikraft-cu/wrapper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/unikernels/unikraft-cu/wrapper.sh b/unikernels/unikraft-cu/wrapper.sh index ed37eeb9..ca905989 100755 --- a/unikernels/unikraft-cu/wrapper.sh +++ b/unikernels/unikraft-cu/wrapper.sh @@ -27,6 +27,7 @@ DISPLAY=:1 chromium \ --no-sandbox \ --disable-dev-shm-usage \ --disable-gpu \ + --start-maximized \ --disable-software-rasterizer \ --remote-allow-origins=* \ --no-zygote >&2 &