<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Thanks Johan - this looks like it would do the trick. I'll setup up a pull request. </div><div><br></div><div id="sig62266145"><div>--<br></div><div>web:http://geographika.co.uk<br></div><div>twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Wed, Sep 9, 2020, at 9:28 AM, Johan Van de Wauw wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div dir="auto"><div>If you add a script to /etc/profile.d/ it will be sourced to all interactive users.<br></div><div>I would use the version number, this version number is available while building the image ($VERSION). <br></div><div>adding<br></div><div>echo "export OSGEOLIVE=$VERSION">/etc/profile.d/osgeolive.sh should do the trick.<br></div><div><br></div><div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">On Tue, Sep 8, 2020, 22:26 Seth G <<a href="mailto:sethg@geographika.co.uk" target="_blank">sethg@geographika.co.uk</a>> wrote:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div>Hi list,<br></div><div> <br></div><div> 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. <br></div><div> <br></div><div> Looking at the current system environment variables I don't think there is something that would definitively declare a script is running on OSGeoLive. <br></div><div> <br></div><div> Setting an OSGEOLIVE variable to the version could be even more helpful e.g. "export OSGEOLIVE=14" (somewhere in <a href="https://github.com/OSGeo/OSGeoLive/tree/master/bin" rel="noreferrer noreferrer" target="_blank">https://github.com/OSGeo/OSGeoLive/tree/master/bin</a> - 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 <a href="https://github.com/OSGeo/OSGeoLive/blob/master/bin/setup.sh" rel="noreferrer noreferrer" target="_blank">https://github.com/OSGeo/OSGeoLive/blob/master/bin/setup.sh</a> ?<br></div><div> <br></div><div> "export OSGEOLIVE=true" or similar could be used if keeping version numbers updated is a problem. <br></div><div> <br></div><div> Then any demos could be multipurposed - running in cloud plus running on osgeolive and setting appropriate paths to data if that is the case. <br></div><div> <br></div><div> Seth<br></div><div> <br></div><div> --<br></div><div> web:<a href="http://geographika.co.uk" rel="noreferrer noreferrer" target="_blank">http://geographika.co.uk</a><br></div><div> twitter: @geographika<br></div><div> _______________________________________________<br></div><div> osgeolive mailing list<br></div><div> <a href="mailto:osgeolive@lists.osgeo.org" rel="noreferrer" target="_blank">osgeolive@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/osgeolive" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/osgeolive</a><br></div></blockquote></div></div></div></div></blockquote><div><br></div></body></html>