rlogin kludge: using TERM to pass other envariables?

David Elliott dce at mips.COM
Wed Dec 14 03:48:38 AEST 1988


In article <899 at cmx.npac.syr.edu> jerryp at cmx.npac.syr.edu (Jerry Peek) writes:
>One thing bugs me about "rlogin":  the only environment variable it'll pass
>to the remote machine is TERM.  I want to pass more.

{common, useful solution to problem deleted}

>Anybody found a better way?  Problems?  How many characters can I squeeze into
>the TERM string?  (I'm on BSD-type systems: Sun, VAX/ULTRIX, Multimax, Alliant.)

You can generally only put 64 characters, since that's how large term[]
is in login on BSD.

I sent a proposal for an extension to the rlogin protocol to Berkeley a
month or two ago, but they've been to busy to answer.

The data field sent to contain the terminal type and line speed may
optionally end with a /, and login ignores the trailing information.
So, my idea was to follow this / with a magic cookie.  If the login
command understands this cookie, it sends back another cookie as its
first output, and rlogin, seeing this reply, sends across a set of
resource/value pairs.  The most common resource/value pair would be
environment variables, but other things, such as limits or nice value
(not allowing a user to raise such values, of course), could be sent.

The advantage to such a system is that it doesn't break when used with
old versions of rlogin and login.  If rlogin doesn't send the cookie,
login won't reply.  If login doesn't understand the cookie, it won't
reply, and so rlogin won't send the extra data down the line.

In addition, my proposal said that the magic cookie value would
contain a protocol version number, which, if the inventor(s) of
rlogin had done in the first place, this (admittedly a hack) solution
would be unnecessary.

-- 
David Elliott		dce at mips.com  or  {ames,prls,pyramid,decwrl}!mips!dce
"Did you see his eyes?  Did you see his crazy eyes?" -- Iggy (who else?)



More information about the Comp.unix.questions mailing list