Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So in order to open a graphical interface in linux when doing ssh to a remote server we use the X system. Ok.
I have seen in some examples using Putty that there is some configuration on Putty client, basically a check-box to enable X-11.
My question is: I am using the Mac's default Terminal console to do ssh.
In this case is:
1) Is ssh -X the equivalent to what Putty offers as configuration in order to enable X11?
2) Is X11 installed by default in a Mac? I mean I am confused on the following: when in my Mac open the Terminal and do: ssh hostname to login to a linux system, the X-11 must be installed in Mac, right? Is this installed by default? How would I know?
I have been reading about these but I am still confused on the matter.
For instance if I want to run Eclipse for source code residing in the remote server, I would need to copy Eclipse in a directory on the remote server and start Eclipse and if the X11 is correctly set up, I should be able to see the UI. Am I correct?

share|improve this question
  1. You have number one backward; but yes, X11 is what Putty emulates.
  2. You need to install XQuartz on current versions of OS X. It is no longer part of a default install.

Once you have XQuartz, you could ssh -X user@host or ssh -Y user@host for X forwarding.

share|improve this answer
    
+1. So XQuartz is the only way to open a GUI on a remote server we ssh to, or are there other ways as well? – Jim May 26 '13 at 14:33
    
XQuartz adds X11 support to OS X. If your server isn't OS X, it would have X11 through a different means (and if it's linux, it is probably there by default). – demure May 26 '13 at 14:37
    
My server isn't OSX. My computer that I ssh to this linux server is OSX. So do I need XQuartz or not? I am confused now. – Jim May 26 '13 at 14:40
    
X11 has to be on both server and client. As your client side is OS X, you do need XQuarts (on your mac). Sorry if my previous comment confused you. – demure May 26 '13 at 14:41
1  
@demure, no X11 does not have to be on the server for the client side X support. For example, on my remote server I only installed xterm, and of course the despondence for xterm. and was able to start server xterm in my local X. I.e., I didn't install X11/Xorg on my remote server for it to work. – xpt May 27 '13 at 3:37

If you want to run something like eclipse on the remote machine, you will want to be able to re-connect to the session in case the network drops. If you used "ssh -X", the session would crash instead. For that, you need something like Xpra or NX. Which will also give you much better performance than plain X11 or SSH-X11.

share|improve this answer
    
just to note that nx4 dosen't have the screen-style separated sessions that persist even if the user is not logged into the main system - it works like VNC and shows the session running on the system at that point of time – Journeyman Geek Oct 29 '13 at 4:10

You must log in to answer this question.

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