Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!stan!dce From: dce@Solbourne.COM (David Elliott) Newsgroups: comp.unix.questions Subject: Re: DISPLAY environment variable from login(1) Keywords: Ultrix 3.0, X11R2, uVAX II/GPX, vs2000 Message-ID: <2284@marvin.Solbourne.COM> Date: 6 Sep 89 21:04:03 GMT References: <4045@buengc.BU.EDU> <2273@marvin.Solbourne.COM> <4599@ogccse.ogc.edu> Reply-To: dce@Solbourne.com (David Elliott) Organization: Solbourne Computer Inc., Longmont, Colorado Lines: 36 In article <4599@ogccse.ogc.edu> schaefer@ogccse.UUCP (Barton E. Schaefer) writes: >So, you create a front-end script on the local machine that looks like > > #! /bin/sh - > TERM="$TERM.$DISPLAY" ; export TERM > exec /path/to/real/rlogin ${@+"$@"} ... >If the value of $DISPLAY is particularly long, this may run into problems >with the lenght of the string that rlogin will pass as $TERM. However, The solution outlined here is quite reasonable in many cases, and I used it for about a day. There are two problems with it, though. One is outlined above, that being the problem of long values of DISPLAY. This is not really a problem in practice, since the array used to store the data is 64 characters. Assuming xterm for the terminal type and 6 characters to pass the screen size, you are left with 52 characters for $DISPLAY. Given that there still exist programs that hardcode the number 32 for the maximum hostname length (the number in 4.3BSD is defined by MAXHOSTNAMELEN, which is 64), it's not too likely that you'll run into this problem. The other problem I outlined in my posting. Using the above scheme, if you rlogin to a machine for which you have no home directory, and thus no .login/.profile that will rebuild the variables, you end up setting your TERM variable by hand. Either method will work fine, though. -- David Elliott dce@Solbourne.COM ...!{uunet,boulder,nbires,sun}!stan!dce "We don't do this because we love you or like you...we don't even know you!"