[Xquartz-dev] MacPorts XQuartz 2.3.2 (xorg-server 1.4.2-apple32) has problems with $PATH
Peter Dyballa
Peter_Dyballa at Freenet.DE
Sun Feb 15 12:00:12 PST 2009
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
More information about the Xquartz-dev
mailing list