Friday, October 26, 2012

Homebrew and GUI applications



Homebrew is a package manager where there are a lot of ports of popular Linux utilities.
It installs all software into /usr/local/bin directory. And to use them by default this directory should be before the standard /usr/bin in the PATH environment variable.
For the Terminal it's simple. Just add into ~/.bash_profile the following line:
  • PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH
But it doesn't work for GUI applications that use these utilities (e. g. IDE uses Maven and SVN).
To fix this I've changed PATH in the two places.

The first place is /etc/launchd.conf:
  • setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

The second place is /etc/paths:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

Reboot after this changes are made.
With this changes almost all applications work fine. "Almost" is because there's one specific for my project, it doesn't see SVN 1.7. As workaround I run it from the Terminal. 

No comments:

Post a Comment