[OSGeoLive] OSGeoLive Environment Variable
sethg at geographika.co.uk
Tue Sep 8 13:18:49 PDT 2020
It would be useful for a Python Notebook (or any demo application) to know if it is running on OSGeoLive in order to set paths to data etc.
Looking at the current system environment variables I don't think there is something that would definitively declare a script is running on OSGeoLive.
Setting an OSGEOLIVE variable to the version could be even more helpful e.g. "export OSGEOLIVE=14" (somewhere in https://github.com/OSGeo/OSGeoLive/tree/master/bin - although I'm not sure where). As noted in IRC from kalxas "we can add this to the bash profile of new users" - so maybe in https://github.com/OSGeo/OSGeoLive/blob/master/bin/setup.sh ?
"export OSGEOLIVE=true" or similar could be used if keeping version numbers updated is a problem.
Then any demos could be multipurposed - running in cloud plus running on osgeolive and setting appropriate paths to data if that is the case.
More information about the osgeolive