[GRASS-dev] Bash aliases in GRASS

Glynn Clements glynn at gclements.plus.com
Thu Feb 7 16:49:10 PST 2013


Vaclav Petras wrote:

> what is the reason for not-loading bash aliases and the user bashrc
> file when starting new bash? It is meant to prevent conflicts?

AFAICT, the reason for messing about with the shell startup was to
force the use of per-mapset history files.

The code which creates the GRASS-specific .bashrc file tries to load
the aliases, but it does so before HOME has been restored, so it
doesn't work.

If you normally use GRASS from the command line, you're probably
better off just forgetting about the whole "startup" thing and putting
the necessary environment settings into your ~/.bashrc.

FWIW, I source a file containing the following from ~/.bash_profile
(which in turn is sourced from ~/.xsession):

#export GISBASE=/opt/grass-7.0.svn
export GISBASE=/usr/local/src/grass/svn/dist.x86_64-unknown-linux-gnu
export GRASS_GNUPLOT='gnuplot -persist'
export GRASS_WIDTH=640
export GRASS_HEIGHT=480
export GRASS_HTML_BROWSER=firefox
export GRASS_PAGER=cat
export GRASS_WISH=wish
export GRASS_PYTHON=python
export GRASS_MESSAGE_FORMAT=plain
export GRASS_VERBOSE=0
export GRASS_TRUECOLOR=TRUE
export GRASS_RENDER_IMMEDIATE=cairo
export GRASS_TRANSPARENT=TRUE
export GRASS_PNG_AUTO_WRITE=TRUE

export PATH="$GISBASE/bin:$GISBASE/scripts:$PATH"
export LD_LIBRARY_PATH="$GISBASE/lib"
export GRASS_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
export PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH"
export MANPATH=$MANPATH:$GISBASE/docs/man

export GIS_LOCK=$$
export GRASS_VERSION="7.0.svn"

tmp=/tmp/grass6-"`whoami`"-$GIS_LOCK
export GISRC="$tmp/gisrc"
mkdir "$tmp"
cp ~/.grassrc6 "$GISRC"

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


More information about the grass-dev mailing list