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.

I am NOT asking how to change the path for 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 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 –  Yar 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? –  Yar Jan 19 '10 at 11:10
add comment

1 Answer 1

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. –  Yar 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! –  Yar Jan 19 '10 at 12:06
    
Except that it totally broke my path for other apps.... shit. Not sure what to do. –  Yar 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
show 3 more comments

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.