Path: utzoo!attcan!uunet!mailrus!cs.utexas.edu!rice!sun-spots-request From: auspex!guy@uunet.uu.net (Guy Harris) Newsgroups: comp.sys.sun Subject: Re: .login not read at login Keywords: Miscellaneous Message-ID: <9556@brazos.Rice.edu> Date: 30 Jun 90 18:09:05 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 17 Approved: Sun-Spots@rice.edu X-Refs: Original: v9nv9n220, Replies: v9n233 X-Sun-Spots-Digest: Volume 9, Issue 246, message 5 >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]".)