.login not read at login

Guy Harris auspex!guy at uunet.uu.net
Sun Jul 1 04:09:05 AEST 1990


 >The .login file is also read when you rlogin to your machine, but it is
 >not when you do an rsh command to your machine (such as "rsh `hostname`
 >date").
 >
 >The .login file is NOT read when you open up another window under SunView,
 >since it reads the environmental variables from memory instead of from
 >disk.

To be precise, the ".login" file is read iff the C shell is fired up with
"-" as the first character of "argv[0]", and no other arguments passed to
it.  "shelltool" and "cmdtool" don't put "-" in front of "argv[0]", and
neither does "rshd", which is why the ".login" file isn't read.  "login"
does put the "-" there.  (Similar rules apply to the Bourne and Korn
shells; the S5R3.1 Bourne shell, upon which the SunOS 4.x Bourne shell is
based, doesn't check whether any other arguments were passed, and checks
whether there's a "-" in front of the last component of "argv[0]".)



More information about the Comp.sys.sun mailing list