跳到主内容
智客 ZICQ

技能库 智客分类:开发工程 computer-use OpenClaw

Computer Use

无头 Linux 服务器完全使用桌面计算机. Xvfb + XFCE 有 xdotool 自动化的虚拟桌面. 17个动作(点击,打出,滚动,截图,拖放等). 与OpenClaw的浏览器工具不同,在X11级别运行,因此网站无法检测自动化. 包括直播取景的VNC.

499 安装量 · 41 星标

官方网址:ClawHub

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

无头 Linux 服务器完全使用桌面计算机. Xvfb + XFCE 有 xdotool 自动化的虚拟桌面. 17个动作(点击,打出,滚动,截图,拖放等). 与OpenClaw的浏览器工具不同,在X11级别运行,因此网站无法检测自动化. 包括直播取景的VNC.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Computer Use Skill、Environment、Quick Setup、Actions Reference、Usage Examples、Take screenshot。 其中含规范建议的小节:分步指令、输入输出示例。

文件分析

文件分析:除 SKILL.md 外,正文引用了 scripts/setup-vnc.sh、scripts/screenshot.sh、scripts/click.sh、scripts/type_text.sh、scripts/key.sh、scripts/scroll.sh,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag, etc). Unlike OpenClaw's browser tool, operates at the X11 level so websites cannot detect automation. Includes VNC for live viewing.

Computer Use SkillEnvironmentQuick SetupActions ReferenceUsage ExamplesTake screenshotClick at coordinatesType textPress key comboScroll downWorkflow PatternTips

来源分类:ClawHub Browser

SKILL.md 与 Agent 调用

官方规范 ↗
name
computer-use
description
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag, etc). Unlike OpenClaw's browser tool, operates at the X11 level so websites cannot detect automation. Includes VNC for live viewing.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • scripts/setup-vnc.sh
  • scripts/screenshot.sh
  • scripts/click.sh
  • scripts/type_text.sh
  • scripts/key.sh
  • scripts/scroll.sh

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「computer-use」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-1e7f9481dc2d26c8-Computer-Use.html
请存为 .cursor/skills/computer-use/SKILL.md 或 .claude/skills/computer-use/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://clawhub.ai/skills/computer-use 取完整目录,不要只建一个 SKILL.md。

当前没有明确的 GitHub 技能包地址,请按来源页面的安装器说明操作。

ClawHub ↗

阅读排版

name: computer-use description: Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag, etc). Unlike OpenClaw's browser tool, operates at the X11 level so websites cannot detect automation. Includes VNC for live viewing. version: 1.2.1

Computer Use Skill

Full desktop GUI control for headless Linux servers. Creates a virtual display (Xvfb + XFCE) so you can run and control desktop applications on VPS/cloud instances without a physical monitor.

Environment

  • Display: :99
  • Resolution: 1024x768 (XGA, Anthropic recommended)
  • Desktop: XFCE4 (minimal — xfwm4 + panel only)

Quick Setup

Run the setup script to install everything (systemd services, flicker-free VNC):

./scripts/setup-vnc.sh

This installs:

  • Xvfb virtual display on :99
  • Minimal XFCE desktop (xfwm4 + panel, no xfdesktop)
  • x11vnc with stability flags
  • noVNC for browser access

All services auto-start on boot and auto-restart on crash.

Actions Reference

| Action | Script | Arguments | Description | |--------|--------|-----------|-------------| | screenshot | screenshot.sh | — | Capture screen → base64 PNG | | cursor_position | cursor_position.sh | — | Get current mouse X,Y | | mouse_move | mouse_move.sh | x y | Move mouse to coordinates | | left_click | click.sh | x y left | Left click at coordinates | | right_click | click.sh | x y right | Right click | | middle_click | click.sh | x y middle | Middle click | | double_click | click.sh | x y double | Double click | | triple_click | click.sh | x y triple | Triple click (select line) | | left_click_drag | drag.sh | x1 y1 x2 y2 | Drag from start to end | | left_mouse_down | mouse_down.sh | — | Press mouse button | | left_mouse_up | mouse_up.sh | — | Release mouse button | | type | type_text.sh | "text" | Type text (50 char chunks, 12ms delay) | | key | key.sh | "combo" | Press key (Return, ctrl+c, alt+F4) | | hold_key | hold_key.sh | "key" secs | Hold key for duration | | scroll | scroll.sh | dir amt [x y] | Scroll up/down/left/right | | wait | wait.sh | seconds | Wait then screenshot | | zoom | zoom.sh | x1 y1 x2 y2 | Cropped region screenshot |

Usage Examples

export DISPLAY=:99

# Take screenshot
./scripts/screenshot.sh

