Pass environment through rlogin
Jonathan I. Kamens
jik at athena.mit.edu
Tue Nov 21 15:09:36 AEST 1989
In article <696 at cs.wmich.edu> lin at cs.wmich.edu (Lite Lin) writes:
>I have a simple question. I understand that if I 'rlogin' to another host,
>certain environment variables, such as TERM and maybe something else, will
>be copied over to the new host, but I'm wondering whether I can pass on
>other information to the new host as well, such as an environment variable
>defined by myself. Any response will be appreciated. Thanks in advance.
I don't believe there's any way to do this with the standard rlogin.
However, there are a couple hacks you can do to make this possible.
A couple people here at Athena have an rlogin shell script that sets
the TERM variable to the name of the X display on which they are
working before running the real rlogin. At the other end, their
.cshrc or .login file checks to see if the TERM variable contains the
name of a display instead of a terminal type, and if it does, DISPLAY
is set to that type and TERM is set to xterm.
If the variables you want to be able to pass are pretty constant,
you can use this hack on any variable and do the "unparsing" of TERM
in your .cshrc (or .profile, whatever :-) or .login at the other end.
However, you have to keep in mind that rlogin only transfers a limited
number of characters in TERM to the other side (64 characters, I
think), so really long TERM values won't get transferred in their
entirety.
People have been talking about writing an rlogin that transfers
arbitrary environment variables over the connection for a long time
now. I wonder when it'll happen :-)
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list