[Xquartz-dev] MacPorts XQuartz 2.3.2 (xorg-server 1.4.2-apple32) has problems with $PATH
Jeremy Huddleston
jeremyhu at apple.com
Tue Feb 17 14:41:06 PST 2009
On Feb 17, 2009, at 10:02, Peter Dyballa wrote:
>
> Am 17.02.2009 um 16:03 schrieb Martin Costabel:
>
>> In ~/.xinitrc (or in the scripts inside ~/.xinitrc.d/,
>> which is the currently recommended replacement for ~/.xinitrc), you
>> get
>> an environment inherited directly from /usr/X11/bin/startx as
>> started by
>> launchd.
>
> This is a well-know fact. Therefore I have created ~/.MacOSX/
> environment.plist.
>
>>
>> This is a minimalist environment that does not take into account
>> *any*
>> shell startup scripts, and not even ~/.MacOSX/environment.plist.
>
> Why? The previous version in MacPorts worked OK, it inherited $PATH
> and I could use AUCTeX. Carbon Emacsen or the Cocoa variant
> Emacs.app of GNU Emacs 23.0.90 all inherit the correct environment
> and are useful applications. Is X11.app no Mac OS X application?
Here's how X11.app starts on Tiger (or on Leopard if you aren't using
the launchd start):
X11.app inherits its environment from environment.plist just like any
other app launched by ApplicationServices.
X11.app runs a shell script on startup that gets an environment
from your login shell before launching the X11 binary.
The X11 binary fork/execs startx
startx fork/execs xinit
xinit fork execs xinitrc and X
X tells X11.app how to star the server (command line
arguments passed over mach IPC)
xinitrc runs your initial clients (like quartz-wm)
Thus xinitrc inherits your environment.plist on Tiger.
It doesn't on Leopard because it's started from launchd which doesn't
use environment.plist on Leopard (known bug).
More information about the Xquartz-dev
mailing list