Repeatedly there have been requests to make it possible to quit GRASS when quitting the GIS Manager (and to automatically quit the GIS Manager when quitting GRASS).
I had an idea that I thought I run by everyone and see if I could get some suggestions about getting it to work.
-
When the GIS Manager shell script is first run (gis.m& to run in background), have it set an environmental variable. For example…
export GRASS_GUI_RUN=”TRUE” -
The script would idle away, waiting for any change to the environmental variable (this is a part I’m not sure how to do)…
while GRASS_GUI_RUN==”TRUE”
… let the GIS Manager run -
When the GIS Manager quits (or quits with an option to exit GRASS), it could set this variable to false
set env(GRASS_GUI_RUN) “FALSE” -
The script would exit its while loop and echo “exit” to the GRASS command prompt, “shutting down” GRASS (i.e., resetting the GRASS environment and closing the GRASS shell).
Would something like this work???
If so, we also might be able to use this for automatically quitting the GIS Manager.
-Write into the GRASS exit routine a check for the GRASS_GUI_RUN environmental variable
-If it is set to TRUE, kill WISH.
What do you think?
Michael
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton