Tom Moore tmoore at
Mon Feb 14 09:36:14 EST 1994

In mailgate.grass.user you write:


>I pulled out TCL/TK from (directory /ucb/tcl) on Friday.

>I went through the tutorial in Very powerful software.

>I am extremely impressed with it now.

>I know this may bring the current work on xgrass to a halt using Motif, but
>could we not debate the value of going down this new route? It is in keeping
>with the principle of free software, more so than using Motif (TCL/TK is free).

I have also been doing some work with Tcl/Tk over the past year
or so, and I am truly impressed with the abilities of this
shell/graphical user interface.  I wanted to explore the
possibility of using Tcl/Tk to drive GRASS, and quickly figured
out that it would require some C programming effort to build
a Tk/GRASS widget in order to best exploit the power of
this toolkit.  Not being enough of a GRASS guru to do this
on my own I did the next best thing:  I contracted the work
out to some experts.  The result is the following:

Tcl can be used as a regular GRASS shell in place of /bin/sh
or whatever.  Just set the SHELL environment variable to
/bin/wish before starting up the GRASS system.  The are a few
minor things that have to be taken care, such as setting 
the LOCATION, etc., but it works just fine as a shell. 

Gille Clement (LIS Inc, Montreal, Quebec) has developed
a GRASS/Tk display widget.  The widget uses standard X
communications mechanisms so it is VERY FAST.  Since it
is a Tk widget, you can embelish it with all sorts of other
widgets (buttons, sliders, scroll bars, etc) to control the 
display (zooming, panning).  Actions on the widgets can  
be bound to any GRASS command or script.

In addition, Gille is working on a translator that will convert
XGRASS control files into Tcl scripts.  I don't know much
about this (since I don't know much about XGRASS), but 
Gille tells me that he thinks that he will be able to
automatically generate Tcl/Tk control panels from the
set of existing XGRASS control panels.  Apparently
there are about 95 of these representing a variety
of GRASS functions.

Gille Clement will attending the GRASS User conference
next month and I believe he has submitted a couple of 
papers on this area.  Once it is ready, we will contribute
the work that Gille is doing for us to the GRASS community.
This should be real soon now.  

Tck/Tk has a lot to offer to the GRASS community.  It
is very high quality, very modern software.  It has a very
liberal copyright (Berkeley copyright, source code available,
almost no restrictions).  It has extremely good documentation.
It has a rich set of widgets (all the standards, plus trees,
charts, hypertext, photo's, and on and on).  There is a 
very active Tcl/Tk community building applications and
extensions to Tcl/Tk, so there is a lot of sample
code for things like newsreaders, mail tools, WWW clients, 
editors, network management tools, etc.  With the
addition of the GRASS display widget produced by Gille
Clement Tcl/Tk is a nice environment for building
interactive GRASS applications.

I will post more information about our project as it
becomes available.  Anyone wishing to reach Gille Clement
directly can get him by email at gc at

Tom Moore                                       tmoore at
Petawawa National Forestry Institute            
Canadian Forest Service, Box 2000, Chalk River  +1 (613) 589-3048
ONT K0J 1J0  CANADA                             +1 (613) 589-2275 telefax

More information about the grass-dev mailing list