Bug 1418 - Issues with X11 forwarding on Mac OS X
Summary: Issues with X11 forwarding on Mac OS X
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.7p1
Hardware: Other Mac OS X
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_2
  Show dependency treegraph
 
Reported: 2007-12-21 15:42 AEDT by Disco Vince Giffin
Modified: 2023-01-13 13:35 AEDT (History)
2 users (show)

See Also:


Attachments
Fixes X11 forwarding on Mac OS X. (1.45 KB, patch)
2007-12-21 15:42 AEDT, Disco Vince Giffin
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Disco Vince Giffin 2007-12-21 15:42:11 AEDT
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.
Comment 1 Darren Tucker 2007-12-31 21:54:29 AEDT
Could you please explain why this change is needed and what the effect of not having it is?  Thanks.
Comment 2 Disco Vince Giffin 2008-01-03 10:20:13 AEDT
(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:").
Comment 3 Darren Tucker 2008-01-03 18:46:45 AEDT
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?
Comment 4 Darren Tucker 2008-01-03 18:50:54 AEDT
(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 5 Damien Miller 2009-01-13 18:35:13 AEDT
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 6 Darren Tucker 2009-01-13 19:24:40 AEDT
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.
Comment 7 Darren Tucker 2009-01-18 21:57:16 AEDT
err, wrong bug.
Comment 8 Damien Miller 2009-01-21 16:38:27 AEDT
This has been committed and will be in openssh-5.2. Thanks!
Comment 9 Damien Miller 2009-02-23 13:35:39 AEDT
Close bugs fixed/reviewed for openssh-5.2 release