Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!decwrl!sgi!rpw3@rigden.wpd.sgi.com From: rpw3@rigden.wpd.sgi.com (Rob Warnock) Newsgroups: comp.sys.sgi Subject: Re: Workspace launched from remote terminal Message-ID: <67123@sgi.sgi.com> Date: 17 Aug 90 04:32:54 GMT References: <9008150850.AA12394@mcirps2.med.nyu.edu> <1990Aug15.151151.1237@s1.msi.umn.edu> <67004@sgi.sgi.com> <1990Aug16.120834.19609@eagle.lerc.nasa.gov> Sender: rpw3@rigden.wpd.sgi.com Reply-To: rpw3@sgi.com (Rob Warnock) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 34 In article <1990Aug16.120834.19609@eagle.lerc.nasa.gov> smfedor@solar.lerc.nasa.gov (Gregory Fedor) writes: +--------------- | In article <67004@sgi.sgi.com> rpw3@sgi.com (Rob Warnock) writes: | >(*sigh*) Because of the way the window manager gets your environment vars... | >... your example should read: | > if ( ! $?ENVONLY && "`tty`" == "/dev/console" ) then | > workspace | > endif | | Potentially stupid question: Does this apply for the /etc/cshrc file as well? +--------------- Yes. (*sigh*) The "exporttonews" program (in the case of "csh", "sh" is similar) actually does, in a manual equivalent of "popen()": fork(); ...other stuff... execl("/bin/csh", "-sh", "-c", "source .login;echo ::: ENV;exec /bin/env", 0); Note that arg#0 ("-sh") begins with a "-" indicating a "login shell" (see the csh(1) man page). So, yes, both /etc/cshrc and ~/.cshrc get run. -Rob ----- Rob Warnock, MS-9U/510 rpw3@sgi.com rpw3@pei.com Silicon Graphics, Inc. (415)335-1673 Protocol Engines, Inc. 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311