[Tex/LaTex] Where is PATH modified to include /usr/texbin

installingmacmactexpaths

I've noticed that my PATH variable includes /usr/texbin, as it should, but I can't find any bash files that modified my PATH variable to include it. How did the TeXLive installation modify my PATH variable upon installation without modifying any bash files?

I'm running Mac OS X 10.7, TexLive 2011. The only bash files I can find are:

~/.profile,
/etc/bashrc,
/etc/profile.

None of these contain any modifications to PATH that include /usr/texbin.

Can anyone educate me?

Best Answer

MacOS X has an additional mechanism to add to the path. If you read /etc/profile you will find the lines

if [ -x /usr/libexec/path_helper ]; then
        eval `/usr/libexec/path_helper -s`
fi

The path_helper program uses the directory /etc/paths.d to add items to the path. Inside /etc/paths.d, each file should be a list of items to add to the path. So there is a file there called TeX which contains one line

/Library/TeX/texbin

It is this line which makes the 'magic' work. See http://www.softec.lu/site/DevelopersCorner/MasteringThePathHelper for more on this.

Related Question