[Xquartz-dev] Environment passed to Applications-launched processes

Martin Costabel costabel at wanadoo.fr
Sat Aug 30 03:21:37 PDT 2008


Brian Bender wrote:
> Oh, one other thing: it seems to depend on how X11.app is launched. If
> it's launched automatically from an X program starting up, everything
> works right. If it's launched by starting X11.app directly, then I get
> the bare environment.

Starting /A/U/X11.app "directly", i.e. from the Finder gives a very 
minimal environment to processes started from the Applications menu. 
They simply inherit Finder's poor environment.

If you start X automatically via an X client, then /A/U/X11.app is run 
as a child process of /usr/X11/bin/X, which inherits its environment 
from startx, and the startx process runs inside a bash login shell. That 
is, it reads the user's bash login startup scripts (whether the user has 
bash as login shell or not).

Conclusion: Don't start X11.app from the finder. And define a decent 
environment in ~/.bash_profile, even if you have tcsh as your login 
shell. Or don't use X11.app's Application menu (which for me is not 
configurable any more, anyway, but that's a different story).

-- 
Martin



More information about the Xquartz-dev mailing list