Workspace launched from remote terminal

Rob Warnock rpw3 at rigden.wpd.sgi.com
Fri Aug 17 14:32:54 AEST 1990


In article <1990Aug16.120834.19609 at eagle.lerc.nasa.gov> smfedor at solar.lerc.nasa.gov (Gregory Fedor) writes:
+---------------
| In article <67004 at sgi.sgi.com> rpw3 at 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 at sgi.com		rpw3 at pei.com
Silicon Graphics, Inc.		(415)335-1673		Protocol Engines, Inc.
2011 N. Shoreline Blvd.
Mountain View, CA  94039-7311



More information about the Comp.sys.sgi mailing list