I'm probably missing something obvious here, but it seems odd to me to make 
OSGeoLive a special case at runtime.  Wouldn't it make more sense to have the 
OSGeoLive install_*.sh file configure the application for the paths on 
OSGeoLive (which may include setting an environment variable to point to a 
default data directory for an application)?

On 9/8/20 3:18 PM, Seth G wrote:
Hi list,

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.

Seth

--
web:http://geographika.co.uk
twitter: @geographika
_______________________________________________
osgeolive mailing list
osgeolive@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/osgeolive

_______________________________________________
osgeolive mailing list
osgeolive@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/osgeolive

Reply via email to