[GRASS5] fix for problem opening monitor windows from the TclTk menu in WinGRASS

Michael Barton michael.barton at asu.edu
Wed Feb 11 13:47:25 EST 2004


Currently, if you try to open a monitor window in WinGRASS using the 
TclTk menus, it will flash open and close. It can eventually cause 
problems making it impossible to open monitor windows and sometimes to 
even open tcltkgrass. The current workaround is to always open monitors 
from the command line, using d.mon, prior to using them for displaying 
maps (including using the display manager, d.dm).

Glynn Clements suggested a fix for this (see below). I've tested it on 
a Windows computer using Windows XP (and GRASS 5.0.3) and it does the 
trick. I've also tested it on my Mac (with GRASS 5.3) and it seems to 
cause no harm. I don't have access to Linnux or other Unix systems to 
test this, but I suspect it should be OK.

The fix is a slight modification of a line in the 
$GISBASE/tcltkgrass/main/gui.tcl file. As Glynn suggested below, change 
the line

> exec xterm -geometry 40x5 -e d.mon start=$monitor

to

>     exec d.mon start=$monitor &

Could this be submitted to the CVS? Thanks

Michael Barton

Begin forwarded message:

> Glynn Clements wrote:
>
>>> 2. Can GRASS 5.3 open monitors via the tcltk menu or is it still
>>> necessary to do this from the command line using d.mon?
>>
>> I didn't try that; I'll check later.
>
> I've checked that; it still doesn't work.
>
> The problem appears to be this in start_monitor, in gui.tcl:
>
>     exec xterm -geometry 40x5 -e d.mon start=$monitor
>
> The xterm terminates as soon as d.mon completes, which seems to end up
> killing the monitor (this may be due to a difference in the way that
> Cygwin handles terminals, or due to the use of the Win32 spawn()
> function rather than Cygwin's fork+exec).
>
> A possible fix is to change the above line not to use an xterm, i.e.
>
>     exec d.mon start=$monitor &
>
> You will still need to select the monitor separately.
>
______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2148 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20040211/6a5a29ea/attachment.bin


More information about the grass-dev mailing list