Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!snorkelwacker!bloom-beacon!THINK.COM!rlk From: rlk@THINK.COM (Robert L. Krawitz) Newsgroups: comp.windows.x Subject: Remote xterm strategy Message-ID: <9001061716.AA04598@underprize.think.com> Date: 6 Jan 90 17:16:04 GMT References: <15383@well.UUCP> Sender: rlk@think.com Organization: The Internet Lines: 37 Date: 6 Jan 90 07:04:30 GMT From: snorkelwacker!apple!well!jef@bloom-beacon.mit.edu (Jef Poskanzer) The only problem is, I haven't figured out a good way to get DISPLAY set correctly using the rlogin method. You need my xdsp script, and the code in my .login file: BTW, the fact that the .login code checks for both xt?. and xt. has some history; it isn't terribly important now. xdsp (note that this requires a variable XDISPLAY that contains your "real" DISPLAY variable, since it's usually unix:?.? on your local machine. It relies upon the fact that TERM is passed across rlogin and rsh. A similar hack works for some versions of telnet.): #!/bin/sh TERM=xtu.$XDISPLAY export TERM exec rsh $* Put this in your .login: # This hair unpacks the TERM variable into DISPLAY if (($TERM =~ xt?.*) || ($TERM =~ xt.*)) then setenv DISPLAY `echo $TERM | sed 's/xt[^.]*\.//'` setenv XDISPLAY $DISPLAY echo $DISPLAY | egrep '.*:[0-9]\.[0-9]$' >& /dev/null set term = xterm setenv TERM xterm endif ames >>>>>>>>> | Robert Krawitz 245 First St. bloom-beacon > |think!rlk (postmaster) Cambridge, MA 02142 harvard >>>>>> . Thinking Machines Corp. (617)876-1111