OS X Lion v10.7.4, Security Update 2012-002: Global DYLD launch variables no longer loaded

With OS X Lion 10.7.4 (or Security Update 2012-002 for Snow Leopard) installed, DYLD launch variables will not load from the ~/.MacOSX/environment.plist file.

If an application depends on the presence of such a variable, it may not open after you install the OS X Lion v10.7.4 Update or Security Update 2012-002.

This article has been archived and is no longer updated by Apple.

If your application requires the definition of a launch variable like DYLD_LIBRARY_PATH, the most secure solution is to specify it in the application's Info.plist file.

Application developers can find information about using the Info.plist file in the Apple Developer Reference Library. You can specify a launch variable using the LSEnvironment key.

Learn more

Advanced workaround

You can allow the use of global DYLD launch variables by creating a file with this Terminal command:

sudo touch /var/db/.launchd_allow_global_dyld_envvars


To revert to the more secure behavior, use this Terminal command to remove the file:

sudo rm /var/db/.launchd_allow_global_dyld_envvars
Published Date: