[GRASS-dev] start grass with only initializing the environment

Rainer M Krug Rainer at krugs.de
Wed Jul 24 02:31:41 PDT 2013


Markus Neteler <neteler at osgeo.org> writes:

> On Mon, Jul 15, 2013 at 5:44 PM, Rainer M Krug <Rainer at krugs.de> wrote:
> ...
>> I would therefore suggest an additional startup argument for grass,
>> which only sets the environmental variables, including library paths,
>> so that GRASS commands can be executed afterwards, and if the
>> LOCATION_NAME and MAPSET are not provided, they will be null and *have
>> to be set manualy afterwards*.
>> This could e.g. have the name "-noui" indicating that no ui will be
>> started.
>
> I wonder what the difference to starting GRASS 7 with  -text is...
> Maybe that's already enough?

No - this doesn't work. 

The idea is to use this from R to set the environmental parameter when
using spgrass6. If I call grass -text from R (all in the terminal), the
grass session opens and I am in grass, but I can not do anything from R,
which I want to do. 

So it seems that the grass startup script recognises that it is not in a
shell, and then starts one? If this starting of the shell could be
suppressed, I would expect that starting grass with the -text option
should work. I would assume that this would be similar to setting
GRASS_BATCH_JOB, only that GRASS does not exit automatically.
Something like a GRASS_BATCH_MODE - or one could call it a GRASS_SERVER_MODE?

Cheers,

Rainer


>
> Markus


-- 
Rainer M. Krug

email: RMKrug<at>gmail<dot>com


More information about the grass-dev mailing list