[GRASS5] Running multiple commands
Glynn Clements
glynn.clements at virgin.net
Tue Aug 13 00:30:31 EDT 2002
Gualter Barbas Baptista wrote:
> What's the best way to run multiple commands in GRASS? What I'm doing
> now is trying to put the tasks to background with the &, but then I
> still get the input on the console, which gets things really confusing.
> Is it possible, for example, to start another GRASS command line on
> another terminal?
>
> The reason why I want to do this is to be able to process two different
> modules simultaneously in an openMOSIX cluster and be able to see where
> each one is standing.
The GRASS startup scripts won't allow multiple sessions for the same
user (to prevent race conditions in reading/writing $GISRC), or for a
given mapset (to prevent race conditions in reading/writing the
mapset; note that this applies not just to maps, but to the WIND,
[CUR]GROUP and [CUR]SUBGROUP files and to temporary files).
You can bypass the startup, and just set the necessary environment
variables yourself, e.g.
GISBASE=/opt/grass5
GISRC=$HOME/.grassrc5
TCLTKGRASSBASE=$GISBASE/tcltkgrass
GRASS_GNUPLOT=gnuplot
GRASS_PAGER=cat
GRASS_PERL=perl
GRASS_TCLSH=tclsh
GRASS_WISH=wish
PATH=$GISBASE/bin:$GISBASE/scripts:$PATH
MANPATH=$GISBASE/man:$MANPATH
LD_LIBRARY_PATH=$GISBASE/lib:$LD_LIBRARY_PATH
PAGER=cat
export GISBASE GISRC TCLTKGRASSBASE
export GRASS_GNUPLOT GRASS_PAGER GRASS_PERL GRASS_TCLSH GRASS_WISH
export PATH MANPATH LD_LIBRARY_PATH
export PAGER
You should give each process a different $GISRC file, using different
mapsets (and, if applicable, different monitors).
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list