Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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

/usr/texbin

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

share|improve this answer
    
Thanks Joseph! (Now why didn't I notice path_helper before?) –  Ryan Sep 28 '11 at 6:54
add comment

On OS X (since 10.5) the basic path is constructed via the list contained in the file /etc/paths plus local additions stored in /etc/paths.d. Inside /etc/paths.d is a file TeX, which contains /usr/texbin. This is what is added by MacTeX. If you happen to have X11 installed on your machine, you will also find an X11 file in paths.d (Under Mavericks, this will be 40-XQuartz instead.)

Of course, you can add your own additions to the path in your .profile as usual; but for systemwide paths, you can simply add another file to the /etc/paths.d directory.

share|improve this answer
    
Thanks Alan! That answered my question. –  Ryan Sep 28 '11 at 6:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.