What should be in .cshrc vs .login

Neil Rickert rickert at mp.cs.niu.edu
Tue Oct 23 11:15:02 AEST 1990


In article <1300 at tardis.Tymnet.COM> jms at tardis.Tymnet.COM (Joe Smith) writes:
>In article <FPB.90Oct21120952 at ittc.ittc.wec.com> fpb at ittc.wec.com (Frank P. Bresz) writes:
>>PATH IMHO is something that should be set at login time only.  It should
>> be inherited by all subsequent shells including sunview, xterminals etc.
>>
>>	Now for the question (flame request) of the day.  Do people in
>>general agree with me that .cshrc ought to not touch the path variable or
>>the PATH env and just inherit it?
>
>I used to agree that setting $PATH in .login was the way to go, until I got
>bit by having rsh (remote shell) not doing what it was expected to.  For

 My approach is to always have $HOME/bin as the first element of $PATH.
My .cshrc checks this, and if true leaves the PATH, MANPATH, PAGER, PRINTER
and various other environment variables alone.   It just sets up any aliases,
the preferred prompt, the history, etc.  But if the first path item is wrong
it does just about everything a good '.login' should do except set the TERM
characteristics.  The idea is that if I enter the account vi 'su' or some other
such means, .cshrc is all there is to make things seem normal.  Of course once
I do it that way, I can take some of those settings out of .login

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115.                                  +1-815-753-6940



More information about the Comp.unix.shell mailing list