mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:10:51 +00:00
fix(browser): fall back to headless on Linux without display
This commit is contained in:
@@ -31,9 +31,13 @@ Other common Linux launch failures:
|
||||
found stale `Singleton*` lock files in the managed profile directory. OpenClaw
|
||||
removes those locks and retries once when the lock points at a dead or
|
||||
different-host process.
|
||||
- `Missing X server or $DISPLAY` means OpenClaw is trying to launch a visible
|
||||
browser on a host without a desktop session. Use `browser.headless: true`,
|
||||
start `Xvfb`, or run OpenClaw in a real desktop session.
|
||||
- `Missing X server or $DISPLAY` means a visible browser was explicitly
|
||||
requested on a host without a desktop session. By default, local managed
|
||||
profiles now fall back to headless mode on Linux when `DISPLAY` and
|
||||
`WAYLAND_DISPLAY` are both unset. If you set `OPENCLAW_BROWSER_HEADLESS=0`,
|
||||
`browser.headless: false`, or `browser.profiles.<name>.headless: false`,
|
||||
remove that headed override, set `OPENCLAW_BROWSER_HEADLESS=1`, start `Xvfb`,
|
||||
or run OpenClaw in a real desktop session.
|
||||
|
||||
### Solution 1: Install Google Chrome (Recommended)
|
||||
|
||||
@@ -120,14 +124,15 @@ curl -s http://127.0.0.1:18791/tabs
|
||||
|
||||
### Config Reference
|
||||
|
||||
| Option | Description | Default |
|
||||
| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `browser.enabled` | Enable browser control | `true` |
|
||||
| `browser.executablePath` | Path to a Chromium-based browser binary (Chrome/Brave/Edge/Chromium) | auto-detected (prefers default browser when Chromium-based) |
|
||||
| `browser.headless` | Run without GUI | `false` |
|
||||
| `browser.noSandbox` | Add `--no-sandbox` flag (needed for some Linux setups) | `false` |
|
||||
| `browser.attachOnly` | Don't launch browser, only attach to existing | `false` |
|
||||
| `browser.cdpPort` | Chrome DevTools Protocol port | `18800` |
|
||||
| Option | Description | Default |
|
||||
| --------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `browser.enabled` | Enable browser control | `true` |
|
||||
| `browser.executablePath` | Path to a Chromium-based browser binary (Chrome/Brave/Edge/Chromium) | auto-detected (prefers default browser when Chromium-based) |
|
||||
| `browser.headless` | Run without GUI | `false` |
|
||||
| `OPENCLAW_BROWSER_HEADLESS` | Per-process override for local managed browser headless mode | unset |
|
||||
| `browser.noSandbox` | Add `--no-sandbox` flag (needed for some Linux setups) | `false` |
|
||||
| `browser.attachOnly` | Don't launch browser, only attach to existing | `false` |
|
||||
| `browser.cdpPort` | Chrome DevTools Protocol port | `18800` |
|
||||
|
||||
### Problem: "No Chrome tabs found for profile=\"user\""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user