[Xquartz-dev] env variables and launchd problem

Dave Ray apple at jonive.com
Mon Mar 21 16:45:28 PDT 2011


I want to ask again because nobody replied to my previous post, and maybe I should provide more info.

My environment variables do not seem to be passed to X11 apps when starting up XQuartz with launchd. A different set of env variables are there. I am not sure when this problem started, I only just now discovered it. I launched an xterm from ~/.xinitrc.d/whatever.sh and typed 'env'. I could post the actual values but I don't think it's important.

I can fix the problem by adding the appropriate variables to ~/.MacOSX/environment.plist. But then I have two files to maintain, /etc/bashrc and  ~/.MacOSX/environment.plist. I would prefer not to have to do that, unless that is the expected way.

According to the XQuartz FAQ (http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ) XQuartz should inherit my shell environment, and says I should post to this list of it isn't.

I'm using the latest XQuartz 2.6.1 final on Snow Leopard 10.6.6. I have removed /Applications/Utilities/X11.app (actually, compressed it) and renamed /usr/X11 and /usr/X11R6 to /usr/X11-temp and /usr/X11R6-temp. This is to be absolutely sure there aren't conflicts in the two X11 environments. (Is this bad?)

The problem happens regardless of what I launch from my ~/.xinitrc.d/whatever.sh.

The problem does not occur if I start XQuartz without launchd, for example, by typing 'startx' at the terminal.

I looked over my system and don't think it''s a config issue, but if someone confirms the problem is limited only to my machine, I will look further.

Could someone chime in and let me know if this is normal or not, my env in /etc/bashrc not being passed to the apps launched from ~/.xinitrc.d/whatever *IF and only IF* they are launched by launchd.

Thanks.




More information about the Xquartz-dev mailing list