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: Merton Campbell Crockett <email@hidden>
- Date: Sun, 18 Nov 2007 14:11:34 -0800
On 18 Nov 2007, at 11:17:37, Ben Byer wrote:
On Nov 18, 2007, at 9:08 AM, Merton Campbell Crockett wrote:
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.
80-90%, if I had to guess? :(
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.
That was the goal in creating that utility; if it does not behave
how you would like it to (or even worse, how it's documented to
work), please file a bug report with Apple so that we can fix it.
Ask and you shall receive. I've opened the following X11.app problem
reports.
5607303 X11.app Fails to Initialize Shell Environment Mac OS X UI/
Usability 18-Nov-2007 12:03 PM Open
5606907 X11.app Launches Two xterm Windows on First Invocation Mac
OS X UI/Usability 17-Nov-2007 12:09 PM Open
The latter is, perhaps, of less importance as it involves an attempt
to use ~/.xinitrc to do the "right" thing when X11.app is started. In
addition, it involves a technique that I had used in Mac OS X 10.4 to
get the "right" behavior.
The former is more significant. Based on Andrew Hesford's post this
morning I discovered that I had modified /etc/profile in Mac OS X 10.4
which was not updated when I upgraded to Mac OS X 10.5. I moved the /
etc/profile.system_default to /etc/profile after saving the Mac OS X
10.4 version.
I rebooted the system. I started Terminal.app and executed printenv.
I then started X11.app and executed printenv. At this point, I would
expect both environments to have only nominal differences based on how
they were started: MANPATH and PATH should have been identical. They
are not.
The problem appears to be that /usr/X11/bin/xterm is overloaded. By
that I mean that xterm is doing more than simply opening a terminal
emulation window in the context of the current environment. It is
trying to re-create the environment but doesn't do it right when you
simply execute "/usr/X11/bin/xterm". As a result, X11.app needs to
execute "/usr/X11/bin/xterm -ls" to get the full shell environment
that is needed.
Executing "/usr/X11/bin/xterm" from Terminal.app appears to indicate
that xterm is threaded and that there is a race condition. I have
$HOME/.profile defined to add the directory paths used by MacPorts.
It augments both MANPATH and PATH. When $HOME/.profile is referenced,
neither MANPATH or PATH is defined. Xterm seems to manipulate PATH
after $HOME/.profile is referenced and wipes out the MacPorts PATH
elements. Xterm ignores MANPATH so you end up with a path to the
MacPorts man pages but nothing else.
Executing "/usr/X11/bin/xterm -ls" from Terminal.app indicates that
the initialization process has been serialized. MANPATH now exists
when $HOME/.portfile is referenced and a complete MANPATH is defined.
The PATH elements defined in $HOME/.portfile are now duplicated in the
PATH variable indicating that $HOME/.portfile was referenced twice.
This raises the question of what /usr/X11/bin/xterm should be doing in
a Mac OS X environment. It seems to me that it should not be
manipulating the environment at all but assuming that the environment
is already configured. Alternatively, it must always perform a login
to establish a complete environment for the user.
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