Skip to content

fix: disable some computercontroller functionality when no $DISPLAY detected#7824

Merged
codefromthecrypt merged 1 commit intomainfrom
flag-off-display-automation-headless
Mar 12, 2026
Merged

fix: disable some computercontroller functionality when no $DISPLAY detected#7824
codefromthecrypt merged 1 commit intomainfrom
flag-off-display-automation-headless

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Mar 12, 2026

fixes #6797

Problem: On headless Linux (no $DISPLAY or $WAYLAND_DISPLAY), the computercontroller extension prints Warning: Failed to initialize Linux automation: Unable to detect display server every time goose runs, even though the user has no display and doesn't need display-dependent tools.

Root cause: LinuxAutomation::new() unconditionally calls initialize(), which fails when no display server is detected and prints a warning via eprintln!.

Copy link
Collaborator

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker is naturally headless so went with that to verify

Before (computer_control):

$ npx @modelcontextprotocol/inspector --cli --method tools/list docker run --rm -i ghcr.io/block/goose:latest mcp computercontroller 2>/dev/null | jq '[.tools[].name]'
[
  "automation_script",
  "cache",
  "computer_control",
  "docx_tool",
  "pdf_tool",
  "web_scrape",
  "xlsx_tool"
]

After (no computer_control):

$ npx @modelcontextprotocol/inspector --cli --method tools/list docker run --rm -i goose:pr-7824 mcp computercontroller 2>/dev/null | jq '[.tools[].name]'
[
  "automation_script",
  "cache",
  "docx_tool",
  "pdf_tool",
  "web_scrape",
  "xlsx_tool"
]

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit 9adff9b Mar 12, 2026
20 checks passed
@codefromthecrypt codefromthecrypt deleted the flag-off-display-automation-headless branch March 12, 2026 03:34
michaelneale added a commit that referenced this pull request Mar 15, 2026
* origin/main:
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set (#7284)
  fix: disable some computercontroller functionality when no $DISPLAY detected (#7824)
  test(acp): align provider and server test parity (#7822)
  fix(acp): register MCP extensions when resuming a session (#7806)

# Conflicts:
#	ui/desktop/src/hooks/useChatStream.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning Failed to initialize Linux automation in CLI mode

2 participants