[Xquartz-dev] MacPorts XQuartz 2.3.2 (xorg-server 1.4.2-apple32) has problems with $PATH
Peter Dyballa
Peter_Dyballa at Freenet.DE
Thu Feb 19 03:05:18 PST 2009
Am 18.02.2009 um 16:00 schrieb Jeremy Huddleston:
> 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.
>
With pstree I see:
-+= 00001 root /sbin/launchd -v
\-+= 00481 windowse /System/Library/Frameworks/
ApplicationServices.framework/Frameworks/CoreGraphics.framework/
Resources/WindowServer -daemon
\-+- 06548 pete /Applications/MacPorts/X11.app/Contents/MacOS/
X11.bin -psn_0_36306945
\-+- 06569 pete /bin/sh /opt/local/bin/startx
\-+- 06606 pete xinit /Users/pete/.xinitrc -- /opt/local/bin/
X :0 -nolisten tcp -dpi 100 -auth /Users/pete/.serverauth.6569
\-+= 06609 pete /bin/sh /Users/pete/.xinitrc
\-+- 06630 pete /usr/local/bin/emacs-23.0.90 -geometry
100x57+696+145 -T 23.0.90 --debug-init
So it seems that theory and practise meet. Examining with ps the
processes' environments I get these PATH values:
• 00001 root /sbin/launchd -v does not seem to have any
• 00481 WindowServer has PATH=/usr/bin:/bin:/usr/sbin:/sbin
• 06548 X11.bin has PATH=/Users/pete/bin:/usr/bin:/bin:/usr/sbin:/
sbin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/sw/bin:/usr/local/
bin:/usr/texbin:/Users/pete/bin/FDK/Tools/osx
• all other programmes in the chain ínherit this (no quartz-wm running)
This is a path that is not derived from any of my supported shells
(sh, bash, csh, tcsh). And it isn't root's path, not even when I
(root) copy my ~/.MacOSX directory to /var/root.
When I change /etc/csh.login to contain /usr/local/texlive/2008/bin/
universal-darwin instead of Mac TeX's silly /usr/texbin, the latter
is substituted with /usr/local/texlive/2008/bin/universal-darwin.
Nevertheless elements from my shell's path value, coming directly
from ~/.MacOSX/environment.plist, are not part of X11.bin's
environment. They're included in all other Aqua clients, for example
Carbon Emacs or Emacs.app or ...
--
Greetings
Pete
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
-Benjamin Franklin, Historical Review of Pennsylvania.
More information about the Xquartz-dev
mailing list