B. Operating system environment variables


This appendix discusses how to add and modify operating system environment variables for different operating systems.

B.1. Windows NT/2000

On Windows NT/2000 choose the system icon from

\start\Settings\Control Panel\

Next choose the environment tab. This tab allows you to add new environment variables and to modify existing environment variables.

B.2. Windows XP

  1. Right-click on the My computer icon in the start menu.
  2. Choose Properties.
  3. Choose Advanced tab.
  4. Choose Environment variables.
  5. You can now add new variables or modify an existing variable.

B.3. MAC OSX

Usually you can setup operating system variables on MAC OSX as you would do under UNIX as explained in Section B.4.

Sometimes it necessary to create a file named

$HOME/.MacOSX/environment.plist

or if the file exists you should add some lines to the above file. An example enviroment.plist file is shown below

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC 
  "-//Apple Computer//DTD PLIST 1.0//EN" 
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>MOSEKLM_LICENSE_FILE</key>
    <string>/home/user/mosek/4/licenses/mosek.lic</string>
    <key>PYTHONPATH</key>
    <string>/home/user/mosek/4/tools/platform/osx32x86/bin</string>
</dict>
</plist>

Please note that in more recent version os OS X, the library search path DYLD_LIBRARY_PATH cannot be set in environment.plist.

For further explenation see http://developer.apple.com/qa/qa2001/qa1067.html.

B.4. UNIX

How to set and modify operating system environment variables in a UNIX environment is dependent on shell. For csh and tcsh environment variables are defined using the command

setenv MYVAR some_value

whereas in bash and sh shells environment variables are defined using the commands

export MYVAR=some_value

Wed Feb 29 16:22:55 2012