Created attachment 1414 [details] Fixes X11 forwarding on Mac OS X. Attached is a patch for building OpenSSH 4.7p1 on Mac OS X. This patch fixes issues with X11 forwarding.
Could you please explain why this change is needed and what the effect of not having it is? Thanks.
(In reply to comment #1) > Could you please explain why this change is needed and what the effect > of not having it is? Thanks. This patch adds support for "on demand" X11 (via launchd) to ssh. When an attempt is made to communicate with the socket, launchd launches X11. Without this patch, the DISPLAY environment variable is not properly forwarded and X11 can't be launched (i.e. "Error: Can't open display:").
So it's simply special-casing a $DISPLAY of /tmp/launch/whatever as being a Unix domain socket? In that case I still don't see why the change is needed. Couldn't you get the same effect simply by setting $DISPLAY to unix:/tmp/launch/whatever?
(In reply to comment #3) > In that case I still don't see why the change is needed. Couldn't you > get the same effect simply by setting $DISPLAY to > unix:/tmp/launch/whatever? Oh, hang on, the "unix:" display spec doesn't support a pathname.
Comment on attachment 1414 [details] Fixes X11 forwarding on Mac OS X. apart from wrapping the check for /tmp/launch in an #ifdef __APPLE__ this looks ok to me. dtucker?
Comment on attachment 1414 [details] Fixes X11 forwarding on Mac OS X. I'm not wild about having the path hard coded but since launchd seems to work that way it's ok by me. Oh, and style says blank line in connect_local_xsocket after the variable declaration.
err, wrong bug.
This has been committed and will be in openssh-5.2. Thanks!
Close bugs fixed/reviewed for openssh-5.2 release