Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!mcnc!decvax!decwrl!labrea!csli!gandalf From: gandalf@csli.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.unix.questions Subject: Re: 4bsd .login and .cshrc Message-ID: <3125@csli.STANFORD.EDU> Date: 27 Mar 88 06:24:45 GMT References: <326@ivory.SanDiego.NCR.COM> <7765@apple.Apple.Com> <27717@linus.UUCP> <111@infmx.UUCP> Reply-To: gandalf@csli.stanford.edu (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 48 In article <111@infmx.UUCP> aland@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@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA