Introduction¶
When enabling Agents to operate GUI programs in DSH, a common approach is to launch windows directly on the user’s KDE / GNOME desktop. Under Wayland sessions, injecting input into non-focused windows is difficult and screen capture is restricted; furthermore, automation tends to steal focus and occupy the full screen. If one switches to a visible window embedded in the user’s desktop (e.g., Xephyr), although the program is isolated, the user still sees extra windows.
Below is an introduction to the workflow plugin dsh-headless-display by maintainer jingyingruodi (GitHub: jingyingruodi/dsh-headless-display, Community Directory: SkillHub Plugin Page). It runs and operates GUIs within an independent virtual X display: providing zero windows and zero interference on the default desktop; when needed, it can pop up real windows on demand via a Web panel or tools for viewing and operation. The plugin provides 10 tools (including environment self-checks) for the Agent and exposes an HTTP API (9 /gui-isolation/* routes) along with a real-time visual panel in the Web sidebar. The current package version is 1.4.0, licensed under MIT.
What is this¶
dsh-headless-display is a local bundle plugin for DeepSeek Harness, categorized as a workflow. The core concept is to launch a separate X server (or headless sway + Xwayland) that is independent of the user session; automation, screen capture, and keyboard/mouse injection are all completed within this display, leaving the user’s main desktop unaffected by default.
The name has changed multiple times during development iterations (@local/isolated-display → @local/gui-isolation → dsh-isolated-x11 → dsh-headless-display). This is related to the DSH host’s process-level caching based on package names, which required changing the package name to load new JS during development; old links will redirect after the GitHub repository is renamed.
Silence Guarantee & Backend Selection¶
Why no extra windows appear on the desktop¶
The plugin documentation emphasizes that “silence” is guaranteed by specific mechanisms, not just slogans:
- Display Numbering: No longer relies on fragile XAUTHORITY probing, but determines ownership by process attribution (e.g., the sway backend only recognizes Xwayland associated with the sway process group) and rejects numbers equal to the user’s desktop display. Write operations also require the existence of a plugin state file (
allowForeignDisplays: truecan allow external displays). - Wayland Clients Misconnecting to Desktop: Simply deleting
WAYLAND_DISPLAYis not enough, as GTK etc. may still connect to the user’s compositor;iso_display_runpins child processes to X11 by default (GDK_BACKEND=x11,QT_QPA_PLATFORM=xcb, etc., and cleans up Wayland-related variables). If Wayland native clients are needed, you can configureexposeWaylandClients: trueor pass the absolute path to the Wayland socket within the isolated session viaenv. The trade-off is that X11 injection tools like xdotool will be ineffective for such windows. - Audio: The isolated display does not automatically isolate the sound card; by default, a PulseAudio/PipeWire null sink is created for each display and
PULSE_SINKis injected. Audio initialization on the program side proceeds normally, but there is no sound output to the speakers. Creating a virtual sink may briefly affect the user’s default output mute state, which the plugin attempts to restore; configuringaudio: 'inherit'restores sound playback. Programs accessing ALSA directly will not be intercepted by the null sink.
Three Backends¶
| Backend | Plugin Window on User Desktop? | DRI3 / GPU | Typical Use |
|---|---|---|---|
sway (Preferred by backend: auto if detected) |
No | Yes, Vulkan/GL can use GPU | Proton, DX12, 3D games, and 2D |
xvfb |
No | No (Vulkan mostly falls back to lavapipe) | Lightweight 2D / Pure X11 |
xephyr |
Yes (Visible window, disturbs user) | No | When nested windows need to be seen directly on the desktop |
The default is backend: auto: use sway if available, otherwise fall back to xvfb. Documentation for 3D games suggests using sway: Xvfb/Xephyr lack DRI3, and some UE/Unity games may malfunction directly under Xvfb.
To view the screen or operate manually, there is no need to switch backends: the panel button “Open Real Window” or the tool iso_display_popout starts VNC on the local loopback (sway uses wayvnc, xvfb/xephyr use x11vnc). The viewer defaults to gvncviewer but can be changed to TigerVNC’s vncviewer via viewerPath.
Core Features¶
- 10 Agent Tools: Environment self-check (
iso_display_doctor), start/stop isolated display, execute commands within display, screen capture, list windows, keyboard/mouse injection, pop out/dock real windows, etc. (See the “Agent Tools” section in the README for a full list). - Web Sidebar Panel: Real-time screen, click, text/key injection, window list, real window toggle.
- HTTP API: 9
/gui-isolation/*routes for use by the panel and external scripts. - Cross-Distro:
iso_display_doctorprovides installation commands for missing dependencies based on Debian / Fedora / Arch; paths are auto-detected. - Implementation: Pure JavaScript, no npm dependencies or build steps.
Installation & Enablement¶
The plugin runs with the permissions of the current DSH process user; please review the repository source code and MIT license before installing. The star count on the community directory page is 0, which does not represent feature completeness but is provided as a public metric reference.
System Dependencies (Linux)¶
The documentation suggests running iso_display_doctor after installation and pasting the commands for your local package manager based on the output. Example for Debian-based systems:
# sway backend (auto preferred; required for 3D / Proton)
sudo apt install sway grim x11-utils xdotool imagemagick
# xvfb fallback / pure 2D
sudo apt install xvfb
# On-demand "Open Real Window"
sudo apt install x11vnc wayvnc gvncviewer
# Optional: visible backend xephyr
sudo apt install xserver-xephyr
command -v sway grim Xvfb Xwayland xdpyinfo xdotool import identify x11vnc wayvnc gvncviewer
If using sway and GPU is unavailable, ensure the user is in the render group and has access to /dev/dri/renderD*.
Installing the Plugin Bundle¶
Place the repository directory at any local path, then install that directory bundle in DSH (Do not use dsh plugin add github:... commands that are not documented):
plugin_manager(action: "install_bundle", target: "<absolute path to this directory>")
Verify that it is loaded:
plugin_manager(action: "list_bundles")
dsh-headless-display should appear in the list, with rows containing gui-isolation.
Typical Usage¶
- Environment Self-Check: Call
iso_display_doctorand install missing packages as prompted; pay attention to the audio mode and pactl warnings (if pactl is missing, sound within the isolated display may still leak to the speakers). - Start Isolated Display: Start via Agent tools or HTTP API (see README “Configuration” and “Agent Tools” for specific parameters); the default auto backend creates no windows on the user’s desktop.
- Run GUI in Display: Use
iso_display_runto execute commands; child processes default to X11 and null sink to avoid window and audio leakage to the user session. - Observe & Intervene: Use the Web panel to view the real-time screen and click/input; or use
iso_display_popoutto pop up a VNC real window. The program does not need to be restarted after closing it. - Stop: Use
iso_display_stopto unload the corresponding audio module and release the display.
For Proton / gaming scenarios, refer to scripts/run-proton.sh in the repository and the sway + DRI3 instructions in the README.
Configuration Essentials (Excerpt)¶
Refer to the README “Configuration” section for full fields. Documented items include:
backend:auto|sway|xvfb|xephyrallowForeignDisplays: Whether to allow write operations to external displaysexposeWaylandClients: Whether to expose Wayland to native Wayland clients in the isolated environmentaudio: Default null sink for silence;'inherit'to inherit user sound cardviewerPath: VNC viewer path (e.g.,vncviewer)vncPortBase: Related to GTK-VNC addresslocalhost:<display number>calculation
Use Cases & Limitations¶
Suitable for: Stable execution of X11/GTK/Qt/Electron GUIs within Agent workflows, automation clicking and screen capture, without disturbing the user’s desktop; prioritize the sway backend for Proton/3D; manual takeover in the panel when needed.
Notes:
- The plugin logic shares the same permissions as the host DSH; it only isolates display and default audio routing, not a substitute for security audits.
- Under KDE Wayland, the VNC viewer popped up by XWayland may not automatically stay on top and needs to be switched via the taskbar.
- Pure Wayland clients and audio paths connecting directly to ALSA have documented blind spots.
- See the corresponding sections in the GitHub README for known limitations, troubleshooting, and deployment to other devices.
Conclusion¶
dsh-headless-display places GUI automation into an isolated headless display: default zero desktop windows, with panel and VNC visibility/operability on demand, accompanied by 10 Agent tools and an HTTP API. The DeepSeek Harness ecosystem emphasizes “Everything is a plugin”; the SkillHub Directory is a community site and has no official affiliation with DeepSeek / High-Flyer.
- Directory Page: https://www.skillhub.cn/plugins/jingyingruodi/dsh-headless-display
- Source & Documentation: https://github.com/jingyingruodi/dsh-headless-display