My $PATH has gone awry
I installed fink as per the instructions, but when I tried to add the "source /sw/bin/init.csh" line to my .cshrc file it gave me an error upon opening a new terminal window (PATH didn't change either). I then removed the .cshrc file from my user folder, and deteted fink (sudo rm -rf /sw). However, now whenever I log in, PATH is incorrectly set. According to csh.login it should be: "/bin:/sbin:/usr/bin:/usr/sbin:/Applications/STk/bin"
however, now, it is: "/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/iMac HD/Users/nprasad"
Where could it be changing PATH? I don't know of any other file that tcsh loads at login (that messes with PATH), and I'd appreciate any help at getting my PATH set correctly again. Thank you in advance!
Blueflame
[ 12-19-2002: Message edited by: Blueflame ]</p>
however, now, it is: "/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/iMac HD/Users/nprasad"
Where could it be changing PATH? I don't know of any other file that tcsh loads at login (that messes with PATH), and I'd appreciate any help at getting my PATH set correctly again. Thank you in advance!
Blueflame
[ 12-19-2002: Message edited by: Blueflame ]</p>
Comments
but, thats all unnecessary. if u want to change your $PATH, you can inside your .tcshrc [or .cshrc if u dont want to have a .tcshrc]. make one of the last lines in it:
[code]setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/Applications/STk/bin";</pre><hr></blockquote>
now, i should mention that its generally, i think, better to only add onto the path, and not clobber it. so instead of the above, i suggest:
[code]setenv PATH "/new/additions:/second/addition:$PATH";</pre><hr></blockquote>
and replace "/new/additions" with a folder containing executables, and "/second/addition" to another folder of executables. dublicate entries in the $PATH don't really cause problems, so re-adding /bin or /sbin won't really cause trouble. the only issue i could really think of, is the shell checks the PATH left to right, so if /bin is first, and /Applications/STk/bin is second, and you have a program called "foo" in both, then the version in /bin will get executed and not from /Applications/*.
also, if i had to guess, i wouldn't really think that it was any part of the regular tcsh startup that was adding the /Volumes/* onto ur path, probably somethink linked in from your ~/.tcshrc.
Thanks!
Blueflame
<strong>...
now, i should mention that its generally, i think, better to only add onto the path, and not clobber it.
...</strong><hr></blockquote>
You should be careful doing this.
Every childs $PATH will have the additional path added multiple times. This not only makes the search for things unnecessarily longer and longer but also can cause the "Warning: ridiculously long PATH truncated" message.