[Xquartz-dev] env variables and launchd problem
Jeremy Huddleston
jeremyhu at apple.com
Wed Mar 23 19:46:36 PDT 2011
On Mar 23, 2011, at 6:47 PM, Dave Ray wrote:
> Jeremy Huddleston wrote:
>
>>> I'm observing the same thing on shells that are launched by my window
>> manager (e17). Those shells are dropping me in at the root level, but my
>> ENV looks correct in those shells. $HOME=/Users/davidray. > >
>> Shells/terminals launched by X11.app (from the Applications menu) are
>> correctly dropping me into my home directory.
>>
>> Ok, this is likely because your WM is launched from xinit which is
>> launched by launchd which probably has PWD=/
>
> Yes that might explain it. The wm binary I launch in ~/.xinit.d/99-wm.sh is not the actual window manager, it invokes the wm, possibly through xinit.
>
> I wonder, would this also explain why an xterm launched from ~/.xinitrc.d/99-wm.sh (with no window manager) does not have the expected ENV?
I wouldn't say "does not have the expected ENV" ... as I would expect it to have an environment that is inherited from xinit... which is (probably) different from the environment inherited from X11.app
> The missing ENV in that xterm correlates with the WM issues. When I add ~/.MacOSX/environment.plist, or /etc/launchd.conf, the problem goes away for whatever I am running in ~/.xinitrc.d/99-wm.sh, whether it be that xterm or a WM.
Yes, because on SL, LaunchAgents started inheriting your ~/.MacOSX/environment.plist
> Is there a good way for me to pass my ENV to whatever is launched by ~/.xinitrc.d/99-wm.sh, without passing the ENV to every single launchd process?
Yes.
echo ". ~/.profile" > ~/.xinitrc.d/00-env.sh
echo "cd $HOME" >> ~/.xinitrc.d/00-env.sh
chmod 755 ~/.xinitrc.d/00-env.sh
More information about the Xquartz-dev
mailing list