Created attachment 3706 [details] ssh -v -f -X somehost xterm In my ~/.ssh/config I have: Host * ControlMaster auto ControlPersist 300 ControlPath /home/%u/.ssh/controlmaster/%h-%p-%r.sock ServerAliveInterval 60 TCPKeepAlive yes Doing: ssh -X -f somehost xterm does not start an xterm the first time it is run. Repeating the command does start an xterm.
Created attachment 3708 [details] Possible fix.
that seems to help insofar as xclock now runs, but it doesn't background properly. It's been a while since I've touched this code, but IIRC for ControlPersist the command should be run by the forked client of the mux process and I'm not convinced that's happening right in this case.
For that you need the new patch I appended to https://bugzilla.mindrot.org/show_bug.cgi?id=1948
https://bugzilla.mindrot.org/attachment.cgi?id=3705
Created attachment 3709 [details] Fix -f in mux client mode
Yay! the latest patch seems to work (more consistently than my half-baked ones anyway) Thanks!
Applied in 2d34205dab08e and will be in OpenSSH 9.4, due in a couple of weeks. Thanks!