[Xquartz-dev] MacPorts XQuartz 2.3.2 (xorg-server 1.4.2-apple32) has problems with $PATH

Jeremy Huddleston jeremyhu at apple.com
Sun Feb 15 12:07:41 PST 2009


X11.app inherits its path from your default shell.  See /Applications/ 
Utilities/X11.app/Contents/MacOS/X11 and search the archives of this  
list from about 2 months ago for a very lengthy discussion about it.


On Feb 15, 2009, at 12:00, Peter Dyballa wrote:

> Hello!
>
> I found this when I tried to use AUCTeX in GNU Emacs 23.0.90: its  
> internal variable exec-path ("/usr/X11/bin" "/Users/pete/bin" "/usr/ 
> bin" "/bin" "/usr/X11R6/bin" "/usr/local/sbin" "/usr/local/bin" "/sw/ 
> bin" "/usr/local/bin" "/usr/texbin" "/Users/pete/bin/FDK/Tools/osx"  
> "/opt/local/bin" "/usr/X11R6/bin" "/sw/lib/emacs/22.3/powerpc-apple- 
> darwin8.11.0"), derived from $PATH, which is reported with Emacs  
> Lisp (getenv "PATH") as:
>
> 	"/usr/X11/bin:/Users/pete/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/ 
> local/sbin:/usr/local/bin:/sw/bin:/usr/local/bin:/usr/texbin:/Users/ 
> pete/bin/FDK/Tools/osx:/opt/local/bin:/usr/X11R6/bin"
>
> and which is not the same as in ~/.xinitrc nor as in a shell, bash  
> or tcsh.
>
> For the shells I use:
>
> 	~/.bashrc:export PATH=$(defaults read "${HOME}/.MacOSX/environment"  
> PATH)
> 	~/.profile:    PATH=`defaults read "${HOME}/.MacOSX/environment"  
> PATH`
> 	~/.cshrc:    set path=(`defaults read ~/.MacOSX/environment PATH |  
> tr ':' ' '`)
>
> So I have, very consistent:
>
> 	pete 231 /\ echo $PATH
> 	/Users/pete/bin:/sw/lib/freetype219/bin:/sw/lib/fontconfig2/bin:/ 
> usr/local/bin:/usr/local/ActivePerl-5.8/bin:/usr/local/texlive/2008/ 
> bin/universal-darwin:/usr/bin:/bin:/usr/X11/bin:/sw/bin:/sw/lib/ 
> coreutils/bin:/Developer/Tools:/Users/pete/bin/FDK/Tools/osx
> 	pete 232 /\ bash -li
> 	~/.bash_profile
> 	~/.bashrc
> 	0-ttyp://pete:2/~pete 28 /\ echo $PATH
> 	/Users/pete/bin:/sw/lib/freetype219/bin:/sw/lib/fontconfig2/bin:/ 
> usr/local/bin:/usr/local/ActivePerl-5.8/bin:/usr/local/texlive/2008/ 
> bin/universal-darwin:/usr/bin:/bin:/usr/X11/bin:/sw/bin:/sw/lib/ 
> coreutils/bin:/Developer/Tools
> 	0-ttyp://pete:2/~pete 29 /\ exit
> 	logout
> 	pete 233 /\ bash -i
> 	~/.bashrc
> 	0-ttyp://pete:2/~pete 30 /\ echo $PATH
> 	/Users/pete/bin:/sw/lib/freetype219/bin:/sw/lib/fontconfig2/bin:/ 
> usr/local/bin:/usr/local/ActivePerl-5.8/bin:/usr/local/texlive/2008/ 
> bin/universal-darwin:/usr/bin:/bin:/usr/X11/bin:/sw/bin:/sw/lib/ 
> coreutils/bin:/Developer/Tools
> 	0-ttyp://pete:2/~pete 31 /\ exit
> 	exit
> 	pete 234 /\ bash
> 	~/.bashrc
> 	0-ttyp://pete:2/~pete 32 /\ echo $PATH
> 	/Users/pete/bin:/sw/lib/freetype219/bin:/sw/lib/fontconfig2/bin:/ 
> usr/local/bin:/usr/local/ActivePerl-5.8/bin:/usr/local/texlive/2008/ 
> bin/universal-darwin:/usr/bin:/bin:/usr/X11/bin:/sw/bin:/sw/lib/ 
> coreutils/bin:/Developer/Tools
> 	0-ttyp://pete:2/~pete 33 /\ exit
>
> from
>
> 	pete 235 /\ defaults read ~/.MacOSX/environment PATH
> 	/Users/pete/bin:/sw/lib/freetype219/bin:/sw/lib/fontconfig2/bin:/ 
> usr/local/bin:/usr/local/ActivePerl-5.8/bin:/usr/local/texlive/2008/ 
> bin/universal-darwin:/usr/bin:/bin:/usr/X11/bin:/sw/bin:/sw/lib/ 
> coreutils/bin:/Developer/Tools
>
> In ~/.xinitrc I let record the environment (env | sort -o  
> xinitrc.env). In this output file PATH is recorded as:
>
> 	PATH=/Users/pete/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/ 
> usr/local/bin:/sw/bin:/usr/local/bin:/usr/texbin:/Users/pete/bin/FDK/ 
> Tools/osx:/opt/local/bin:/usr/X11R6/bin
>
> for which to find a connection to correct PATH is not easy. With  
> this I can't use TeX! The file /etc/csh.login has from an  
> installation of the "MacTeX" distribution an useless
>
> 	set path = ( ${path} "/usr/texbin" )
>
> which will only work when I violate a bit the file system – I leave  
> the line there for sentimental reasons.
>
> /etc/csh.cshrc does not set path. /etc/csh.login has only
>
> 	set path = ( ${path} "/usr/local/bin" )
> 	set path = ( ${path} "/usr/texbin" )
>
> /etc/profile has
>
> 	PATH="/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin"
>
> My personal files have:
>
> 	~/.bashrc:export PATH=$(defaults read "${HOME}/.MacOSX/environment"  
> PATH)
> 	~/.cshrc:    set path=(`defaults read ~/.MacOSX/environment PATH |  
> tr ':' ' '`)
> 	~/.login:setenv PATH ${PATH}:"/Users/pete/bin/FDK/Tools/osx"
> 	~/.profile:    PATH=`defaults read "${HOME}/.MacOSX/environment"  
> PATH`
> 	~/.profile:export INFOPATH MANPATH PATH
> 	~/.profile:PATH=${PATH}:"/Users/pete/bin/FDK/Tools/osx"
>
> I'd prefer here the behaviour of Apple's X11.
>
> --
> Greetings
>
>  Pete
>
> The day Microsoft makes something that doesn't suck is the day they  
> start selling vacuum cleaners.
> 				– Ernest Jan Plugge
>
>
>
> _______________________________________________
> Xquartz-dev mailing list
> Xquartz-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev



More information about the Xquartz-dev mailing list