[GRASS-dev] GUI startup doesn't source ~/.grass.bashrc
Glynn Clements
glynn at gclements.plus.com
Mon Feb 12 08:45:03 EST 2007
Hamish wrote:
> Another issue.. gis.m loaded from init.sh ignores ~/.grass.bashrc.
>
> e.g. my ~/.grass.bashrc has:
> export GRASS_HTML_BROWSER=dillo
>
> If I start GRASS in -gui mode the [Help] button from the gis.m menus
> ignores my $GRASS_HTML_BROWSER setting and uses Mozilla.
>
> If I start gis.m from an already running GRASS prompt, [Help] loads
> dillo.
>
>
> Should:
> - the terminal session somehow start gis.m instead of init.sh
Possible; just append "gis.m &" to the temporary .bashrc file which it
creates.
> - gis.m "source" .grass.bashrc (& co.) if it exists
You can't "source" a bash script from Tcl, and "exec"ing it won't
affect gis.m's environment.
> - in init.sh move source .grass.bashrc (& co.) before the gui startup
That will only work for .grass.bashrc, not for .grass.cshrc (init.sh
is a Bourne-shell script, so it can't "source" a csh script).
> - or we drop .rc support for GUI GRASS :-(
I'd suggest having a distinct "config" script for GRASS, which
contains Bourne-shell commands (mainly environment settings) and which
is sourced at the beginning of Init.sh.
~/.grass.bashrc (and cshrc) are meant for the session shell; nothing
in them can affect Init.sh itself.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list