📚 Encyclopedia

Tools & Workflow · updated 2026-11-02

Driving a desktop from a headless agent shell (DISPLAY, clipboard, sudo hand-off)

x11xclipclipboardsudopkexecclaude-codeshellgtk4screenshots

An agent's shell (Claude Code, a cron job, a systemd user service) runs without the user's graphical environment variables and without a terminal for passwords. On an X11 desktop most of that can be bridged: GUI apps and the clipboard are reachable by setting DISPLAY, and root commands can be handed to the user with one paste. On Wayland-only sessions it cannot, because the shell has no Wayland socket.

Launching GUI apps

Screenshots of an app you just built

Installing a local app into the desktop menu

A per-user install needs no root: icons into ~/.local/share/icons/hicolor/<size>/apps/, a .desktop file into ~/.local/share/applications/<app-id>.desktop, and a symlink into ~/.local/bin for a command. Keep it in an install.sh that also regenerates the icon, so it can be rerun after changes.

Clipboard hand-off (instead of "please copy this")

Root without typing a password

Gotchas

See also

Linked from

Sources: home memory reference_claude_shell_limits, global CLAUDE.md clipboard workflow, ~/dev memory calc-app