Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At some point, my PATH settings on OSX have broken, meaning that launching GUI apps that use console apps "under the hood" are breaking (examples so far are MonoDevelop and Crossover Games).

If I launch either of these two (so far) apps from terminal, like

open /Applications/MonoDevelop.app

they work fine, but launching from the apps folder or dock, they can't find things such as sh, grep, dirname, uname etc.

For reference, my PATH (from checking env in Terminal) is set to

PATH=/sw/bin:/sw/sbin:/Users/robcowell/ImageMagick-6.4.1/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/Tools/Panda3D:/usr/X11R6/bin

and all this is on Snow Leopard 10.6.2

Anyone spot the problem and/or know a fix?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Note that when you look at your PATH in Terminal, that PATH is created by the combined actions of any startup files for your shell. If you're using bash, this could include /etc/profile, /etc/bashrc, ~/.bash_profile, ~/.bashrc, ~/.profile. Applications launched using "open" are run as subprocesses from the Terminal shell, thus those applications will have the same PATH.

Applications launched from the Finder or Dock do not necessarily follow the same rules.

This question at Stack Overflow points to documentation for changing the path for applications by editing ~/.MacOSX/environment.plist.

As for how your PATH got messed up in the first place, my first stop would be to look at that file. Perhaps one of your apps helpfully edited that for you.

share|improve this answer
    
You're absolutely right, Panda3D helpfully overwrote the path rather than appended to it. Will get it fixed now I know where to look, thanks! –  Rob Cowell Feb 5 '10 at 9:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.