Tramp is very tenacious in overriding the PATH setting of a remote machine. How can I completely disable this, so that Tramp's PATH is identical to what I get when I manually log in with ssh on the terminal?
The ~/.bashrc
in my remote machine looks as follows:
export PATH1=$PATH
# activate some Python virtualenvs, etc...
export PATH2=$PATH
I want the final PATH to be PATH2. The closest I can get to that is
when setting tramp-remote-path
to the value
'(tramp-own-remote-path)
, in which case my PATH ends up being
identical to PATH1. (I'm checking this by doing M-x compile RET env RET
while editing a remote file.)
One interesting solution (with other applications as well) would be to stipulate, as a directory or connection-local variable, an additional rc file on the remote machine that is sourced every time Tramp connects. Is this possible at all?