/etc/paths
Richard L. Hamilton
rlhamil at smart.net
Sun Feb 8 02:10:38 PST 2015
On Feb 7, 2015, at 4:01 AM, Luc Bourhis <luc_j_bourhis at mac.com> wrote:
>
>>> (1) We consider /etc/paths to be a "system file". We don't like modifying system files.
>>> (2) Modifying /etc/paths affects all users' settings, which is undesirable.
>>
>> Actually it is desirable, or it has at least been desired by some users, e.g.:
>>
>> https://trac.macports.org/ticket/36323
>
> Note that it was suggested in this discussion you linked to add files in /etc/paths.d but that would not do what many users want because the paths listed in /etc/paths are put first in PATH and then those from /etc/paths.d are appended. Since /etc/paths lists /bin, /user/bin, etc by default, Macports paths would not override system ones. I like it the other way around and I am not the only one I think.
>
> I am happy to see that my initial noise led to informative a discussion after all ;-)
>
> And then there the orthogonal issue of Apps launched from the Finder which get PATH from launchd and for which neither path_helper nor shell startup files help. Once upon a time, I hacked a solution with a daemon watching .bashrc and friends to keep the PATH of the shell and that of launchd in synch but eventually I gave up and just launched the PATH-sensitive Apps with "open" from the Terminal.
~/.launchd.conf (or /etc/launchd.conf systemwide) can provide ways to set the PATH for the per-user launchd instances. See launchctl man page for the latter - basically a setenv key value launchctl command. There also used to be ~/.MacOSX/environment.plist, (see https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html ), but reports suggest that’s no longer used since Lion (or possibly Mountain Lion).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20150208/7c99d729/attachment.html>
More information about the macports-users
mailing list