[GRASS-dev] [$HOME on csh] GEM Wizard question
glynn at gclements.plus.com
Wed May 23 23:17:32 EDT 2007
> William Kyngesburye wrote:
> > Is that from within GRASS, or other shell use? Which platform? If
> > GRASS needs HOME as Hamish says, then it won't run without it (or not
> > run right), so G_home() will always work. Unless maybe the GRASS
> > libraries are used outside of GRASS, like in Qgis or GDAL.
> maybe it has something to do with resetting $HOME so .bash_history is
> placed in the $MAPSET dir?
> e.g. I see that csh in lib/init/init.sh does:
> USERHOME="$HOME" # save original home
> export HOME
> the bash version has "# restore user home path", but I don't see that
> in the csh section. (perhaps I'm looking past it)
> Anyone on Mac who created their user acc't prior to OSX 10.2 will have
> csh as their default shell (even if you've upgraded the rest of the
> So maybe the broken $HOME happens when the shell is csh?
If you look 2 lines further down, the code to restore the setting for
echo "set home = $USERHOME" > "$cshrc"
I would have thought that it should be "set HOME = ..."; environment
variables are case-sensitive on Unix.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev