MacOS – system environment variables set in Mountain Lion

environment-variablesmacos

In Lion (and previous releases) it was in .MacOSX/environment.plist. After upgrading to 10.8, the file is still there, but the variables aren’t taking.

I’ve also tried adding them to /etc/launchd.conf and they’ll show up in Terminal, but not GUI applications (like my IDE).

Best Answer

I asked this question on the Apple Developer Forums as well and got back this, official response.

Change the Info.plist of the .app itself to contain an "LSEnvironment" dictionary with the environment variables you want.
~/.MacOSX/environment.plist is no longer supported.