[GRASS-dev] BASH question about quitting GIS Manager
Michael Barton
michael.barton at asu.edu
Wed Nov 8 23:37:38 EST 2006
> From: Hamish <hamish_nospam at yahoo.com>
> Date: Thu, 9 Nov 2006 17:24:07 +1300
> To: Michael Barton <michael.barton at asu.edu>
> Cc: <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] BASH question about quitting GIS Manager
>
> Michael Barton wrote:
>> 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).
> ..
>> -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?
>
> `killall wish`, but that would take out any other tcltk programs the
> user is running. (incl other mapsets sessions..)
>
> maybe better
>
> GRASS_GUI_RUN=$$ (you need to get the PID of gis.m from the parent,
> not sure how to do that)
There is a TclTk pid command that will return this value. It is now used to
track PPM maps rendered and displayed in the GIS Manager.
>
> then `kill $GRASS_GUI_RUN`
>
Worth a try.
>
> FWIW I like to start grass in text mode, start gis.m from the command
> line, quit gis.m but stay in my grass session. So quiting gis.m
> shouldn't force a quit of the entire grass session in all cases..
Definitely. There should be a "Quit GIS Manager" and a "Quit GRASS" option.
>
> also be careful to shut down the command line cleanly so .tmp/ gets
> cleaned, etc.
Doesn't simply typing "exit" at the GRASS prompt do that?
>
>
> Hamish
>
> ps - isn't the "&" in gis.m& redundant now?
Not if you want to run anything from the GRASS prompt while the GIS Manager
is running.
Any idea how to do the loop I was thinking about?
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list