2010-04-16

Setting PATH and other variables on OS X

Since OS X is a UNIX like many others, I usually put my environment variable settings like PATH in ~/.profile. However, for Cocoa based apps, that are not run from a terminal, this will not help. Luckily, there is a documented procedure for setting environment variables for Cocoa applications. In short, you just have to edit a plist. If it already exists on your system, just type the following in a terminal:

open ~/.MacOSX/environment.plist

If the file does not yet exist, just run the Property List Editor (e.g. via spotlight), and create that folder and that file.

No comments:

Post a Comment