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

Hi,

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, 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.

I tested

exit
exit 1
exit 0

but all of them close the full terminal.

I would like to be able to close GRASS but have all the bash terminal available.

Any idea?

Thanks

Giuseppe

···

Giuseppe Amatulli, Ph.D.

Department of Ecology and Evolutionary Biology, Yale University.

Jetz Lab, Room 405

P.O. Box 208106
New Haven, CT 06520-8106

Teaching: spatial-ecology.net
Work: http://sbsc.yale.edu/giuseppe-amatulli

On 19/02/15 18:19, Giuseppe Amatulli wrote:

Hi,
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&gt;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.

Moritz

Giuseppe Amatulli 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&gt;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.

Moritz Lennert wrote:

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.

Like that <http://stackoverflow.com/a/6877747/1172302&gt; I guess!

Nikos

If you want to change your prompt, set PS1 to something else.
Moritz

On Thu, Feb 19, 2015 at 7:11 PM, Nikos Alexandris <nik@nikosalexandris.net>

Moritz Lennert wrote:

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.

Like that <http://stackoverflow.com/a/6877747/1172302&gt; I guess!

I have added some notes to our wiki page.

Markus

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&gt;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@gclements.plus.com>