Skip to content

Setting Mac OS X GUI Environment

cyphactor edited this page Aug 8, 2012 · 1 revision

There is a trick that people usually get caught up on in terms of Sublime Text 2 and some plugins. It is specifically plugins that depend on the environment like Sublime Guard does.

If you launch Sublime Text 2 from a shell it will inherit the environment of that shell. However, if you launch Sublime Text 2 from a launcher (Quicksilver, Launch Bar, Alfred, etc.) or by double clicking its icon, or dragging a file to its icon it will launch with the GUI environment.

This will often trip people up because their GUI environment doesn't know about RVM and other system tools that depend on certain environment variables being loaded.

In Mac OS X they have a specific property list file that is used to specify environment variables for the GUI. More details on this can be found https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html.

This property list file is normally stored in the following path, ~/.MacOSX/environment.plist.

Clone this wiki locally