The correct way to activate execution trace or source trace at the time /etc/zshenv
is loaded is to activate it at the shell command: zsh -l -o xtrace
, zsh -l -o sourcetrace
-- be sure to try with the -l
option, since the path element might only be added at login.
Beside this, if you are still getting a path element added before /etc/zshenv
is loaded, you could check for a ~/.pam_environment
file. This is the user-local version of the /etc/environment
file and is loaded at about the same time, before the shell or user environment. Check the man page "pam_env" for more details about the format used - it is different for the user file.
One other minor possibility is the ENV
environment variable. When a SH-compatible shell is started in SH-compatible mode, the file whose path is in ENV
is loaded as a startup file before anything else. Search your shell's documentation for more detail. login.defs
is also used at login and by various user/login utilities, but /etc/environment
is the standard for all modern login systems and is prefered for establishing the PATH
variable.
Is it in
/etc/profile
? – BenjiWiebe – 2014-06-23T17:45:09.350Nope. I checked the file now and it's not in it, neither in any files in profile.d. Also as I said, grepping /etc folder gives nothing :/ – sencer – 2014-06-23T17:47:18.647
1It is possible that it is due to a file in
/etc
, but not directly entered in the file, for instance if it gets/opt/texbin
from the output of some other command and puts it inPATH
. – BenjiWiebe – 2014-06-23T17:49:11.703Makes sense. Couldn't think of a way of testing though -- can you? – sencer – 2014-06-23T17:51:42.367
I think I might be able to find it if I was sitting down at your computer, but I'm not sure.....How about giving me SSH access (with
sudo
access, of course)? :) – BenjiWiebe – 2014-06-23T17:52:33.003What OS are you using? What created the
/opt/texbin
folder? – BenjiWiebe – 2014-06-23T17:53:31.867Is it in any of the
/etc/z*
files? – BenjiWiebe – 2014-06-23T18:22:26.670Sorry for late response. Of course, and would you need my bank accounts also? :) My OS is Ubuntu, and /opt/texbin is actually not existing and this is why I am trying to remove it from PATH. I have no idea how it entered into my PATH but I believe it has something to do with Texlive 2013. It is not in any of /etc/z* files. – sencer – 2014-06-24T17:04:16.950