OS X 10.10 Yosemite and environment variables

Submitted by Jochus on Tue, 14/04/2015 - 18:59 | Posted in: Mac

In previous releases of OS X (Mavericks, Mountain Lion, Lion, ...), environment variables are configured in the /etc/launchd.conf file.

As of OS X Yosemite, this is no longer working. To configure environment variables, you can do the following

$ nano ~/Library/LaunchAgents/my.startup.plist


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist</a> version="1.0">
    <string>launchctl setenv $VARIABLE_NAME $VARIABLE_VALUE</string>

Add new comment

The content of this field is kept private and will not be shown publicly.


  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.