ssh -X forwarding and xterm

Discussion in 'Mac Basics and Help' started by spooner1887, Mar 20, 2011.

  1. spooner1887 macrumors newbie

    Joined:
    Oct 11, 2010
    #1
    Hello,

    I have posted a thread similar to this, but I'm still not clear as to how X11 works or -X forwarding for that matter.

    I have some issues/questions about -X forwarding from one mac machine to another mac machine. Is it possible to use either xterm or the terminal to open any gui (such as Safari say...), or do I need an X11 specific version of the program?

    Here are my relevant settings
    On my local mac machine:
    DISPLAY is set to /tmp/launch-RuXg5G/org.x:0
    and X11forwarding is yes in my /etc/sshd_config file

    On my remote mac machine:
    DISPLAY is localhost:12.0
    and X11forwarding is yes in my /etc/sshd_config file

    I am able to use xedit and xterm on my local machine that is forwarded from the remote machine. However unable to get Safari or Preview to forward. So if I'm ssh'd into my remote machine and I enter "/Applications/Safari.app/Contents/MacOS/Safari &" I get the error

    Safari[17941] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.


    Likewise if I run "/Applications/Preview.app/Contents/MacOS/Preview some.pdf" I get the error

    Preview[17986] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    2011-03-20 15:19:38.153 Preview[17986:903] Error (1002) creating CGSWindow


    This is highly aggravating b/c I can log (with ssh -X from my terminal) into a linux cluster (which i do not manage) and I simply type "firefox &" and loe and behold I get firefox forwarded to my local machine. I feel that I've searched extensively on how to fix this, and to say the least there isn't much out there or I don't know where to look.

    I had previously asked about using "open some.pdf" and I had gotten response to use an X11 based .pdf viewer or to do Remote Desktop/VNC/Screen Sharing. I'm not a big fan trying to use a Remote Desktop b/c I'd imagine the overhead is probably much higher than X forwarding, and my home internet connection is bad enough. Plus, why can't/why shouldn't Mac OSX have the "just work simplicity of linux machines." Anyhow, thanks for any help in advance!
     
  2. silicontrip macrumors newbie

    Joined:
    Oct 27, 2010
    #2
    You have correctly set up a remote X11 session but Apple applications do not use X11 for their display. This is why xterm and xedit work (as they are x11 applications) but Safari and Preview do not.

    Sorry for the bad news. The only way to get a remote OSX desktop is VNC which shares the entire desktop. There is no way to get the same feature of X11 of running an application on another machine and display it somewhere else.

    If anyone does know how to do this I'd love to hear about it.
    Mark
     

Share This Page