Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdahl!pyramid!prls!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.unix.questions Subject: Re: rlogin kludge: using TERM to pass other envariables? Message-ID: <9849@dunkshot.mips.COM> Date: 13 Dec 88 17:48:38 GMT References: <899@cmx.npac.syr.edu> Reply-To: dce@mips.COM (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 36 In article <899@cmx.npac.syr.edu> jerryp@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@mips.com or {ames,prls,pyramid,decwrl}!mips!dce "Did you see his eyes? Did you see his crazy eyes?" -- Iggy (who else?)