[GRASS5] Re: General and gis.m module running (stdout,stderr,exit status) issues

Michael Barton michael.barton at asu.edu
Mon Apr 3 17:04:34 EDT 2006

For v.digit, I thought it might be how I tried to work it through gis.m, so
I tried running it from the command line and was still having problems.

Several programs (e.g., v.digit, d.profile) won't run unless there is an
open xmon. The old gis.m tried to help by opening an xmon before starting
one of those programs. People can simply do the whole thing manually, but
this can be complicated for newish users.

One thing I just thought of that might be a good idea in general at this
juncture. For the few modules that require an xterm for display, is there
some way to build in a button (referenced in the C code lines that format
the module gui) that can be used to start an xterm? Or is running anything
like this through parser.c problematic at the moment?

> From: Cedric Shock <cedricgrass at shockfamily.net>
> Date: Mon, 3 Apr 2006 13:07:34 -0700
> To: <grass5 at grass.itc.it>
> Cc: Michael Barton <michael.barton at asu.edu>
> Subject: General and gis.m module running (stdout,stderr,exit status) issues
> 3. In gis.m some menu items, like v.digit, run without a GUI and are useless.
> The lowdown:
> g.parser eats the original standard input
> gis.m is run by g.parser
> parser.c decides whether or not to show the UI when there are no arguments
> based on whether its standard input is a tty.
> When a program is run from inside gis.m parser.c doesn't run the gui because
> stdin isn't a tty.
> The solution:
> Don't run programs inside gis.m and expect to get a GUI. Either use --tcltk to
> get the code to source, use --ui to force the user interface to come up, or
> run them in a terminal emulator like xterm so that they have a stdin that is
> a tty.

Is this the syntax to put into the menu item? (execute [command] --ui ???)

> Where it's at:
> gmmenu.tcl and gm.tcl (The Gm:xmon proc)
> On a similar note opening monitors for programs to use and running the program
> are independent and should be separated somehow. Rewriting Gm:xmon and
> changing the menu entries is probably the best solution.

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 

More information about the grass-dev mailing list