- Home
- Skills
- Agents & Orchestration
- Linux Wayland and X11 Desktop Control
Works with the AI Agents you already use
Linux Wayland and X11 Desktop Control
by NaghtSieger
Automate native Linux desktop apps on GNOME Wayland (including headless virtual displays) and X11 with Mutter ScreenCast screenshots, Mutter RemoteDesktop input, AT-SPI2 background actions, local Tesseract OCR, and lock-screen safety guards.
$14.99
What it does
- Detects session lock (SESSION_LOCKED), Wayland/X11 environment, monitor geometry, and backends—even via SSH
- Inspects native Linux UI trees via AT-SPI2 and invokes buttons, edits text, or selects text in background
- Captures window or monitor PNG screenshots on GNOME Wayland via Mutter.ScreenCast + PipeWire, grim, or X11
- Extracts line bounding boxes and pixel click centers from Chrome or Electron via Tesseract OCR (eng/chi_sim)
- Injects Wayland/X11 clicks, smooth scroll, drags, chords, and Unicode/CJK text with clipboard backup/restore
Who it's for
Ubuntu & Fedora Wayland developers
True GNOME Wayland desktop automation where legacy X11 xdotool scripts fail
Try asking: “Run Linux desktop capabilities preflight, capture the active GNOME window with OCR, and click the Settings button.”
Headless Linux workstation owners
Works on virtual gnome-remote-desktop Wayland sessions and automatically discovers WAYLAND_DISPLAY / D-Bus from SSH
Try asking: “List open windows on my headless Ubuntu Wayland session and inspect the target app's AT-SPI2 controls.”
QA & desktop app engineers
Fast AT-SPI2 background control combined with local Tesseract OCR fallback for Electron and browser UIs
Try asking: “Inspect the open GTK app with AT-SPI2, fill the search field in the background, and verify the updated list.”
AI coding agent users on Linux
Five compact, self-contained Python 3 CLI scripts with zero npm dependencies and strict lock-screen safety
Try asking: “Capture a cropped screenshot of my Linux app, run Tesseract OCR, and scroll down smoothly.”
Linux Wayland and X11 Desktop Control
Example session with this skill installed
Check my Ubuntu GNOME Wayland desktop backends, capture a cropped screenshot of the top-left region with Tesseract OCR, and inspect available AT-SPI2 applications.
- Read your context and instructions
- Compiled the linux wayland
Summary
Verified unlocked Ubuntu GNOME Wayland session (wayland-0), discovered AT-SPI2 applications, captured a native Mutter ScreenCast crop with Tesseract OCR, and clicked the exact detected center via Mutter.RemoteDesktop.
Agent execution:
- Runs
linux_windows.py capabilitiesto verify the desktop is unlocked and inspect live backends:
{"ok":true,"sessionLocked":false,"sessionType":"wayland","desktop":"ubuntu:GNOME","waylandDisplay":"wayland-0","monitors":[{"index":0,"connector":"Meta-0","x":0,"y":0,"width":2560,"height":1440,"primary":true,"scale":1.0}],"backends":{"mutterScreenCast":true,"mutterRemoteDesktop":true,"atspi":true,"tesseract":true,"ydotool":true,"xdotool":true,"xclip":true}}
- Runs
linux_ax.py list-appsto discover applications exposing native AT-SPI2 controls:
{"ok":true,"apps":[{"index":0,"name":"gnome-shell","pid":3361,"windows":1},{"index":1,"name":"Settings","pid":4812,"windows":1}]}
- Runs
linux_capture_ocr.py screenshot --crop "0,0,640,360" --ocr --lang engover native GNOME Mutter ScreenCast + PipeWire:
{"ok":true,"outputPath":"/tmp/linux_cua_a1b2.png","pixelWidth":640,"pixelHeight":360,"backend":"mutter-screencast-monitor-crop","ocr":{"width":640,"height":360,"lang":"eng","items":[{"text":"Settings","bbox":[42,18,128,36],"center":[85,27],"confidence":0.96}]}}
- Clicks the exact OCR center using
linux_pointer.py click --x 85 --y 27 --window-bounds "0,0,640,360"({"ok":true,"dispatched":true,"screenX":85.0,"screenY":27.0,"route":"mutter-remote-desktop"}), then verifies the new UI state and deletes the temporary screenshot.
Connects securely to your tools. The creator never sees your data.
About this skill
Most Linux computer-use tools assume legacy X11 and break immediately on modern Ubuntu, Fedora, and GNOME Wayland desktops—or fail silently when launched from an SSH session or headless virtual display.
How it works
This skill equips your AI agent with five compact, standalone Python 3 scripts designed natively for GNOME Wayland while preserving full wlroots Wayland and X11 fallback support:
- Desktop Auto-Discovery & Lock-Screen Guard: Automatically resolves
WAYLAND_DISPLAY,DISPLAY, andDBUS_SESSION_BUS_ADDRESS(even from non-login or SSH shells) and fails closed withSESSION_LOCKEDwhenever the screen is locked. - AT-SPI2 Background Control: Reads the live Linux accessibility tree with deterministic node paths so the agent can invoke buttons, write text into editable fields, and select text without stealing the mouse cursor.
- Native Wayland ScreenCast + Local Tesseract OCR: Captures PNG screenshots directly from GNOME
Mutter.ScreenCastover PipeWire (pipewiresrc+pngenc), crops cleanly to window bounds with HiDPI awareness, and runs local Tesseract TSV OCR to return exact line bounding boxes and click centers. - Wayland Pointer & Keyboard Injection: Uses
Mutter.RemoteDesktopD-Bus (falling back cleanly toydotoolorxdotool), wraps every modifier and mouse button intry/finallyrelease guards, and automatically routes non-ASCII/CJK text through clipboard-preservingCtrl+Vpaste so XKB never drops Unicode characters.
Frameworks & tools
Pure Python 3 scripts using native Linux desktop interfaces: GLib/Gio D-Bus (org.gnome.Mutter.ScreenCast, org.gnome.Mutter.RemoteDesktop, org.gnome.Mutter.DisplayConfig, org.gnome.ScreenSaver), GStreamer (pipewiresrc), AT-SPI2, Pillow, and optional tesseract-ocr, wl-clipboard/xclip, grim, ydotool, and xdotool.
Why this beats prompting it yourself
Getting Wayland desktop control right takes weeks of compositor debugging: PipeWire stream handshakes on isolated GLib MainContext threads, virtual pointer warm-up so Mutter does not swallow the first click, XKB keysym resolution for shortcuts, CJK clipboard-restore fallback, and fail-closed lock-screen checks. All of that engineering is distilled into five clean, auditable scripts under 20 KB each.
Use cases
- Automating Ubuntu / Fedora GNOME Wayland desktop apps natively
- Driving headless Linux GUI workstations over SSH or virtual displays
- Testing GTK, Qt, Electron, and browser apps with AT-SPI2 + Tesseract OCR
- Running safe GUI workflows that automatically halt when the screen locks
Known limitations
- Full GNOME Wayland capture and input require
python3-gi,gstreamer1.0-pipewire, andpython3-pilinstalled via the distro package manager. - Non-GNOME wlroots Wayland compositors use
grim(screenshots) andydotool(move/click/ASCII typing) fallbacks; full smooth scroll, drag, and key chords are natively supported on GNOME Wayland (Mutter.RemoteDesktop) and X11 (xdotool). - Clipboard restoration requires
wl-clipboard(Wayland) orxclip(X11).
- **Scripts included** (each self-contained, under 20 KB, pure UTF-8 Python 3, zero `shell=True` or `os.system`): - `scripts/linux_windows.py` (`capabilities`, `list-windows`, `activate`) - `scripts/linux_capture_ocr.py` (`screenshot`, `ocr`) - `scripts/linux_ax.py` (`list-apps`, `tree`, `invoke`, `set-value`, `select-text`) - `scripts/linux_pointer.py` (`move`, `click`, `drag`, `scroll`) - `scripts/linux_keyboard.py` (`press-key`, `type-text`, `paste`) - **Output format**: Single-line UTF-8 JSON on stdout; structured `{"ok":false,"error":"..."}` on failure (`exit 2` on `SESSION_LOCKED`). - **Safety**: Zero `shell=True`, zero `os.system`, fail-closed GNOME/login1 lock-screen check, guaranteed `try/finally` key/button release.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
Linux only
- Software
Python 3python3-giAT-SPI2GStreamer PipeWire (GNOME Wayland)
- Optional
- tesseract-ocr
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.