# Click at coordinates
./scripts/click.sh 512 384 left

# Type text
./scripts/type_text.sh "Hello world"

# Press key combo
./scripts/key.sh "ctrl+s"

# Scroll down
./scripts/scroll.sh down 5

Workflow Pattern

  1. Screenshot — Always start by seeing the screen
  2. Analyze — Identify UI elements and coordinates
  3. Act — Click, type, scroll
  4. Screenshot — Verify result
  5. Repeat

Tips

  • Screen is 1024x768, origin (0,0) at top-left
  • Click to focus before typing in text fields
  • Use ctrl+End to jump to page bottom in browsers
  • Most actions auto-screenshot after 2 sec delay
  • Long text is chunked (50 chars) with 12ms keystroke delay

Live Desktop Viewing (VNC)

Watch the desktop in real-time via browser or VNC client.

Connect via Browser

# SSH tunnel (run on your local machine)
ssh -L 6080:localhost:6080 your-server

# Open in browser
http://localhost:6080/vnc.html

Connect via VNC Client

# SSH tunnel
ssh -L 5900:localhost:5900 your-server

# Connect VNC client to localhost:5900

SSH Config (recommended)

Add to ~/.ssh/config for automatic tunneling:

Host your-server
  HostName your.server.ip
  User your-user
  LocalForward 6080 127.0.0.1:6080
  LocalForward 5900 127.0.0.1:5900

Then just ssh your-server and VNC is available.

System Services

# Check status
systemctl status xvfb xfce-minimal x11vnc novnc

# Restart if needed
sudo systemctl restart xvfb xfce-minimal x11vnc novnc

Service Chain

xvfb → xfce-minimal → x11vnc → novnc
  • xvfb: Virtual display :99 (1024x768x24)
  • xfce-minimal: Watchdog that runs xfwm4+panel, kills xfdesktop
  • x11vnc: VNC server with -noxdamage for stability
  • novnc: WebSocket proxy with heartbeat for connection stability

Opening Applications

export DISPLAY=:99

# Chrome — only use --no-sandbox if the kernel lacks user namespace support.
# Check: cat /proc/sys/kernel/unprivileged_userns_clone
#   1 = sandbox works, do NOT use --no-sandbox
#   0 = sandbox fails, --no-sandbox required as fallback
# Using --no-sandbox when unnecessary causes instability and crashes.
if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone 2>/dev/null)" = "0" ]; then
    google-chrome --no-sandbox &
else
    google-chrome &
fi

xfce4-terminal &                # Terminal
thunar &                        # File manager

Note: Snap browsers (Firefox, Chromium) have sandbox issues on headless servers. Use Chrome .deb instead:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f

Manual Setup

If you prefer manual setup instead of setup-vnc.sh:

# Install packages
sudo apt install -y xvfb xfce4 xfce4-terminal xdotool scrot imagemagick dbus-x11 x11vnc novnc websockify

# Run the setup script (generates systemd services, masks xfdesktop, starts everything)
./scripts/setup-vnc.sh

If you prefer fully manual setup, the setup-vnc.sh script generates all systemd service files inline -- read it for the exact service definitions.

Troubleshooting

VNC shows black screen

  • Check if xfwm4 is running: pgrep xfwm4
  • Restart desktop: sudo systemctl restart xfce-minimal

VNC flickering/flashing

  • Ensure xfdesktop is masked (check /usr/bin/xfdesktop)
  • xfdesktop causes flicker due to clear→draw cycles on Xvfb

VNC disconnects frequently

  • Check noVNC has --heartbeat 30 flag
  • Check x11vnc has -noxdamage flag

x11vnc crashes (SIGSEGV)

  • Add -noxdamage -noxfixes flags
  • The DAMAGE extension causes crashes on Xvfb

Requirements

Installed by setup-vnc.sh:

xvfb xfce4 xfce4-terminal xdotool scrot imagemagick dbus-x11 x11vnc novnc websockify

相关技能

开发工程

Github

使用`gh' CLI与 GitHub 进行互动。 使用`gh问题 ' 、`gh pr ' 、`gh run ' 和`gh api'处理问题、公关、CI运行和高级询问.

开发工程

Elite Longterm Memory

Cursor, Claude, ChatGPT & Copilot的终极AI代理内存系统. WAL协议+向量搜索+git-notes+云备份. 永远不要失去背景。 维比编码准备好了.

开发工程

Answeroverflow

通过Answer Overflow搜索索引的Discord社区讨论. 寻找只存在于Discord对话中的编码问题、库问题和社区QQA的解决方案.

开发工程

Git Essentials

基本内容 Git 命令和工作流程用于版本控制,分支,以及协作.