Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!elsie!nih-csl!keith From: keith@nih-csl.UUCP (keith gorlen) Newsgroups: comp.windows.x Subject: Re: setting DISPLAY Message-ID: <221@nih-csl.UUCP> Date: Sat, 23-May-87 10:30:58 EDT Article-I.D.: nih-csl.221 Posted: Sat May 23 10:30:58 1987 Date-Received: Sun, 24-May-87 03:29:41 EDT References: <10162@sri-spam.istc.sri.com> Organization: NIH-CSL, Bethesda, MD Lines: 30 Summary: Script file for "leapto" to set DISPLAY In article <10162@sri-spam.istc.sri.com>, wohler@sri-spam.istc.sri.com (Bill Wohler) writes: > folks, > > i had hardcoded my DISPLAY environment variable to my workstation > name. now that i work on several workstations, it is no longer a > workable paradigm. could people send me their methods of setting > this variable? do people just set it to `hostname`:0 and then use > command line args when using rsh? > We have xinit set DISPLAY to unix:0, and we use the following script to "leap" to other machines: #! /bin/sh # # leapto - shell script for accessing a remote machine under X Windows # case $DISPLAY in unix:[0-9] ) XDISPLAY=`hostname``expr $DISPLAY : '.*\(:[0-9]\)'` ;; * ) XDISPLAY=$DISPLAY ;; esac xhost $1 rsh $1 "setenv DISPLAY $XDISPLAY; setenv TERM xterm; setenv PATH $PATH; xterm -132 -n $1"& -- Keith Gorlen phone: (301) 496-5363 Building 12A, Room 2017 uucp: seismo!elsie!nih-csl!keith National Institutes of Health Bethesda, MD 20892