[GRASS-user] exit from grass after setting GRASS env variable

Glynn Clements glynn at gclements.plus.com
Fri Feb 20 17:14:54 PST 2015


Moritz Lennert wrote:

> > i have a very simple question but i'm not able find the simple answer.
> > I'm following the procedure for Setting the GRASS environmental
> > variables, <http://grasswiki.osgeo.org/wiki/GRASS_and_Shell>in the bash
> > environment.
> > Everything works grate and I'm able to access to all grass commands.
> > My question is how I can exit from grass and return to the
> > bash-with-nograss.
> 
> You cannot "exit" GRASS as it is not an application by itself. If you do 
> not want to have access to the GRASS modules anymore, just unset your 
> environment variables.
> 
> If you want to change your prompt, set PS1 to something else.

Alternatively, you could just spawn a separate shell (with "bash")
before setting any of the GRASS environment variables then terminate
it (with "exit") when you're finished.

A child process (normally) inherits its environment from its parent at
start-up, but any changes to the child's environment won't affect the
parent's.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list