This page last changed on May 17, 2009 by scytacki.

Setting environment variables in the .profile file on OSX does not affect applications launched from the GUI. For example running eclipse from the GUI it doesn't pick up variables set in the .profile file.
This page provides info on this:

As documented in the above link creating the file below and putting your path in it will do the trick:


A few pointers:

  • you can use the plist editor to create the file, do:
    touch ~/.MacOSX/environment.plist
    open ~/.MacOSX/environment.plist
  • you need to make a root element and then add a PATH sub element
  • there does not appear a way to inherit any global PATH settings so you need to start with the defaults
  • for me that was:
  • when you launch a shell OSX will add to this with its global "shell" path info which is in the file:
  • then it will add paths from files inside of the folder
  • when it does this adding, it checks if those folders are already on the path and doesn't add them if they are.
  • finally after this it loads your .profile and .bash_rc (I'm not sure the order or methods for those)
  • environment variables are not expanded in the environment.plist so if you try to do
    it won't do you what you want.
Document generated by Confluence on Jan 27, 2014 16:52