'remote' monitors with XDRIVER?

Peter Strong peter at nps.gov
Mon Dec 20 18:32:23 EST 1993


On Mon, 20 Dec 1993, Martin Ameskamp wrote:

> The current thread about twelve students using GRASS reminded me
> of a problem we have: we run GRASS on a SUN (SunOS 4.x) and we would
> like to use it remotely on other machines (e.g. HP).
> GRASS itself is no problem - xterm works fine. However, we can't
> open a monitor. Is there any way of passing a DISPLAY argument
> to XDRIVER so the monitor window appears on the local machine?


We have an environment very similar to yours, and we do this
routinely with the following two scripts, grass.a and grass.b
If you run this from an HP the only thing you might have to 
change is the command "newshost add $HOST" -> "xhost $HOST".



==> grass.a <==

:
# This script runs GRASS loaded on machine HOST.
HOST=mrbig
PATH=/usr/openwin/bin:$PATH
export PATH
newshost add $HOST
if [ $? -ne 0 ]
	then echo If you want to run grass with a graphics display, you must
	echo be running Open Windows on the main console.
	echo You can run grass anyway, but you will not be able to start a
	echo graphics monitor on your local display!
	echo .
	echo Press RETURN to continue, or Ctl-C to abort.
	read PAUSE
	fi
echo To start grass you must execute grass.b
rlogin $HOST

==> grass.b <==

:
# This script runs grass on one machine with another machine for the display
LOCAL=`who am i | tr '()' %% | cut -d% -f2`
if [ "$LOCAL" = "" ]
	then echo $0 must be run after an rlogin
	exit 1
	fi
DISPLAY=$LOCAL:0
LD_LIBRARY_PATH=/usr/openwin/lib:/usr/lib
export DISPLAY LD_LIBRARY_PATH

GISBASE=/home/grass4
export GISBASE
exec $GISBASE/etc/GIS.sh



More information about the grass-user mailing list