Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (OT) path_helper [was Re: Xterm not reading dotfiles]




On 18 Nov 2007, at 08:17:31, Andrew J. Hesford wrote:

On Nov 18, 2007, at 10:03 AM, Merton Campbell Crockett wrote:

On 18 Nov 2007, at 07:29:05, Andrew J. Hesford wrote:

Funny you should mention this. I don't ordinarily use bash, but I do use the LaTeXiT program, which tends to hang in Leopard when it attempts to compile code. After some poking around, I discovered that it was compiling the code by execing a bash login shell to run the commands it needed. This was the culprit.

For some reason, when bash is invoked in this manner, it calls the path_helper script, which locks everything up. If you remove the call to path_helper in /etc/profile, and set your path manually, you might find that bash --login does not freeze.

Interesting. During the past week, I noticed that /bin/sh invoked / bin/bash. This resulted in /etc/bashrc, ~/.bash_profile, and /etc/ profile being read and used but not ~/.profile.


As relatively few people other than myself use the system, I moved my $PATH modifications to /etc/profile. Even here I encountered a problem with my "export PATH" statement: It wouldn't include all of the elements in the path if the $PATH element wasn't the last element in the new PATH.

I did some fooling around with bash again. I wanted /usr/libexec/ path_helper to work, even if I'm using LaTeXiT. It turns out there is an issue with pre-set paths when calling path_helper from bash. If I set a short default path BEFORE bash calls path_helper, everything works. But having bash inherit my path before running the script causes havoc. I'm going to get to the bottom of this and hopefully get a fix to Apple...

My bad! After responding to your post, I looked at the environment for Terminal.app and noticed it had duplicate entries in the PATH environment variable. This led to looking at the path_helper man page and /etc/profile.


It appears that I had modified /etc/profile under Mac OS X 10.4. When upgrading to Mac OS X 10.5, the modified /etc/profile was preserved and the new Mac OS X 10.5 version was installed as /etc/ profile.system_default.

As a result, I never saw the "freeze" that you and several others have reported. It makes one wonder how many of the X "problems" are related to how, sans adequate documentation, users addressed problems in earlier versions of Mac OS X.

As an aside, were /usr/libexec/path_helper to function as described in the man pages, I would have little need for ~/.bash_profile or ~/.profile other than to add the paths required to use MacPorts.


Merton Campbell Crockett email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)
This email sent to email@hidden


References: 
 >Xterm not reading dotfiles (From: Francisco De La Cruz <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Francisco De La Cruz <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Jeremy Huddleston <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Francisco De La Cruz <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Jeremy Huddleston <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Merton Campbell Crockett <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Jeremy Huddleston <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Francisco De La Cruz <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Jeremy Huddleston <email@hidden>)
 >Re: Xterm not reading dotfiles (From: "Nathaniel Gray" <email@hidden>)
 >Re: Xterm not reading dotfiles (From: "Mark J. Reed" <email@hidden>)
 >Re: Xterm not reading dotfiles (From: "Andrew J. Hesford" <email@hidden>)
 >Re: Xterm not reading dotfiles (From: Merton Campbell Crockett <email@hidden>)
 >(OT) path_helper [was Re: Xterm not reading dotfiles] (From: "Andrew J. Hesford" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.