How to change PATH environment variable to OS X 10.8 Mountain Lion that will be visible to GUI applications? [duplicate]
Solution 1:
With Mountain Lion /etc/launchd.conf
is where you should set the GUI applications Path. Remember it's not a script file; it only supports launchctl
commands so you should write something like:
setenv PATH /new/path:/usr/bin:/bin:/usr/sbin:/sbin
Note also that it doesn't support shell environment variable substitutions (like $PATH
) so you'll have to set every path that you want to include. It's a good idea to keep the original paths that you've mentioned (/usr/bin:/bin:/usr/sbin:/sbin
).
You'll have to reboot after changing (or creating) the file for the changes to take effect.
Solution 2:
It works if you call the GUI app from Terminal:
PATH=/this/is/kind/of/crazy:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin /Applications/Automator.app/Contents/MacOS/Automator
Not really nice or comfortable but it does the job if needed.