[GRASSLIST:3119] Problem using Monitors from a fully scripted GRASS session

Karine ZUERCHER kzuerch at yahoo.com
Mon Feb 11 10:40:41 EST 2002


Hello everyone !

Until grass5pre1, I used HTMLMAP monitor driver from a script (adapted from 
grasslinks) opening and closing a grass session. But as I now updated to 
grass5pre3 (self-compiled version on a RH7.2), I get the following error 
message:
---------------------------------
You must start this driver from within GRASS
No socket to connect to for monitor <HTMLMAP>.
Problem selecting HTMLMAP. Will try once more
No socket to connect to for monitor <HTMLMAP>.
No graphics monitor has been selected for output.
Please run "d.mon" to select a graphics monitor.
Error - No such monitor as 'HTMLMAP'
---------------------------------

I tried the same with an XDRIVE (x0) monitor, and it worked fine, but the PNG 
and the CELL monitors give the same error as the HTMLMAP monitor.

This is the script I used to test:
---------------------------------
#! /bin/sh
BASE_PATH=/home/zuercher
export BASE_PATH
GISBASE=/usr/local/grass5
export GISBASE

TMP_PATH=$BASE_PATH/milpa-alta/tmp
export TMP_PATH

GISRC=$BASE_PATH/milpa-alta/.grassrc
export GISRC
GISDBASE=$BASE_PATH
export GISDBASE
LOCATION_NAME=milpa-alta
export LOCATION_NAME
GIS_LOCK=$$
export GIS_LOCK
ETC=$GISBASE/etc
PATH=$GISBASE/bin:$GISBASE/scripts:$PATH
export PATH


MAPSET=MILPA-ALTA
export MAPSET

eval `g.gisenv`

###########################################
# Run the GRASS command
#sh="`basename ${SHELL=/bin/sh}`"

export GRASS_PNGFILE=$TMP_PATH/image.png
export GRASS_TRUECOLOR=TRUE

g.region raster=Topo

d.mon start=PNG
d.mon select=PNG
d.rast map=Topo
d.mon stop=PNG
#	$*

##########################################
# Exit GRASS

monitor=`g.gisenv get=MONITOR`
if [ "$monitor" ]
then
	$ETC/mon.release -v $monitor
fi
g.gisenv get=MONITOR set=

eval `g.gisenv`

---------------------------------

Does anyone have an idea where the problem might lay ?

Thanx very much for any help you could provide me.

In Kindness
Karine

-- 
Karine ZUERCHER

kzuerch at yahoo.com



More information about the grass-user mailing list