4bsd .login and .cshrc

Juergen Wagner gandalf at csli.STANFORD.EDU
Sun Mar 27 16:24:45 AEST 1988


In article <111 at infmx.UUCP> aland at infmx.UUCP (alan denney) writes:
>...
>You may have been "RTFM"d for this, but I have seen a lot of people get

Actually, if you don't have some experience with UNIX it is a case of
RTMVC (Read The Manual Very Carefully) :-) :-).

>... 			(Public note: the man
>pages for "su" and "csh" appear to disagree).

The csh(1) man page says that .cshrc is executed first, then .login if the
newly created shell is a login shell. The su(1) man page is inconsistent.
The login(1) manpage is correct. The rlogin man page doesn't mention anything
about that matter at all.

>...
>Of course, things get confusing if the user does something silly,
>like having a "source .login" command within the .cshrc (which I
>have seen more than a few times ;-]).

Source'ing .login in .cshrc should not do anything bad if .login is written
properly (e.g. make uses of stty/biff/etc. conditional on interactiveness).
Yet, it doesn't make any sense, either :-).

>> How are these files handled when you initiate Suntools? 

When you startup Suntools, this is typically handled in the .login. The
point is that .cshrc is executed every time a csh starts (e.g. when FranzLISP
starts its assembler). Put in this file everything you'd like to have in
every csh. Put into .login everything you need in the login shell, and
all environment variables not needed in all cshs. Also, terminal setup
(tset, stty, biff, ...) should be in .login because in .cshrc it doesn't
make sense. So, typically .login runs Suntools. Each cmdtool/vt100tool/
shelltool starts a new csh, i.e. executes .cshrc but *BUT* no .login.

>> How are they handled in an rlogin?

Exactly same as normal login. The csh starts and reads .cshrc, notices
that it is a login shell, and reads .login. All this happens, of course,
on the remote machine. rsh (BSD) and remsh (HPUX) invoke only .cshrc.

>> How about them Celtics?

Sounds interesting. What does it mean?

-- 
Juergen Wagner,			           gandalf at csli.stanford.edu
Center for the Study of Language and Information (CSLI), Stanford CA



More information about the Comp.unix.questions mailing list