Skip to content

Instantly share code, notes, and snippets.

@rdj
Created May 26, 2011 21:07
Show Gist options
  • Select an option

  • Save rdj/994080 to your computer and use it in GitHub Desktop.

Select an option

Save rdj/994080 to your computer and use it in GitHub Desktop.
Note to self re: fixing PATH in emacs on Mac
;; On Mac OS X, GUI programs do not get a sensible PATH variable (i.e.
;; from /usr/libexec/path_helper). You can mitigate this by setting
;; the PATH variable in the binary plist file at this path:
;;
;; ~/.MacOSX/environment.plist
;;
;; Easiest way is using defaults:
;;
;; defaults write $HOME/.MacOSX/environment PATH "$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
;;
;; You will have to log out and back in for this to take effect.
@hober
Copy link
Copy Markdown

hober commented May 26, 2011

See also /etc/paths and /etc/paths.d/

@rdj
Copy link
Copy Markdown
Author

rdj commented May 26, 2011

Sure. Those don't work for programs launched from the GUI, though. I guess /etc/profile doesn't get evaluated until you're actually starting a shell, and that's where /usr/libexec/path_helper builds up the path from /etc/paths and/etc/paths.d/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment