[GRASS5] Re: [GRASSLIST:8545] Re: d.m - commands output pollute the Grass terminal

Michael Barton michael.barton at asu.edu
Sun Oct 9 01:47:47 EDT 2005


Following up on a suggestion by Maciek and information by Glynn, I've played
around with outputting GIS Manager commands to a separate terminal window a
bit.

Currently, all GIS Manager commands send their output to the GRASS terminal
so that the relevant display commands are echoed there (using TclTk "puts"
for each command). 

However, the GIS Manager can be started in a separate xterm where all
command output will be displayed, keeping the main GRASS xterm free of this
output and cleaner looking. The drawback is that it opens another window on
the screen.

The simplest way to do this seems to be in modifying the d.m script that
starts the GIS Manager. Because it's a very small file, I've attached a
suggested way to do this here. (I've kept the original lines and commented
them out). 

To keep the GIS Manager command output xterm visually distinct from the main
GRASS xterm (and any other xterm), I've given it a descriptive window name,
colored it in the new GIS Manager color that Hamish suggested, made it a bit
smaller, and placed it in the upper right hand corner.

If you folks think this is an improvement, I can add it to the CVS on Monday
(or one of you can add it over the weekend).

Michael 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Glynn Clements <glynn at gclements.plus.com>
> Date: Sat, 08 Oct 2005 10:29:22 +0100
> To: Michael Barton <michael.barton at asu.edu>
> Cc: Maciek Sieczka <werchowyna at epf.pl>, <grasslist at baylor.edu>
> Subject: Re: [GRASSLIST:8545] Re: d.m - commands output pollute the Grass
> terminal
> 
> 
> Michael Barton wrote:
> 
>>> I understand, that's good. But could there be a permanent, *separate*
>>> terminal for output from d.m commands? It could be the small, neat one - the
>>> same which pops up when we query raster layers from d.m.
>>> 
>>> Currently my Grass terminal looks like a Matrix screesaver when I redraw 20
>>> layers in d.m. Main terminal should be for CLI, GUI should have a separate
>>> text output, I guess.
>> 
>> This is a good idea but I don't know how to redirect this output to a
>> separate terminal. Anyone have a suggestion?
> 
> xterm -e d.m &
> 
> or, if xterm is setuid:
> 
> xterm -e $GISBASE/etc/grass-run.sh d.m &
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>

-------------- next part --------------
#!/bin/sh
#% Module
#%  description: Display manager for GRASS
#% End
#%option
#% key: dmrc
#% type: string
#% description: Name of .dmrc settings file
#% required : no
#%End

if [ $# -eq 0 ] ; then
#   exec "$GRASS_WISH" $GISBASE/etc/dm/d.m.tcl -name d_m_tcl
	exec xterm -bg "HoneyDew2" -title "GIS Manager command output" \
		-geometry 80x10-0+0 -sb \
		-e "$GRASS_WISH" $GISBASE/etc/dm/d.m.tcl -name d_m_tcl
   exit 0
fi

if [ "$1" != "@ARGS_PARSED@" ] ; then
  exec g.parser "$0" "$@"
fi

#exec "$GRASS_WISH" "$GISBASE/etc/dm/d.m.tcl" -name d_m_tcl "$GIS_OPT_dmrc" sh &
exec xterm -bg "HoneyDew2" -title "GIS Manager command output" \
	-geometry 80x10-0+0 -sb \
	-e "$GRASS_WISH" "$GISBASE/etc/dm/d.m.tcl" -name d_m_tcl "$GIS_OPT_dmrc" sh &


More information about the grass-dev mailing list