Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
- Subject: Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
- From: "Andrew J. Hesford" <email@hidden>
- Date: Sun, 18 Nov 2007 21:14:53 -0600
On Nov 18, 2007, at 9:08 PM, Merton Campbell Crockett wrote:
It doesn't appear that you can. The first four elements of PATH are
forced to be /usr/bin, /bin, /usr/sbin, and /sbin regardless of the
order in which they appear in /etc/paths.
The problem is that the system default path (wherever that comes
from... maybe launchd) consists of those four elements, so any shell
will already have those before you even call path_helper. Because
path_helper preserves the existing path, and then appends its
additional elements (removing duplicates), you can't beat the first
four.
However, if you edit /etc/profile or /etc/zprofile or wherever the
corresponding location is for C-shells, you can use "unset PATH"
before you call path_helper. This will wipe out the pre-existing
default, and then use path_helper to build you a new path. It starts
with /etc/paths, and continues to /etc/paths.d/*. Thus, if you put /
opt/local/bin at the top of the /etc/paths file, and clobber PATH
before setting, you should achieve what you want. Of course, that
might clobber any settings you have made to the instantaneous
environment... but that's another issue!
--
Andrew J. Hesford <email@hidden>
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden