Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not asking how to change the path for mac OS X terminal windows.

I am having this problem, and I’d like to be able to launch by clicking. It does work if I open it in a terminal window (since the path is set correctly).

I have tried adding a path variable to ~/.MacOSX/environment.plist but to no avail.

How can I change the path for the current user in Mac OS X?

share|improve this question
    
Where is git installed? – Chealion Jan 19 '10 at 0:39
    
Chealion, git is installed in its default location on OSX /usr/local/git/bin – Dan Rosenstark Jan 19 '10 at 2:27
    
Um. Generally /usr/local is for stuff that isn't default. That is you put "local" installations there... A lot of tarbals configure to go there by default but that is not an OS decision. – dmckee Jan 19 '10 at 3:28
    
Sorry, I meant that the installer for my Git install (which is the most common one) installed there by default. It's true that my OS had git in another location originally, I think, right? – Dan Rosenstark Jan 19 '10 at 11:10
up vote 8 down vote accepted

Add a file with your desired path in it (e.g. /opt/local/bin) to the directory /etc/paths.d. This method is how TeXLive does it. You can also add your manpath to /etc/manpaths.d this way.

share|improve this answer
    
excellent. I've marked it as "should be on superuser" :)... I'll check it out. +1 for now. – Dan Rosenstark Jan 18 '10 at 22:37
1  
This worked. I ended up using setenv PATH $PATH:/usr/local/git/bin/ in my /etc/launchd.conf. I did reboot, though perhaps it wasn't necessary. Thanks! – Dan Rosenstark Jan 19 '10 at 12:06
    
Except that it totally broke my path for other apps.... shit. Not sure what to do. – Dan Rosenstark Jan 19 '10 at 14:49
1  
Ack! Okay, try this. Add your path to /etc/paths – fideli Jan 19 '10 at 15:10
    
NM. Instead, add a file in /etc/paths.d that has your path in it. – fideli Jan 19 '10 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .