Path: utzoo!attcan!uunet!aplcen!samsung!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Pass environment through rlogin Message-ID: <1989Nov21.040936.10463@athena.mit.edu> Date: 21 Nov 89 04:09:36 GMT References: <696@cs.wmich.edu> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 33 In article <696@cs.wmich.edu> lin@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710