dsh-computer-use-linux: Control Linux Desktop with Native Tools in DSH

Introduction

When performing local automation in DeepSeek Harness (DSH), a common practice is to spin up a standalone MCP service and register the tool names in the configuration. On the desktop side, handling AT-SPI, window management, screenshots, and Wayland/X11 inputs is required, and the engine itself is often already a complete MCP implementation. Repeating this integration within DSH every time slows down the adoption of upstream fixes.

The following introduces the community plugin @brucezhang1993/dsh-computer-use-linux: it bridges the upstream computer-use-linux MCP service into native mcp__cul__* tools via DSH’s built-in @deepseek-ai/dsh-mcp-client, and comes with a bundled skill. It does not modify the DSH core nor introduce additional runtime dependencies.

What is this

  • Maintainer: BruceZhang1993 (GitHub: BruceZhang1993/dsh-computer-use-linux)
  • Category: Client (Community Directory SkillHub Entry)
  • License: MIT (see repository README)
  • Positioning: Linux desktop computer use — allowing agents to observe the local desktop (AT-SPI accessibility tree, window list, screenshots) and execute actions such as focusing/moving/zooming windows, clicking, dragging, scrolling, typing, pressing keys, and performing accessibility semantic actions. Wayland and X11 share the same tool naming convention, aligning with the capabilities exposed by upstream Claude Code / Codex plugins.

Architecturally, the DSH agent calls mcp__cul__* → Built-in MCP Client (stdio, JSON-RPC 2.0) → This package’s launcher bin/computer-use-linux-mcp.mjs → Fixed-version Rust upstream binary (approx. 9 MB). The plugin is responsible only for parsing/validating/launching the binary, while desktop capabilities are maintained upstream.

Core Features

Exposed Tools (18 default)

Tool names are unified as mcp__cul__<original_name>, corresponding one-to-one with upstream default tools:

Group Tools
Diagnostics doctor, setup_accessibility, setup_window_targeting
Discovery list_apps, list_windows, focused_window
Observation get_app_state, screenshot
Input click, drag, scroll, press_key, type_text
Semantic perform_action, set_value
Window activate_window, move_window, resize_window

There are 2 additional conditional tools disabled by default, requiring explicit enabling via environment variables: run_shell (COMPUTER_USE_LINUX_ENABLE_SHELL=1, unsandboxed, as DSH already has a sandboxed shell) and complete_interaction (COMPUTER_USE_LINUX_NOTIFY_ON_COMPLETE=1).

Upstream Capabilities Overview (Forwarded via Launcher)

  • AT-SPI: Accessibility tree and semantic actions
  • Compositor Backends: Window list and focus (README lists GNOME, KWin, Hyprland, niri, i3, COSMIC, X11/EWMH, etc.)
  • Portals / Shell: Screenshots
  • ydotool / portal / xdotool: Input synthesis

Binary Resolution Order

The launcher resolves executables using “first match wins”:

  1. Environment variable COMPUTER_USE_LINUX_BIN (absolute path)
  2. ~/.cache/computer-use-linux/plugin/v<version>/computer-use-linux (same layout as upstream Claude/Codex plugins, one cache per machine)
  3. Installed @agent-sh/computer-use-linux npm package
  4. computer-use-linux on PATH
  5. Download from GitHub release and verify .sha256

Version and mirror behavior can be overridden via COMPUTER_USE_LINUX_VERSION, COMPUTER_USE_LINUX_DOWNLOAD_BASE, and COMPUTER_USE_LINUX_SKIP_DOWNLOAD. See repository docs/installation.md for details.

Environment and Requirements

  • Platform: Linux (x86_64 or arm64); plugin is disabled on non-Linux platforms.
  • DSH: Requires built-in @deepseek-ai/dsh-mcp-client (official README states that shipped profiles include it).
  • Node: 20+ (for launcher; runs under Electron via ELECTRON_RUN_AS_NODE=1 in DSH Desktop).
  • Session: A graphical desktop is required; accessibility, window, and input backends vary by compositor. After installation, prioritize calling mcp__cul__doctor and troubleshoot according to skills/computer-use-linux/references/setup.md in the skill.

