Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!hp-pcd!hplsla!hpubvwa!grlab!scott From: scott@grlab.UUCP (Scott Blachowicz) Newsgroups: comp.windows.x Subject: Re: Figuring out the right DISPLAY variable when you rlogin. Message-ID: <900008@grlab.UUCP> Date: 19 Apr 89 20:55:08 GMT References: <19688@iuvax.cs.indiana.edu> Organization: Graphicus Lines: 31 One thing I've done is to pass it along on the $TERM variable...I would setup a script (xrlogin) (by the way, we're on an HP system): #! /bin/sh hostname=`hostname` DISPLAY=`echo ${DISPLAY:-unix:0.0} | sed "s/^unix:/$hostname:/"` TERM=hpX$DISPLAY export DISPLAY TERM exec rlogin $* then, my .profile(or .login or whatever) would check for the current value of the $TERM variable: case "$TERM" in hpX*) DISPLAY=`expr substr "$TERM" 4 99` export DISPLAY PATH=/usr/bin/X11:$PATH eval `tset -s hpX` eval `/usr/bin/X11/resize` ;; *) eval `tset -s "local:${L0:-hp2397}" ${L0:-hp2393}`;; esac This assumes that the remote system's system-wide login procedure didn't blast your $TERM (in /etc/csh.login,/etc/profile or whatever). Boy is that a kludge, seems there should be a way to have rlogin pass through environment variables for you. --- Scott Blachowicz USPS: Graphicus UUCP: ...!hpubvwa!grlab!scott 150 Lake Str S, #206 VoicePh: 206/828-4691 Kirkland, WA 98033 FAX: 206/828-4236