Allow setting environment variables in grass startup script
|Reported by:||mankoff||Owned by:||martinl|
|Keywords:||init grass.py env D_LIBRARY_PATH bashrc||Cc:||grass-dev@…|
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
~/.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
DYLD_LIBRARY_PATH's are also not respected (perhaps due to SIP?).
Change History (29)
comment:12 by , 6 years ago
|Component:||Default → Startup|
|Type:||enhancement → defect|