Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

XQuartz and DISPLAY variable

I would greatly appreciate help toward the resolution of an issue that I am having with Mountain Lion (ML) on my 2007 iMac. I like starting X11 applications from a terminal, and it used to be possible until I instaled ML. I understand I have to install XQuartz, log out and back in, but have done it all several times and I continue to be unable to do it. Specifically, the DISPLAY variable does not get set (output of echo $DISPLAY is just two blank lines).

On the other hand, ifI just start XQuartz and open an xterm I have no problem, i.e., the DISPLAY variable is set normally.

Interestingly, the same procedure works fine on my recently purchased (two weeks) MacBook Air. Any idea of how I might b able to fix this (I have already gone through the exercise of uninstalling XQuartz and redoing it, I have also rebooted the machine but the problem persists).

Thanks in advance.

iMac, OS X Mountain Lion

Posted on Jul 30, 2012 6:29 AM

Reply
Question marked as Best reply

Posted on Jul 30, 2012 4:39 PM

Not sure what to suggest - I just checked on my installation and I do get a result for "echo $DISPLAY", referring to what looks like a unix socket at (currently) /tmp/launch-31NZS8/org.macosforge.xquartz:0.


I also tried launching Wireshark from the terminal. The first time I got a dialog asking where X11 was located, but after I pointed it at XQuartz everything worked without a problem.


Have you tried running "launchctl list | grep xquartz" to see if the XQuartz User Launch Agent is actually running? Perhaps that's the problem.

31 replies

XQuartz and DISPLAY variable

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.