[GRASS-dev] GRASS extensions/addons mismatch

Hamish hamish_b at yahoo.com
Thu Dec 15 00:44:31 EST 2011

Hamish wrote:
> > it doesn't work to put GRASS_ADDON_PATH into .grass.bashrc,
> > you need to export it from your ~/.bashrc or ~/.profile.
> > (and it is too invasive to start appending to those automatically)

> hm, and what's the purpose or `.grass.bashrc` I thought it should be a
> place for GRASS-related (bash) env variables

it is, but those are run for the *grass console shell* which is launched
at the end of the init.sh process. the $PATH and things like GRASS_PYTHON
need to be set up before that console opens. there are a few others like
GRASS_BATCH_JOB which have the same restriction. see `man grass64` and
`grass64 --help` for details.

stuff gets processed then written out to to $MAPSET/.bashrc

fwiw in .grass.bashrc I have set things like PS1, HISTSIZE=3000, GRASS_WIDTH, GRASS_HEIGHT, GRASS_TRUECOLOR, GRASS_HTML_BROWSER=dillo,

# first GRASS instance gets set a low priority
NUMGRASSES=`pgrep -c Init.sh`
if [ "$NUMGRASSES" -le 1 ] ; then
   renice +14 -p $$
   NICENESS=`echo $NUMGRASSES | awk '{printf("%0.f", 20 / $1)}'`
   renice +$NICENESS -p $$

(ie so newer grass sessions get priority over older running ones, and
big processing jobs leave the computer still responsive)

some of the other enviro vars are just for historical reasons on my
machine at this point but do no harm..


More information about the grass-dev mailing list