Get the FREE Ultimate OpenClaw Setup Guide →
G

Peekaboox

Scanned

@gedigi

npx machina-cli add skill @gedigi/peekaboox --openclaw
Files (1)
SKILL.md
5.1 KB

Linux Desktop GUI Automation

Automate any X11 Linux desktop: capture screens, find and click elements, type, use hotkeys, manage windows.

Preferred screenshot interpretation path: capture with capture.sh and interpret the image directly in your OpenClaw chat (existing image-capable model connection).

Prerequisites

  • X11 session running (XFCE, GNOME on X11, KDE on X11, i3, openbox, etc.)
  • DISPLAY environment variable set (usually :0)
  • Run bash install.sh once to install dependencies
  • No extra key needed for screenshot interpretation when using OpenClaw's image-capable chat path

Quick Reference

TaskCommand
Take screenshotbash capture.sh
Screenshot of windowbash capture.sh --window "Firefox"
List windowsbash inspect.sh
Active window infobash inspect.sh --active
Find window by namebash inspect.sh --window "Firefox"
Click at coordinatesbash click.sh --x 500 --y 300
Right-clickbash click.sh --x 500 --y 300 --button right
Double-clickbash click.sh --x 500 --y 300 --double
Click relative to windowbash click.sh --window "Firefox" --x 200 --y 150
Type textbash type.sh "hello world"
Type into windowbash type.sh --window "Terminal" "ls -la"
Send hotkeybash hotkey.sh "ctrl+c"
Send Enterbash hotkey.sh "Return"
Scroll downbash scroll.sh --direction down --amount 3
Scroll up at positionbash scroll.sh --x 500 --y 300 --direction up --amount 3
Focus windowbash window.sh --action focus --window "Firefox"
Minimize windowbash window.sh --action minimize --window "Firefox"
Maximize windowbash window.sh --action maximize --window "Firefox"
Close windowbash window.sh --action close --window "Firefox"
Move windowbash window.sh --action move --window "Firefox" --x 100 --y 50
Resize windowbash window.sh --action resize --window "Firefox" --width 1280 --height 800

Typical Automation Workflow

For most GUI automation tasks, follow this pattern:

  1. Capture a screenshot with capture.sh — note the file path printed
  2. Look at the screenshot yourself to understand what's on screen
  3. Find the target element by examining the screenshot and estimating its pixel coordinates
  4. Act using the coordinates: click.sh --x X --y Y
  5. Verify by capturing another screenshot and checking the result

Example: Click the Save button in a dialog

# Step 1: Capture the screen
SCREENSHOT=$(bash capture.sh | tail -1)

# Step 2: Look at the screenshot (read the image file with your vision)
# Examine the image and identify the Save button's position

# Step 3: Click at the coordinates you identified
bash click.sh --x 450 --y 320

Example: Type into a specific application

# Focus the terminal window and type a command
bash type.sh --window "Terminal" "ls -la"
bash hotkey.sh "Return"

Example: Window management

# Maximize Firefox, then focus a terminal
bash window.sh --action maximize --window "Firefox"
bash window.sh --action focus --window "Terminal"

JSON Output

All tools support a --json flag for machine-readable output:

{"success": true, "output": "...", "error": null}

On failure:

{"success": false, "output": null, "error": "Error description"}

Environment Setup

If DISPLAY is not set (e.g., running over SSH), set it before calling any tool:

export DISPLAY=:0

For headless servers with a virtual display:

Xvfb :0 -screen 0 1920x1080x24 &
export DISPLAY=:0

Hotkey Reference

Key names follow X11 conventions:

KeyName
EnterReturn
TabTab
EscapeEscape
BackspaceBackSpace
DeleteDelete
HomeHome
EndEnd
Page UpPage_Up
Page DownPage_Down
F1-F12F1 through F12
Super/Winsuper
Ctrlctrl
Altalt
Shiftshift

Combine with +: ctrl+c, ctrl+shift+t, alt+F4, super+d

Limitations

  • X11 only — does not work on Wayland sessions
  • Cannot interact with Wayland-native apps in a Wayland session
  • Some apps with custom rendering (games, Electron apps with security flags) may resist automation
  • Screenshot quality depends on compositor; disable compositing if captures look wrong

Source

git clone https://clawhub.ai/gedigi/peekabooxView on GitHub

Overview

Peekaboox automates the Linux desktop under X11. It can capture screens, locate and click UI elements, type text, send hotkeys, scroll, and manage windows—perfect for GUI testing and desktop automation. It relies on X11 (not Wayland) and uses scripts like capture.sh, click.sh, type.sh, and window.sh with dependencies xdotool, wmctrl, and scrot.

How This Skill Works

You run a suite of shell scripts that orchestrate X11 tools to interact with the GUI: capture.sh for screenshots, inspect.sh to enumerate windows, click.sh and type.sh to simulate input, hotkey.sh for shortcuts, scroll.sh for scrolling, and window.sh for focus/move/resize. Interactions are located by pixel coordinates or window names, matching on-screen visuals rather than accessibility IDs. An X11 session is required (DISPLAY must be set) and the system relies on the installed binaries (xdotool, wmctrl, scrot).

When to Use It

  • Automating repetitive data-entry in a Linux GUI application
  • Automated GUI testing of desktop apps on X11 (not Wayland)
  • Remote desktop demos or tutorials requiring scripted interactions
  • Documentation or QA workflows that rely on screenshots and UI actions
  • Managing multi-window workflows: focus, move, resize, minimize, and maximize

Quick Start

  1. Step 1: Ensure an X11 session and run bash install.sh to install dependencies
  2. Step 2: Capture the screen with bash capture.sh and review the result
  3. Step 3: Perform actions (e.g., bash click.sh --x 500 --y 300, or bash type.sh 'ls -la') and verify with another capture

Best Practices

  • Ensure an active X11 session and DISPLAY variable before running scripts
  • Install and verify dependencies with the provided install.sh (xdotool, wmctrl, scrot)
  • Prefer window-based actions (window.sh) when possible, fall back to coordinates
  • Start with capture.sh to visually locate UI elements before acting
  • Validate results by capturing a final screenshot and comparing state

Example Use Cases

  • Click the Save button in a dialog after capturing the screen with capture.sh
  • Type a command into Terminal and execute it with Return using type.sh and hotkey.sh
  • Maximize Firefox, then focus a Terminal window to run subsequent actions
  • Scroll through a long document with scroll.sh and confirm with a screenshot
  • Send a Ctrl+C hotkey to stop a running process in Terminal

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers