bcrowell
June 23rd, 2009, 06:06 PM
I have an environment variable (a tex-related one called TEXMFMAIN) that's being set to an incorrect value in every bash shell. I checked /etc/profile and /etc/bash.bashrc, and there's nothing in those that sets thie variable. To make sure it wasn't something I'd inadvertently put in one my own per-user files (e.g., ~/.bashrc), I made a new user account called glub and tested it:
$ su glub
Password:
glub@cl-t091-011cl:/home/bcrowell$ echo $TEXMFMAIN
/usr/local/share/texmf
I also grepped through every text file in every subdirectory of /etc and /usr, and didn't turn up anything that looked like it was setting this variable.
This seems like a more general problem that people would run into in Unix, and I'm sure someone must have figured out a good, general solution for it: if an environment variable has been set, there must be some general debugging technique that would allow you to find out when it was getting set, and by what program.
Any suggestions?
TIA!
-Ben
$ su glub
Password:
glub@cl-t091-011cl:/home/bcrowell$ echo $TEXMFMAIN
/usr/local/share/texmf
I also grepped through every text file in every subdirectory of /etc and /usr, and didn't turn up anything that looked like it was setting this variable.
This seems like a more general problem that people would run into in Unix, and I'm sure someone must have figured out a good, general solution for it: if an environment variable has been set, there must be some general debugging technique that would allow you to find out when it was getting set, and by what program.
Any suggestions?
TIA!
-Ben