In Yosemite, Apple removed support for environment variables in launchd.conf, so you need to find another way to set global, system-wide environment variables. For example, if you want solidangle_LICENSE to be automatically set, you could use a launchd plist.
Here’s an example plist that uses launchctl to set the solidangle_LICENSE environment variable.
<?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>
<key>Label</key>
<string>com.solidangle.setenv</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
<string>solidangle_LICENSE</string>
<string>5053@replace-me</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
You’ll need to edit this plist and save it in /Library/LaunchDaemons. The file permissions and ownership should look like this:
-rw-r--r--@ 1 root wheel 661 Oct 22 13:52 com.solidangle.setenv.plist
Use sudo chmod to set the permissions, and sudo chown root:wheel to set the ownerships.
Then load the plist:
sudo launchctl load -w /Library/LaunchDaemons/com.solidangle.setenv.plist
And then restart your machine.
References:
or on a per user basis you create a .profile file in the root of the user-dir and put something like
export solidangle_LICENSE=”5053@replace-me”
a logout and login should make sure it’s updated