[GRASS-dev] BASH question about quitting GIS Manager

Michael Barton michael.barton at asu.edu
Wed Nov 8 13:58:40 EST 2006

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.

1. When the GIS Manager shell script is first run (gis.m& to run in
background), have it set an environmental variable. For example...

2. The script would idle away, waiting for any change to the environmental
variable (this is a part I¹m not sure how to do)...
... let the GIS Manager run

3. When the GIS Manager quits (or quits with an option to exit GRASS), it
could set this variable to false

4. 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
-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 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 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20061108/52026df9/attachment.html

More information about the grass-dev mailing list