Skip to content

Start the herdr server with the desktop session - #16572

Merged
dhh merged 1 commit into
quattrofrom
herdr-server-autostart
Oct 25, 2026
Merged

dhh merged 1 commit into
quattrofrom
herdr-server-autostart

Conversation

@dhh

@dhh dhh commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

When a remote machine's herdr connects over SSH before the local herdr client is opened, that SSH login starts the herdr server. The server then carries the SSH session's environment (XDG_SESSION_TYPE=tty, no WAYLAND_DISPLAY), and so does every pane it spawns. Agents in those panes can't reach the Wayland clipboard, so pasting a screenshot (Ctrl+V in Claude Code, which reads via wl-paste) silently finds no image.

This starts herdr server from Hyprland's autostart under uwsm-app, so the server comes up inside the graphical session and its panes inherit the Wayland environment. If a server is already running, herdr server exits with "already running" and nothing changes.

Cost: an idle empty server is about 21 MB RSS (about 6 MB private) and effectively no CPU.

On an autologin boot, Hyprland starts within a second of sshd, well before a remote client can connect (on the machine where this was found: Hyprland at 18:40:09, SSH login at 18:40:32). Without autologin, an SSH login that happens before the user logs in can still win; restarting the server from the desktop (herdr server stop, then reopen herdr) fixes it.

🤖 Generated with Claude Code

A remote herdr SSHing in at boot would otherwise start the server with a
tty environment, leaving its panes without WAYLAND_DISPLAY so agents can't
paste clipboard images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Starts herdr server when Hyprland starts, using uwsm-app so new panes receive the graphical session's environment.

  • Herdr starts with Hyprland, so its panes can reach the Wayland clipboard.

Reviews (1) · Last reviewed commit: "Start the herdr server with the desktop ..." · Reviewed by Greptile

@dhh
dhh merged commit 1c880c0 into quattro Oct 25, 2026
2 checks passed
@dhh
dhh deleted the herdr-server-autostart branch October 25, 2026 08:22
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants