[Xquartz-dev] How to suppress .xinitrc warning dialog?

Jeremy Huddleston jeremyhu at apple.com
Sun Jun 26 17:31:17 PDT 2011


On Jun 26, 2011, at 17:21, Dave Ray wrote:

> On Sun Jun 26 15:41:09 PDT 2011, Jeremy Huddleston wrote:
>>>> 
>>>>> I am creating a pkg installer which includes a custom ~/.xinitrc file on the target machine.
>>>> 
>>>> Don't do that!  Use ~/.xinitrc.d scripts
>>> 
>>> Ok, fine, I can do that...
>> 
>>> Just so I can improve my understanding, if I take the ~/.xinitrc and just rename it and put it in ~/.xinitrc.d, what's the difference? Why is that better?
>> 
>> Search the archives for plenty of discussion on this.  Having ~/.xinitrc means you override *everything* in the global xinitrc rather than just starting a different WM.
> 
> Okay, I understand why ~/.xinitrc.d is better. 
> 
> I just tried this. It appears that when using ~/.xinitrc.d/, XQuartz starts up whatever window manager is set my USERWM (or quartz-wm if not set) BEFORE running anythig in that directory. 

Uhm.  no... how do you expect it to exec USERWM before it gets the value ;)

> So the idea of having the wm command executed from a file in ~/.xinitrc.d/ does not work; it must be set in USERWM.

Yes, set USERWM in a ~/.xinitrc.d script.

> So if I am trying to set the wm from an installer, the installer has to modify ~/.profile to set USERWM, or something like that.

No, set it in ~/.xinitrc.d/00-yourwm.sh

> I understand the advantage of not nuking the user prefs in ~/.xinitrc.d/, but the method setting of the ENV from an installer becomes a lot less clean than by setting it in .xinitrc. Hmm.

Huh?  I bet you're not doing something correctly.  Here's an example.  There's also one in the FAQ:

mkdir ~/.xinitrc.d
echo "USERWM=/usr/X11/bin/twm" > ~/.xinitrc.d/00-twm.sh
chmod 755  ~/.xinitrc.d/00-twm.sh




More information about the Xquartz-dev mailing list