# Ex-Windows user: Need to replace Cygwin



## rnavarre (Aug 4, 2009)

I am ex-windows user. Back there I used an application called cygwin to connect to a Linux server application.
I'm no linux expert at all. But I understand that I should be able to connect to the same linux server's application with the X11 application in my Macbook Pro. I am running Leopard 10.5.

I got a set of special fonts from the Linux server manufacturer.

I did the following:

1.- Executed the X11 application in Utilities.
2.- In the X11 window I typed "startx". It says it is waiting for connections.
3.- Opened a Terminal window, established a ssh session to the lunix server and typed "setenv DISPLAY XX.XX.XX.XX:0" where XX.XX.XX.XX is my Mac IP address.
4.- In the same Terminal window I typed "vmlogin &"

After a few seconds I get the error message that the window can't be opened.....

Any idea ?


----------



## nixgeek (Aug 4, 2009)

It seems as though you're trying to display the remote GNU/Linux X11 applications on your Mac.  You can enable X11 Forwarding by using the "-X" switch when initiating your SSH session (Ex: "ssh -X username@server").  This is assuming that your SSH server is configured to forward X11 sessions over SSH.  Also, you need to initiate the SSH session from Xterm, not the regular Terminal.app (at least this is how I do it in 10.4).  You can try with Terminal.app in 10.5 and see if it enables X11 automatically.  If the remote X11 application doesn't display locally, then you need to do it through Xterm.


----------



## macbri (Aug 5, 2009)

nixgeek said:


> Also, you need to initiate the SSH session from Xterm, not the regular Terminal.app (at least this is how I do it in 10.4).  You can try with Terminal.app in 10.5 and see if it enables X11 automatically.  If the remote X11 application doesn't display locally, then you need to do it through Xterm.



Yeah I found that annoying in 10.4.   The good news is in 10.5 it's handled a lot better.   In Terminal.app, issue an X11 command like "xclock" and X11 fires up automagically.  This will happen even if you ssh with X11 forwarding enabled, and then issue an "xclock" command on the remote server.  

To the OP's question, I don't see the need for the "startx" command, since your X11 application is already running.  So I'd skip that step, and use nixgeek's suggestion of "ssh -X" instead of setting a DISPLAY variable on the remote system.  You might also try "ssh -Y" instead which enables the less-secure but also less problematic "trusted" X11 forwarding.

There's a nice brief explanation of the differences in trusted and untrusted X11 forwarding here: http://connectivity.hummingbird.com/support/nc/exceed/exc5004841.html


----------



## nixgeek (Aug 5, 2009)

Thanks for the update, macbri.  Good to know that Apple made it a little more transparent in Leopard.


----------