Installation and Activation

The package is published on GitHub Packages (scope @brucezhang1993). Before installation, the profile must be configured to see the registry and complete authentication.

CLI Profile (Web Example)

First, write the scope to the profile’s .npmrc, then log in using the legacy method (npm 9+ requires --auth-type=legacy; the password is a classic PAT with read:packages, not the token saved by gh auth login):

printf '@brucezhang1993:registry=https://npm.pkg.github.com\n' \
  >> "${DSH_HOME:-$HOME/.dsh}/profiles/web/.npmrc"
npm login --scope=@brucezhang1993 --auth-type=legacy \
  --registry=https://npm.pkg.github.com

Install the bundle (dsh plugin validates compatibility with the current DSH version, writes to the profile’s dsh.profile.bundles upon success, and selects the bundle):

dsh plugin --profile web add @brucezhang1993/dsh-computer-use-linux          # latest
dsh plugin --profile web add @brucezhang1993/dsh-computer-use-linux@0.1.0    # pin a version

After installation, restart the harness. mcp__cul__doctor, mcp__cul__get_app_state, mcp__cul__list_windows, mcp__cul__click, etc., will appear in the model’s tool list.

For full steps (including token scope and public package options), see the repository’s docs/installation.md.

DSH Desktop

Search for and install @brucezhang1993/dsh-computer-use-linux from the registry in the plugin manager. Desktop profiles are managed solely by the application and cannot use dsh plugin --profile desktop add … (it will be rejected by design).

Local Development Directory

Link directly to the repository directory without needing to pack/publish:

dsh plugin --profile web add /absolute/path/to/dsh-computer-use-linux

Changes take effect after the next restart.

Typical Usage

In-Session Self-Check

In a DSH session, have the agent call mcp__cul__doctor first. It returns platform, portals, accessibility, window, and input backends along with a readiness summary, helping decide whether to proceed with list_windows, screenshot, click, etc.

Command Line Verification on Source or Installed Package

At the root of the checkout directory:

node scripts/check-package.mjs   # Static: patches, exports, skill consistency
node --test                      # Unit tests and launcher tests
node scripts/doctor.mjs          # Desktop readiness report, no DSH required
node scripts/selftest.mjs        # MCP handshake and tools/list via launcher

For installed copies, you can also run the shipped selftest.mjs and doctor.mjs within the package (see installation.md#verify-the-install for paths).

Use Cases and Notes

Suitable for: Developers on Linux workstations who want DSH agents to observe and operate local GUIs (including accessibility-tree-driven semantic clicking/form filling) with the same semantics as upstream computer-use-linux, and are willing to install community bundles via GitHub Packages.

Notes:

  1. Permission Boundaries: Tools run with the user and privileges of the current DSH process, capable of focusing windows, synthesizing input, and reading screen content. Read the source code and MIT license before installation, and understand that run_shell is only available when explicitly enabled via environment variables and is deliberately unsandboxed.
  2. Desktop Variance: Wayland/X11 and various compositors have differing support for AT-SPI, screenshot portals, and input backends; rely on doctor output and setup documentation, and do not assume default availability on any specific distribution.
  3. Ecosystem Relationship: The DSH community plugin directory (e.g., SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer. This plugin is a community-maintained bridge layer; the upstream engine version is determined by the plugin’s pinning and resolution logic.
  4. Package Version: The current version in package.json is 0.1.1; the CLI pinning example shows @0.1.0. Choose latest or an explicit version number as needed.

Conclusion

The value of dsh-computer-use-linux lies in bridging rather than rewriting: the upstream MCP handles the desktop engine, while DSH’s built-in MCP client handles namespace, reconnection, and image projection; you get a unified mcp__cul__* tool surface within DSH. If you run DSH on Linux and need GUI-level computer use, follow the steps above to complete GitHub Packages authentication and dsh plugin add. After restarting, use mcp__cul__doctor to verify the environment before proceeding with automation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye