4bsd .login and .cshrc

Joe Pruett joey at tessi.UUCP
Wed Mar 30 05:11:20 AEST 1988


As has been mentioned, rsh does not source your .login file.  This is
quite obnoxious when you set your path in your .login (where it belongs
so that each shell isn't hashing your path more than necessary).
"rsh hostname something_in_usr_local_bin" will get you a "Command not
found" message.  To get around this problem I've renamed .login to
.mylogin and created a new environ variable that let's my .cshrc know
if my .mylogin has been run, if not then .cshrc sources .mylogin.

In .cshrc:
if ( ! ${?MYLOGIN} ) source ~/.mylogin
.
.

In .mylogin:
set path = ( . . . )
.
.
setenv MYLOGIN ""

This could be cleaned up a little bit (move the env stuff into
.cshrc inside the if MYLOGIN line), but inertia can be quite
overwhelming.
--
Joe Pruett        ...!tektronix!tessi!joey



More information about the Comp.unix.questions mailing list