is it possible to X11 forward OS X to a linux box?

Joined
Oct 26, 2009
Messages
4
Reaction score
0
Points
1
Hello all,
I just last week purchased and setup my first mac. I've used macs before a little, but I've never had one as my primary machine. For the past couple years I've mostly been running ubuntu, and I really like the remote control capabilites via ssh and having x11 forwarding setup. I know it is possible to X11 forward from linux to OS X, I've already set this up on my LAMP server so I can control it from my mac, however, is the reverse possible? I know that OS X is running on some form of a customized BSD kernel, so I thought it might be.
I tried doing this myself by turning ssh on, then editing the sshd config file. I found the line "#X11Forwarding no" in the config file and changed it to "X11Forwarding yes". Then I saved the file and restarted the ssh server. Now I can login to my mac via ssh, but when I try to run a command that would open a window, it doesn't get forwarded. For instance, if i do a "open -a safari" from the terminal on my mac, it would open a safari window, but when I do this remotely it just gives an error message. If someone could confirm that this is or is not possible, that would be great.
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
It might work for X11 applications, but it won't work for native OS X applications.

Safari, Mail, iMovie, Word, Photoshop, etc. are all native applications.
 
Joined
Dec 13, 2007
Messages
256
Reaction score
10
Points
18
Location
United States of America
Your Mac's Specs
2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork ‘09
If I understand what you mean by X11 forwarding (I've read about it but never set it up personally), I'd say the answer is no. Even though Mac OS X is based on UNIX technologies, the window server is entirely different from X. Don't quote me on it, but I believe the network forwarding was the primary design goal of X, while OS X's window server was designed to use some form of Postscript on-screen. As a result of their differences in design, I don't think OS X's window server has such a capability.

Having said that, there are a few things you can do. First, Mac OS X does use the standard VNC protocol for remote desktop capabilities, and as of Leopard you can use a third-party VNC client (I believe Vinagre is currently the default in Ubuntu) to control OS X. Also, you might be able to configure X11—installed with OS X by default since Leopard and available before that on the installation disc—to be accessible over the network. However, even if that is possible (I've never researched it, but I see no reason it wouldn't be), you would only be able to use the X11 applications remotely.
 
OP
S
Joined
Oct 26, 2009
Messages
4
Reaction score
0
Points
1
Thanks for your input, you confirmed my suspicions. I have already setup vnc for remote desktop, though I have to say with my DSL connection at home it is not ideal for accessing remotely via VNC (a bit slow and sluggish sometimes). That's why I was wondering if there was a better way, X11 is pretty awesome since it only sends the active window, not the entire desktop, but it makes sense that it won't be able to send non-X windows, which unfortunately is everything I would want to run anyways. I'll stick with vnc and try to tweak the settings to get it working more to my liking.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top