Install
openclaw skills install ubuntu-browser-sessionUse when a request needs a real Ubuntu Server browser session with durable site login reuse, bounded manual login recovery, or host-side page inspection for...
openclaw skills install ubuntu-browser-sessionUse the Ubuntu host browser like a long-lived local browser for the agent.
The primary model is site-centric:
session-keyRepresentative requests:
session-keyopen-protected-page.sh returns ready, keep working from this skill's host browser context and do not switch to OpenClaw's generic browser profile or other browser tools unless this workflow is exhausted or the task explicitly requires a different browser stackUse the wrapper first:
{baseDir}/scripts/open-protected-page.sh --url 'https://target.example' --session-key default
The wrapper is responsible for:
Durable default identities are tracked by canonical site, not just exact origin.
Examples:
github.com -> default GitHub browser identitygoogle.com -> default Google browser identity, including myaccount.google.comPersistent state is split across:
Important files:
~/.agent-browser/index/site-sessions.json~/.agent-browser/sessions/...~/.agent-browser/index/identity-profiles.jsonWhen the wrapper cannot recover locally, it starts the assisted browser overlay and returns:
0.0.0.0Typical outputs:
http://127.0.0.1:6084/vnc.html?autoconnect=1&resize=remote
http://192.168.0.200:6084/vnc.html?autoconnect=1&resize=remote
Use the loopback URL if you are forwarding ports over SSH from Windows or another remote machine.
Use the LAN URL only when the host firewall and network allow direct access.
open-protected-page.sh with the requested URL and desired session-key{baseDir}/scripts/assisted-session.sh capture --origin 'https://target.example' --session-key default
That finalizes the wrapper-managed session state and updates the site session registry for later reuse.
Do not use assisted-session.sh start as a normal entrypoint. Start with open-protected-page.sh so site-centric profile resolution and wrong-page recovery stay in effect.
Only reach for unrelated browser tooling after this workflow fails to complete the task and you have a concrete reason the host browser workflow is insufficient.
command -v python3
command -v curl
command -v jq
command -v Xvfb
command -v x11vnc
command -v websockify
command -v google-chrome || command -v chromium || command -v chromium-browser
scripts/open-protected-page.sh: main protected-site wrapperscripts/assisted-session.sh: bounded manual takeover and capturescripts/site-session-registry.sh: canonical per-site default session registryscripts/profile-resolution.sh: site-first profile selection with compatibility fallbackscripts/session-manifest.sh: runtime manifest storage and verification supportscripts/browser-runtime.sh: browser runtime, target selection, and page checksscripts/cdp-eval.py: CDP evaluation, page checks, and navigationscripts/cdp-snapshot.py: structured page content extraction via CDPcdp-eval.py and cdp-snapshot.py stay generic by default.
Forum/search-result helpers are optional enhancements; read references/forum-enhancements.md only when the current page is a forum topic list, category page, or search results page and you need structured topic/result links or text-based clicking.
Evaluate page state or run JavaScript over the Chrome DevTools Protocol.
# Check for challenge pages
python3 {baseDir}/scripts/cdp-eval.py --port PORT --check challenge
# Check for login walls
python3 {baseDir}/scripts/cdp-eval.py --port PORT --check login-wall
# Get page info (title, url, body snippet)
python3 {baseDir}/scripts/cdp-eval.py --port PORT --check page-info
# Run arbitrary JavaScript
python3 {baseDir}/scripts/cdp-eval.py --port PORT --eval 'document.title'
# Click the first visible link whose text matches or contains the given phrase
python3 {baseDir}/scripts/cdp-eval.py --port PORT --click-link-text 'Pricing'
# Navigate to a URL and wait for load
python3 {baseDir}/scripts/cdp-eval.py --port PORT --navigate 'https://example.com' --wait-navigation
# Navigate, wait for load, then check page state
python3 {baseDir}/scripts/cdp-eval.py --port PORT --navigate 'https://example.com' --wait-navigation --check page-info
# Navigate and wait for a specific element to appear (10s timeout)
python3 {baseDir}/scripts/cdp-eval.py --port PORT --navigate 'https://example.com' --wait-for '#main-content'
Parameters:
--port PORT (required): CDP HTTP/WebSocket port--target-id ID: specific target from /json/list--check {challenge,login-wall,page-info}: built-in page state checks--eval EXPRESSION: arbitrary JavaScript for Runtime.evaluate--navigate URL: navigate to URL via Page.navigate--click-link-text TEXT: click the first visible matching anchor; when combined with --navigate, pair it with --wait-navigation or --wait-for so the destination DOM is ready before clicking--wait-navigation: wait for Page.loadEventFired after --navigate--wait-for SELECTOR: poll for CSS selector to appear (timeout 10s)Capture structured page content in generic formats by default, plus an optional forum/search-result helper format.
# Simplified markdown (default)
python3 {baseDir}/scripts/cdp-snapshot.py --port PORT
# Plain text extraction
python3 {baseDir}/scripts/cdp-snapshot.py --port PORT --format text
# Extract all links as title+href pairs
python3 {baseDir}/scripts/cdp-snapshot.py --port PORT --format links
# Extract topic/result links from the main content area (useful on forums/search pages)
python3 {baseDir}/scripts/cdp-snapshot.py --port PORT --format topic-links
# With character limit
python3 {baseDir}/scripts/cdp-snapshot.py --port PORT --max-chars 4000
Output: JSON to stdout {"title": "...", "url": "...", "content": "..."}
Parameters:
--port PORT (required): CDP HTTP/WebSocket port--target-id ID: specific target from /json/list--format {markdown,text,links,topic-links}: output format (default: markdown)--max-chars N: truncate content to N chars (default: 8000, 0=unlimited)For topic-links, meta is best-effort surrounding text truncated to 400 characters.
See also:
references/forum-enhancements.mdreferences/use-cases.mdreferences/session-manifest.mdreferences/assisted-session-flow.mdreferences/testing-matrix.mdreferences/manual-fallback.mdreferences/validation-findings.md