4

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?

4
  • Where is git installed? Commented Jan 19, 2010 at 0:39
  • Chealion, git is installed in its default location on OSX /usr/local/git/bin Commented Jan 19, 2010 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. Commented Jan 19, 2010 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? Commented Jan 19, 2010 at 11:10

1 Answer 1

9

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.

7
  • excellent. I've marked it as "should be on superuser" :)... I'll check it out. +1 for now. Commented Jan 18, 2010 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! Commented Jan 19, 2010 at 12:06
  • 1
    Ack! Okay, try this. Add your path to /etc/paths Commented Jan 19, 2010 at 15:10
  • NM. Instead, add a file in /etc/paths.d that has your path in it. Commented Jan 19, 2010 at 15:12
  • I've corrected my answer. Commented Jan 19, 2010 at 15:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.