XQuartz on 10.6 (in a VM)

René J.V. Bertin rjvbertin at gmail.com
Thu Mar 26 14:16:44 PDT 2015


On Thursday March 26 2015 13:10:31 Jeremy Huddleston Sequoia wrote:

> Well, if you remove the launchd.plist, then you're basically stuck with the Tiger-era behavior of having to either launch your apps from X11's Applications menu (or from an xterm launched from that menu) because Terminal.app has no way of knowing what your DISPLAY environment variable should be set to.

Yes, I launch X applications either
- through my .xinitrc
- from an xterm (strangely enough, that remains my favourite terminal emulator on OS X; something with the text selection and fast copy/paste)
- from xfce4-panel

> It looks like you just manually set it to :0.0 in your ~/.profile (or similar), and that's a good first guess, but as you noticed, it can easily be wrong.

No, I don't! I even go to some lengths to unset DISPLAY under certain conditions. So I'm not guessing what my DISPLAY variable is, esp. since I *know* that it sometimes is :1.0 or even :2.0 or higher. I really believe that XQuartz.app (or X11.app) or xinit set DISPLAY to something traditional unless told otherwise. I also think that there must be some resource-lock that ensures that if you launch a 2nd X server (or if a previous instance didn't terminate gracefully) it will adopt a higher display number.

In the situation that I reported, my $DISPLAY was really :0.0 as verified by starting /opt/X11/bin/xterm through the X11 Application menu. I just couldn't connect to it through the X11 client libraries in MacPorts, only through those in /opt/X11 .

R.


More information about the macports-users mailing list