« | »

Mac OS X Environment Variables

28. August 2009

Most of the time, Mac OS X programs do not use environment variables like the “PATH”. However, sometimes I use tools that require such Variables. Contrary to well known places to put this kind of information in a Unix Environment (like /etc/profile, /etc/bashrc, ~/.profile, or ~/.bashrc files) the recommended way of doing this is the following:

  1. Add the following File to your User Directory, if it does not already exist:
    ~/.MacOSX/environment.plist
  2. Open it with some Text Editor and add the following XML Code
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">
        <dict/>
    </plist>

  3. Open the File in the Finder and add beneath “Root” an Environment Variable with the Mac OSX Plist Editor.
  4. Log off and on again.
  5. Enjoy.
« Plug and Play Business Process Execution | AOP really easy with Spring/AspectJ »

The URL to TrackBack this entry is: http://developing.schimak.at/2009/08/mac-osx-environment-variables/trackback/

Leave a comment