Discussion:
[GRASSGUI] Re: [grass-addons] r363 - trunk/grassaddons/gui
Glynn Clements
2007-11-14 22:56:49 UTC
Permalink
Author: barton
Date: 2007-03-28 23:53:04 +0200 (Wed, 28 Mar 2007)
New Revision: 363
trunk/grassaddons/gui/wxgrass
Starting non-modally
Modified: trunk/grassaddons/gui/wxgrass
===================================================================
--- trunk/grassaddons/gui/wxgrass 2007-03-28 20:48:41 UTC (rev 362)
+++ trunk/grassaddons/gui/wxgrass 2007-03-28 21:53:04 UTC (rev 363)
@@ -8,9 +8,9 @@
SYSTEM=`uname -s`
if [ "$SYSTEM" = "Darwin" ] ; then
- pythonw "$GISBASE/etc/wx/wxgui.py" -name wxgui_py
+ pythonw "$GISBASE/etc/wx/wxgui.py" -name wxgui_py &
else
- python "$GISBASE/etc/wx/wxgui.py" -name wxgui_py
+ python "$GISBASE/etc/wx/wxgui.py" -name wxgui_py &
fi
I'm not sure that this is a good idea; if you want wxgrass to run in
the background, you can use "wxgrass &".

If this remains, stdout and stderr should be redirected (e.g. to
/dev/null), so that they don't create mess on the terminal (or suspend
wxgrass if output from a background process results in SIGTTOU).
--
Glynn Clements <***@gclements.plus.com>
Michael Barton
2007-11-14 22:56:49 UTC
Permalink
I just copied the format in the current gis.m script. Without this, it is
running modally. How would you recommend changing it?

Michael
Post by Glynn Clements
Author: barton
Date: 2007-03-28 23:53:04 +0200 (Wed, 28 Mar 2007)
New Revision: 363
trunk/grassaddons/gui/wxgrass
Starting non-modally
Modified: trunk/grassaddons/gui/wxgrass
===================================================================
--- trunk/grassaddons/gui/wxgrass 2007-03-28 20:48:41 UTC (rev 362)
+++ trunk/grassaddons/gui/wxgrass 2007-03-28 21:53:04 UTC (rev 363)
@@ -8,9 +8,9 @@
SYSTEM=`uname -s`
if [ "$SYSTEM" = "Darwin" ] ; then
- pythonw "$GISBASE/etc/wx/wxgui.py" -name wxgui_py
+ pythonw "$GISBASE/etc/wx/wxgui.py" -name wxgui_py &
else
- python "$GISBASE/etc/wx/wxgui.py" -name wxgui_py
+ python "$GISBASE/etc/wx/wxgui.py" -name wxgui_py &
fi
I'm not sure that this is a good idea; if you want wxgrass to run in
the background, you can use "wxgrass &".
If this remains, stdout and stderr should be redirected (e.g. to
/dev/null), so that they don't create mess on the terminal (or suspend
wxgrass if output from a background process results in SIGTTOU).
__________________________________________
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
Glynn Clements
2007-11-14 22:56:49 UTC
Permalink
Post by Michael Barton
I just copied the format in the current gis.m script. Without this, it is
running modally. How would you recommend changing it?
Just remove the "&"s. If you want it to run in the background, type
"wxgrass &".

Note that GUI applications typically don't put themselves into the
background automatically. If you want them to run in the background,
you have to add the "&" yourself.

Sometimes you might want to wait for termination, e.g. to perform
clean-up. Having an application auto-background makes it impossible to
reliably detect termination.
--
Glynn Clements <***@gclements.plus.com>
Loading...