Linux Desktop Control
/install linux-desktop
Linux Desktop Control
Automate and control your Linux desktop using command-line tools. Capture screenshots, control mouse/keyboard, and manage windows.
When to Use
- Take screenshots of screen or specific windows
- Automate mouse movements and clicks
- Simulate keyboard input
- Manage and interact with windows
- Build desktop automation workflows
Prerequisites
Install required tools:
sudo apt-get install scrot xdotool xclip x11-utils x11-apps
Quick Start
Take Screenshot
python3 scripts/linux-desktop.py screenshot
# Output: ~/screenshot_20240224_203901.png
List Windows
python3 scripts/linux-desktop.py list
Move Mouse and Click
python3 scripts/linux-desktop.py move 500 300
python3 scripts/linux-desktop.py click
Type Text
python3 scripts/linux-desktop.py type "Hello World"
Commands
screenshot [path]
Capture a screenshot of the entire screen.
Examples:
# Save to default location (/tmp/screenshot_YYYYMMDD_HHMMSS.png)
python3 scripts/linux-desktop.py screenshot
# Save to custom path
python3 scripts/linux-desktop.py screenshot ~/desktop.png
window [window_id] [path]
Capture a screenshot of a specific window.
Examples:
# Screenshot active window
python3 scripts/linux-desktop.py window
# Screenshot specific window
python3 scripts/linux-desktop.py window 0x12345678 ~/window.png
active
Get information about the currently active window.
python3 scripts/linux-desktop.py active
# Output: 🖥️ Active Window
# ID: 0x12345678
# Title: Terminal
list
List all visible windows.
python3 scripts/linux-desktop.py list
# Output: 🪟 Found 5 windows:
# 1. 0x12345678 - Terminal
# 2. 0x87654321 - Chrome
move \x3Cx> \x3Cy>
Move mouse cursor to specified coordinates.
Examples:
python3 scripts/linux-desktop.py move 100 200
# Moves mouse to (100, 200)
python3 scripts/linux-desktop.py move 500 300
# Moves mouse to center of 1000x600 area
click [button]
Click mouse button at current cursor position.
Button values:
1- Left button (default)2- Middle button3- Right button
Examples:
python3 scripts/linux-desktop.py click
# Left click
python3 scripts/linux-desktop.py click 3
# Right click
type \x3Ctext>
Type text at current cursor position (must be in focused window).
Examples:
python3 scripts/linux-desktop.py type "Hello World"
python3 scripts/linux-desktop.py type "ls -la"
python3 scripts/linux-desktop.py type "sudo apt update"
key \x3Ckeyspec>
Press keyboard keys.
Common keys:
Return- Enter keyEscape- Escape keyTab- Tab keyBackSpace- BackspaceDelete- DeleteUp,Down,Left,Right- Arrow keysHome,End,Page_Up,Page_DownF1throughF12Ctrl+c,Ctrl+v,Ctrl+a,Ctrl+z- Key combinations
Examples:
python3 scripts/linux-desktop.py key Return
python3 scripts/linux-desktop.py key Escape
python3 scripts/linux-desktop.py key Ctrl+a
python3 scripts/linux-desktop.py key F5
screen
Get screen information.
python3 scripts/linux-desktop.py screen
# Output: 🖥️ Screen Info
# Resolution: 1920x1080
Automation Examples
Basic Automation
# Move mouse, click, type, and press enter
python3 scripts/linux-desktop.py move 100 100
python3 scripts/linux-desktop.py click
python3 scripts/linux-desktop.py type "ls -la"
python3 scripts/linux-desktop.py key Return
Web Search Automation
# Open browser, navigate to Google, search
python3 scripts/linux-desktop.py move 100 50
python3 scripts/linux-desktop.py click
python3 scripts/linux-desktop.py type "https://www.google.com"
python3 scripts/linux-desktop.py key Return
sleep 2
python3 scripts/linux-desktop.py type "how to make money online"
python3 scripts/linux-desktop.py key Return
Screenshot Workflow
# Take screenshot before and after action
python3 scripts/linux-desktop.py screenshot /tmp/before.png
python3 scripts/linux-desktop.py key F5 # Refresh
sleep 1
python3 scripts/linux-desktop.py screenshot /tmp/after.png
Tips
- Always check the active window before typing
- Use
sleepcommands between actions for reliability - Take screenshots to verify state changes
- Test commands one by one before building complex workflows
- Use window list to find specific window IDs for targeting
Troubleshooting
"Command not found" errors:
sudo apt-get install scrot xdotool xclip x11-utils x11-apps
Permission denied:
- Ensure you're running in a graphical session (X11 or Wayland)
- Some actions require focus on the target window
Mouse doesn't move:
- Check if another application is grabbing the mouse
- Try moving the mouse manually to see if it's responsive
Security Notes
- This skill can control your desktop - use with caution
- Don't automate sensitive actions without verification
- Always review automation scripts before running
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install linux-desktop - 安装完成后,直接呼叫该 Skill 的名称或使用
/linux-desktop触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Linux Desktop Control 是什么?
Linux desktop automation and control. Use when: (1) taking screenshots of the screen or windows, (2) controlling mouse and keyboard, (3) managing windows, (4... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1594 次。
如何安装 Linux Desktop Control?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install linux-desktop」即可一键安装,无需额外配置。
Linux Desktop Control 是免费的吗?
是的,Linux Desktop Control 完全免费(开源免费),可自由下载、安装和使用。
Linux Desktop Control 支持哪些平台?
Linux Desktop Control 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Linux Desktop Control?
由 ouyangAbel(@ouyangabel)开发并维护,当前版本 v1.0.0。