UPDATE for High Sierra, Sierra, and El Capitan
The changes between Mavericks and Yosemite, noted below, still apply in Sierra and High Sierra. At least, I have not had to change anything since Yosemite for either El Capitan, Sierra or High Sierra.
UPDATE for Yosemite.
Apple and Tim Cook have shown their commitment to the wider developer community, once again, by starting to pull the plug on the launchctl facilities for setting and modifying environment variables. Here’s the rub: with the last lot of changes, Apple got the system working very, very well.
You can get a feel for the impact of the changes by reading the launchctl man page. See, in particular, the section LEGACY SUBCOMMANDS. It’s not entirely accurate, but that’s not unusual. The critical subcommands are getenv, setenv, and unsetenv. The man page indicates that the export subcommand is available; it is not. (See update in the text, below.)
Continue reading “Setting environment variables in OS X Sierra, El Capitan and Yosemite”