Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

At University and on my home computer, I use a program called PuTTY to SSH connect to (a linux server), and I use the program Xming to display visible elements, such as java and python GUIs and the like.

Basically I'm wondering what the process is to do this with XQuartz. When I try I get told I have no Display variable set, and I've googled for a while but I can't find a solution (most things also talk about X11, but I'm on Mountain Lion so the replacement is XQuartz).

This problem was solved on Windows by introducing Xming, so is there such a solution on Mac?

Thank you in advance!

share|improve this question

migrated from Dec 27 '12 at 5:42

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

If I remember correctly, you need to do:

$ ssh -X user@servername

And maybe this before the SSH:

$ xhost + servername

From the SSH man page

-X      Enables X11 forwarding.  This can also be specified on a per-host
         basis in a configuration file.
share|improve this answer
Thank you for your quick response, but I've tried both of those in the past. I believe -x enables X11 forwarding, but there's nothing that will actually display it (I had the same problem on Windows, with nothing to display the GUI, until I installed and ran Xming before hand which now handles showing the GUI). – Jamie Dec 26 '12 at 20:24
-x Disables X11 forwarding. X (uppercase, activates it). If you run those from X11 (or XQuartz) this should works. – Michel Guillet Dec 26 '12 at 20:29
Ah, I did not realise there was a difference between the two. Thank you very much! Such a simple mistake. I feel quite silly with my previous comment now aha, thank you so much. – Jamie Dec 26 '12 at 20:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.