Newsgroups: comp.unix.questions, comp.unix.shell, comp.sys.sgi
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!data.nas.nasa.gov!nameserver.nas.nasa.gov!browning
From: browning@nas.nasa.gov (David S. Browning)
Subject: Passing environment to rlogin session
Date: 10 Jun 91 11:16:29
Distribution: comp
Organization: NAS Program, NASA Ames Research Center, Moffett Field, CA
Sender: news@nas.nasa.gov
Message-ID: <BROWNING.91Jun10111629@wilbur.nas.nasa.gov>
Lines: 42

Earlier I asked how to use /usr/ucb/rsh to run an interactive command
such as vi or emacs.  Alternatively, how could I pass an environment
variable to an rlogin shell to specify a command to start up upon
login?

I got many helpful replies.  The simplest (and therefore smartest,
IMHO) thing to do is to "hide" extra stuff in the TERM variable, since
this gets passed by rlogin.  The stuff can be extracted in the rlogin
shell by .login.

I was also told about the "expect" program by Don Libes, available
from durer.cme.nist.gov.  This looks like an impressive package, but
overkill for me given the simple solution above.

Here's an SGI-specific response that deserves to be read on
comp.sys.sgi:

------------------------------

>From: arc@kaibab.wpd.sgi.com (Andrew Cherenson)
To: browning@nas.nasa.gov
Subject: Re: Passing environment to rlogin session
Date: Fri, 7 Jun 91 16:06:34 -0700

The rlogin protocol doesn't allow for passing of environment variables.
The IRIX 4.0 telnet will let you send environment variables to a remote 
IRIS running IRIX 4.0 (or a host with a recent "Dave Borman" telnetd).

------------------------------

Many thanks to all who replied.

David

--
|============================================================================|
| Internet:  browning@nas.nasa.gov                  Phone:  (415) 604-4321   |
| UUCP:  {hplabs, mailrus, ucbvax, etc.}!ames!amelia!browning                |
|----------------------------------------------------------------------------|
|"the nice thing about true hopelessness is that you don't have to try again"|
| -- jules shear                                                             |
|============================================================================|
