This article explains how to set environment variables for Athera sessions to control how applications will behave.
Environment variables inside Athera are set using the Athera Init scripting process.
Athera Init uses an init.sh file within a .athera folder. This file holds shell script commands to set environment variables, execute Python scripts or automate other similar tasks.
For example, to modify which directory is used by Nuke to store temporary files, determined by the value of the NUKE_TEMP_DIR environment variable, add the following command to /home/<username>/.athera/init.sh:
A .athera folder containing an init.sh file can be located on either one or multiple of the nested roots of your current Context. For example, it can be placed inside the org, project or team folders, or in external storage connected to the org, project or team Context. It can also be sourced from a connected Dropbox or Google Drive for each individual user.
Directories checked are:
If any external storage is attached to the Context, for example a GCS or S3 bucket, or the user has connected a personal Dropbox or Google Drive, the following directories are checked as well:
NOTE: It is possible to attach external (GCS or S3) storage buckets to each of the Org, Project and Team levels of the Context. In this case all the external storage locations visible to the current Context will be checked for a .athera folder.
For more details, please see the Athera documentation on Controlling the Session Environment.
These directories are checked in the following order:
- User mounts (Mounts private to the individual user: home folder and Dropbox/Google Drive)
- Context mounts (Group mounts, starting at the child group and stepping up to the parent org (what is called the 'Context Hierarchy' in Athera))
- External mounts (GCS or S3 buckets in the order listed in the Group Detail pages)
To check which environment variables have been set and what their current value is within a session, please execute the following code in a Python console within the application:
for param in os.environ.keys():
print "%20s %s" % (param, os.environ[param])