Environment Variables

Administer Environment Variables for this Iguana Server.

Iguana administers both the standard System Environment Variables, and its own internal/local system variables. You can change values for both types of environment variable. Changes to System Environment variables are local to this Iguana Instance. There are two types of internal/local system variables, builtin (baked into Iguana) and local (that you create). Local variables can be permanently deleted (press delete and it is gone forever), system and builtin variables can only be hidden (press delete and you can recover them later).

Note:

  • Environment Variable settings are stored in IguanaEnv.txt in the Iguana working directory (includes local changes to the System Environment Variables)
  • Iguana uses builtin environment variables for some of its settings, see Environment Variables Defined By Iguana.
  • To pick up OS changes in System Environment Variables you need to cycle Iguana (i.e., restart the service/daemon)
  • You can use os.getenv in your Lua translator scripts to get the values of environmental variables, this can be a helpful way of changing the behavior of scripts based on the server they are running on.
  • If you are using a 32 bit version of Windows and LocalSystem for the Iguana Service you may need to restart Windows to pick up changes in System Environment Variables. To remedy this change the service user from LocalSystem to a different user with Local Administrator rights.

Administer Local Environment Variables [top]

From this screen you can create modify and delete Local Iguana Environment Variables.

  • Click Add Variable to create a local Environment Variable
  • Click on a variable to Modify it
  • Click on the Red X to delete a local Environment Variable

Create a Local Environment Variable:

Click Add Variable.

  • Enter the NAME and VALUE
    Note: ${variable name} can be used to include another variable within the name
  • Click Save to create the variable

Check split to display the variable on multiple lines while you are editing:

Modify an Environment Variable:

Click on a variable to edit it.

  • Change the VALUE and click Save

Delete a local Environment Variable:

Click the Red X to permanently delete a variable.
Note: If you wish to get the variable back you will have to re-create it.

Customize System Environment Variables [top]

From this screen you can customize and hide System Environment Variables.
Note: You cannot create or delete System Environment Variables within Iguana.

  • Click on a variable to Modify it
  • Click on the Orange Circle to mark a variable as deleted and hide it within Iguana
  • Click on the blue Circular Arrow to un-hide an Environment Variable

Modify a System Environment Variable:

Click on a variable to edit it.

  • Modify the value of the variable
  • Click Save

The modified System Environment Variable is now italicized, hovering over the name shows the original value, and the blue circular arrow button is now active to allow reversion to the original system value.

Also notice how the PATH_extended local system variable has changed to match the updated PATH:

Tip: We can use the system# syntax (“${system#PATH}”) to display the original value of a System Environment Variable:

Mark an Environment Variable as deleted:

To mark as deleted (hide it within Iguana) click the Orange Circle.

The marked variable is shown in strike through text and any local changes are lost.

To show a marked variable click the blue circular arrow and it will revert to the original (system) value.

You can Show or Hide deleted variables using the dropdown in the Control Panel on the right.

Environment Variables Defined By Iguana [top]

Iguana defines the following builtin environment variables:

  • iguana_dir, which specifies the directory in which Iguana is installed
  • chameleon_dir (defined for Windows only), which specifies the directory in which Chameleon is installed, if it is installed on this computer

In addition, Iguana defines the CHM_PYTHON_LIB_PATH environment variable if it is not already defined. This variable specifies the location of the Python libraries that ship with Iguana and/or Chameleon. When Iguana is defining CHM_PYTHON_LIB_PATH, the value of this variable is set using the following criteria:

  • On Unix, Linux and Mac OS X, CHM_PYTHON_LIB_PATH is set to the python_lib subdirectory of the directory specified by the iguana_dir environment variable
  • On Windows, Iguana checks to see whether Chameleon is installed. If Chameleon is installed, CHM_PYTHON_LIB_PATH is defined to include two directories: the lib subdirectory of the directory specified by the iguana_dir environment variable, and the lib subdirectory of the directory specified by the chameleon_dir environment variable
  • On Windows, if Chameleon is not installed, CHM_PYTHON_LIB_PATH is set to the lib subdirectory of the directory specified by the iguana_dir variable. A log message (of Informational type) notifies you that your Iguana server could not find an installation of Chameleon.

If you have stored custom Python modules in a directory other than those specified in CHM_PYTHON_LIB_PATH, you can edit this environment variable to include the directory in which you have stored the Python modules.

Example of an IguanaEnv.txt file [top]

This example explains the contents of this IguanaEnv.txt file.

  • The PATH System Environment Variable has been modified. The file path “:/WE_ACTUALLY_DON’T_NEED_THIS_FOLDER” has been appended
  • The PATH_extended Local Environment Variable was created and uses the ${variable} syntax to include the value of the PATH variable
  • The PATH_original Local Environment Variable was created and uses the ${system#variable} syntax to include the original (system) value of the PATH variable
  • The CHM_PYTHON_LIB_PATH Iguana builtin Environment Variable has been marked as deleted (and hidden in Iguana)
  • The SHELL Iguana System Environment Variable has been marked as deleted (and hidden in Iguana)

Shortcut Keys [top]

These shortcut keys are available in the Environment Variables screen:

Shortcut Key Action Performed
Ctrl+UpArrow Scroll up
Ctrl+DownArrow Scroll down
Ctrl+Shift+A Create a new environment variable
Ctrl+Shift+S Save environment variable
Ctrl+Shift+D Delete environment variable
Ctrl+Shift+R Revert environment variable to original value
Ctrl+Shift+C Cancel change to environment variable
Ctrl+Shift+N Set cursor to Name field
Ctrl+Shift+V Set cursor to Value field
Ctrl+Shift+Space Edit the environment variable that the cursor is hovering over

Leave A Comment?