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?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Dan Rosenstark
  • 6,388
  • 13
  • 59
  • 95

1 Answers1

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.

fideli
  • 14,636
  • 2
  • 35
  • 44
  • 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
  • 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
  • I've corrected my answer. – fideli Jan 19 '10 at 15:20
  • Hi Fideli, those paths are not respected by git-cola.... not sure what's up there, but it doesn't read them. The paths in /etc/launchd.conf did better, but destroyed everything in their, um, way. So not sure what to try now. – Dan Rosenstark Jan 20 '10 at 11:14
  • Yikes, man. I just tried it right now with git-cola (even checked through some of the Python code). Not a clue what to do about that. Perhaps try building git-cola from source? There seems to be a script available to set up the OS X dev environment for git-cola. It relies on MacPorts: http://github.com/davvid/git-cola/blob/7458da3455620527b5c2bf9ea27877d02b993dfc/darwin/macports-setup-dev-env.sh . Hopefully someone can give you some better advice for this! – fideli Jan 21 '10 at 00:18