[Xquartz-dev] XQuartz 2.6.0 (xorg-server 1.9.2.901) and X authority

Jeremy Huddleston jeremyhu at apple.com
Mon Dec 27 09:39:56 PST 2010


On Dec 27, 2010, at 02:30, Peter Dyballa wrote:

>>>>> then find my way through the file system hierarchy to the directory with the X clients and then search among them some time for the one I want to launch.
>>>> 
>>>> I have no idea how you got here in your thought process.
>>> 
>>> How would I else be able to double-click on the X client I wish to launch?
>> 
>> If you really want to create app bundles to double click to launch X11 applications, we can go into how to do that, but that's not really the supported method.  The supported method for launching X11 applications is from X11.app's Application menu or from a terminal.
> 
> This means it's not correct to use a shell script in ~/.xinitrc.d?

Why would you come to that conclusion?  Every example I've ever given is of a shell script in ~/.xinitrc.d ...

> Is it this file which you described as being unsupported in my way of handling X11?

You should use shell scripts in ~/.xinitrc.d.

You should not change, set, or unset DISPLAY.

>>> I made some tests. I made sure that no *sh RC file sets DISPLAY. I also removed DISPLAY from the environment of Terminal. With ps I could see that some processes had set DISPLAY=:0, but most had DISPLAY=/tmp/launch-OtsB9G/org.x:0. This value is also set in a new Terminal window.
>> 
>> Right.
>> 
>>> When I launch for example FontForge from the first Terminal window (no DISPLAY set)
>> 
>> Why is DISPLAY not set?  I thought you said it was set to DISPLAY=/tmp/launch-OtsB9G/org.x:0 ... ?
> 
> It's still 2010 here and I had no need to log out and log in again.

I have no idea what being 2010 has to do with anything...

> So I removed from the first running Terminal the DISPLAY variable with unsetenv (it's in tcsh). Therefore it's now empty.

Right, this is what I said you shouldn't do.  Don't set, unset, or change DISPLAY.

> FontForge, from Fink, comes as an application bundle.

Ok... ?

>>> """
>>> If you want a different WM, do:
>>> 
>>> mkdir ~/.xinitrc.d
>>> echo "exec /path/to/blackboxwm" > ~/.xinitrc.d/99-wm.sh
>>> chmod 755 ~/.xinitrc.d/99-wm.sh
>>> """
> 
> My executable ~/.xinitrc.d/99-blackbox.sh script has:
> 
> 	echo "99-Blackbox WM"
> 	[[ -x /opt/local/bin/blackbox ]] && exec /opt/local/bin/blackbox
> 	[[ -x /sw/bin/blackbox ]] && exec /sw/bin/blackbox
> 
> Blackbox *is* launched because quartz-wm is not launched (no X client appears on screen, possibly after the crash, crash reports from blackbox exist).

Well if blackbox is crashing, you should report those crashes to blackbox developers.  Try replacing it with this to try twm instead:

[ -x /usr/X11/bin/twm ] && exec /usr/X11/bin/twm

> After some time blackbox crashes. Is the Bash syntax inappropriate for me tcsh user?

Thos scripts are sourced from a bourne shell script.



>> That's in the FAQ, but I don't think that is what you actually want.  It sounds like what you want is to use blackbox which is orthogonal to launchd. Keep launchd around, setup xinitrc.d to use blackbox, and launch your applications from Terminal.app, or just launch X11.app directly.
> 
> This sounds like I've never bypassed launchd... (at least not in Leopard, Mac OS X 10.5.8)

By setting DISPLAY in your .login or environment.plist, you did.


>>> If a second server is launching, you should investigate why the first one is not claiming the launchd socket.  How are you launching the first X11 server?
> 
> By double-clicking on the icon of /Applications/MacPorts/X11.app in Dock. I interpret the situation with the second X server that the DISPLAY setting from login time comes from the wrong X server or is set for the wrong X server. Launchctl lists:
> 
> 	-	0	org.x.startx
> 	74689	-	[0x0-0x11b11b].org.macports.X11

Ok, so you have two versions of the server: one from MacPorts, and one from Apple.  The one in your Dock that you are manually is not the one used by launchd.  Based on earlier information from you, it seems you put MacPorts' X11.app in the dock and are using Apple's for launchd.  




More information about the Xquartz-dev mailing list