To set an environment variable for ENVI/IDL on a pre-Lion MacOS System, I would recommend using the environment.plist file. This persists through whatever shells you have installed as well as in X Windows (and therefore when you double-click the ENVI executable from the MacOS GUI). I did not find any correct documentation for doing this from ITT or NASA.

1. Install the software3. Define the environment variable in the file ~/.MacOSX/environment.plist—– Open the Terminal—– You will probably have to create the directory … mkdir ~/.MacOSX)—– … and the file vi ~/.MacOSX/environment.plist

Paste the following into vi in Insert mode (press i) and save (:x) … if you have more than one environment variable, make sure to add another key/string pair … make sure you subsistute PORT and HOST below