[GRASS-user] r.reclass not spawning xterm on Mac OS X

Hamish hamish_nospam at yahoo.com
Wed Nov 8 23:14:46 EST 2006


> > I've been trying to run r.reclass on my G5 using the precompiled
> > binary for 6.2 and the Mac OS X frameworks (ActiveTcl, too). 
> > Running r.reclass from the terminal spawns a GUI window, into which
> > I enter the raster layer and the result's name.  After pressing
> > "run", no xterm window spawns to allow me to interactively set the
> > rules.  Is there any way to solve this?

Michael Barton wrote:
> You have to run r.reclass with arguments to get to the xterm
> interface. From the GIS Manager, there is a script that does this.
> 
> Running r.reclass without arguments will open a GUI that is pretty
> useless.

the general solution to this is to force the module not to run in GUI
mode by setting the GRASS_UI_TERM enviro variable.

e.g., from r.digit:

    /* must run in a term window */
    G_putenv("GRASS_UI_TERM","1");

    /* Initialize the GIS calls */
    G_gisinit(argv[0]) ;


then in menu.tcl:
   -command {term r.digit }}


no need for wrapper scripts this way..

I don't use r.reclass so can't really comment on whether that is the
best thing for the module. (is it always interactive in a terminal?)



Hamish




More information about the grass-user mailing list