[GRASSLIST:2483] Re: Trouble with handling of my path by grass

Eric G. Miller egm2 at jps.net
Wed Sep 26 00:48:14 EDT 2001


On Wed, 26 Sep 2001 00:07:03 -0400, "ted byers" <ted.byers at sympatico.ca> wrote:

> I am running grass on xfree+cygwin on NT, and it all seems to be
> working, as
> far as I have been able to ascertain so far.
> 
> However, after I have started grass, and selected a dataset, I see the
> meu
> appear, as well as a welcome screen in the window in which I started
> grass,
> but that welcome text is immediately followed by three errors from bash
> complaining about invalid exported symbols.  I have three spaces in my
> path
> (from that portion of the path created by NT for user installed
> applications), and I get precisely three errors.  The text of the errors
> shows that export is splitting the path into three parts at the location
> of
> the spaces.

This is the problem.  Try editing Init.sh down where there a line that
looks like:

  echo "export PATH=$PATH" >> $bashrc

to

  echo "export PATH=\"$PATH\"" >> $bashrc

There may be a few other places where some quoting needs to be done
so spaces are handled.  Maybe some other CygWin users want to look
at this -- Note underscores or hyphens make good separators for file
and directory names!

> If I open a window in which bash is running, and call "echo $PATH", I
> get
> exactly the right output.  If I then call "export PATH", it seems to
> behave
> properly as I get no output, but if I call "export $PATH", I get the
> same
> errors that I see when I srtart grass.

There is no "export $PATH" that I can see...

> Also, is it my imagination, or does Init.sh rewrite .bashrc toward the
> end
> of the script?  If it is rewriting .bashrc, my question is why, and
> might
> the errors I am seeing be caused here?

GRASS is fooling with the shell it's invoking, but it is not modifying your
~/.bashrc.  Do a "ls -a" in one of your mapsets, and you'll see the file
it has written.  You can add some niceties by putting things in 
~/.grass.bashrc.  I like color listings for instance...


-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list