Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!csun!lkw From: lkw@csun.edu (Larry Wake) Newsgroups: comp.sys.next Subject: Re: csh & the NeXTs Message-ID: <1889@csun.edu> Date: 15 Feb 89 18:57:27 GMT References: <17953@vax5.CIT.CORNELL.EDU> Reply-To: lkw@csun.edu (Larry Wake) Distribution: na Organization: California State University, Northridge Lines: 21 In article <17953@vax5.CIT.CORNELL.EDU> jhc@Vax5.CIT.Cornell.EDU (James H. Cloos, Jr.) writes: >On another tangent, I would like to execute some commands on login iff I've >loged in remotely, but don't know how to check this in .login. Here's what I do to get the opposite effect, which you should be able to alter to suit your needs. I have certain commands that I *don't* want to be executed for remote logins. So, I have the following lines at the top of .login: # Find out if this is an rlogin: tty | egrep /dev/ttyp > /dev/null set NOTNET = $status $NOTNET is true if it's not an rlogin. I use its value in subsequent 'if' statements in .login; I even check it in .logout to skip things like fortune when I'm just closing an rlogin session. -- Larry Wake lkw@csun.edu CSUN Computer Center uucp: {hplabs,rdlvax}!csun!lkw Northridge, CA 91330 BITnet: LKW@CALSTATE "...it's not as good as Whip 'n' Chill, but it does have a very nice flavor."