[GRASS-dev] [GRASS GIS] #3462: Allow setting environment variables in grass startup script
GRASS GIS
trac at osgeo.org
Thu Dec 7 05:45:35 PST 2017
#3462: Allow setting environment variables in grass startup script
---------------------+-------------------------
Reporter: mankoff | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: 7.2.2
Keywords: | CPU: Unspecified
Platform: MacOSX |
---------------------+-------------------------
In the grass72 startup script, in the function `def bash_startup(location,
location_name, grass_env_file):`
These lines exist:
{{{
for line in readfile(env_file).splitlines():
if not line.startswith('export'):
f.write(line + '\n')
}}}
If I comment out the 2nd line (and fix the indentation for the 3rd line
because this is Python), then I can add `export DYLD_LIBRARY_PATH=...` in
either `~/.grass.bashrc` or `~/.grass7/bashrc` and this fixes various
GRASS issues on OS X relating to the temporal framework.
Why does the startup script ignores `export` statements from the GRASS
config file? Is there a problem if I change this behavior?
In more detail, this is not an issue with Fink installations, but is with
MacPorts. Fink installs an OS X Application: GRASS.app. Deep in the app I
found a Makefile that seems to tell GRASS.app to respect
`GRASS_LD_LIBRARY_PATH`. The Macports version does not install an app, and
does not respect the `GRASS_LD_LIBRARY_PATH` variable. For some reason,
shell-level `LD_LIBRARY_PATH` and `DYLD_LIBRARY_PATH`'s are also not
respected (perhaps due to SIP?).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3462>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list