Monday, September 12, 2005

Global environment variables in OSX

Coming from the linux word, I'm used to being able to set global environment variables in my ~/.bash_pofile, and having all apps (including GUI ones) inherit them.

Unfortunately, this wasn't the case under OSX, and it took me a little digging to discover how to accomplish the same: add them to ~/.MacOSX/environment.plist, e.g.

<?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>CVS_RSH</key>
<string>ssh</string>
</dict>
</plist>