I've done some searching and found that it seems to be possible to forward X11 apps to a mac machine over ssh (i.e. ssh-ing into a linux box and launching an X11 app and having it show up on the mac's display).

What I'm wondering is if this can be done in reverse (i.e. ssh-ing into a mac machine and launching an app and having it show up on a linux display). If this is possible, how do I go about setting it up, and more importantly which OS X apps will this work for?


5 Answers 5


These instructions should work, but I've just spent the last hour and haven't got it to work yet.

Also, you may want the latest version of X11 for Mac, XQuartz.


XQuartz (xorg-server 1.4.2-apple42), has, under Preferences, a Security tab, with an option called "Allow connections from network clients". I suspect that this setting will make a difference.

  • I'm surprised to have given the accepted answer, as I still haven't gotten this to work. Did it work for you? Jun 1, 2009 at 12:51
  • In fairness, I ended up using VNC since the app my users wanted to use wouldn't have worked with X11 forwarding anyway. However, your answer currently has what seems to be the most information on actually getting it to work so...
    – Zxaos
    Jun 1, 2009 at 17:39
  • Well, fair enough. I'll have to play with it some more some time. Jun 1, 2009 at 19:59

Only X11 apps themselves can forwarded through X11 (so most OSX apps won't work). However, look into remote desktop software. It won't work quite as fast as X11, but should allow most apps to work correctly (OpenGL might not work). This comparison of remote desktop software should get you started.


This will only work for X11 apps (hence "X11 forwarding" ;-)), i.e. probably not what you are interested in. Only way to get "real" MacOS X apps to show is using some kind of remote desktop / vnc (which you could tunnel via ssh).


Of course. You will need to setup at least a X11 server and your SSH server. As noted, this will only let you forward apps that run within X. Thus, it's worth looking into vnc, which is crossplatform and apparently included in OS X 10.4+


In X terminology, I believe you want to run a Mac client from a Linux server. So you certainly don't need to install an X server on the Mac.

What you do need to do, as mentioned in the hint at macosxhints.com, is edit /etc/sshd_config on the Mac from

#X11Forwarding no


X11Forwarding yes

If the Mac runs 10.4 or later, that's all. "ssh -X you@yourmac /usr/X11/bin/xterm" will now work.

If the Mac is still running 10.2 or maybe 10.3 then you have a fair bit more work to configure sshd to load the X11 authentication cookies, because back then the sshd program included in OSX didn't know about the xauth program included in OSX. IIRC, you needed to recompile sshd or use xauth manually.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .