XQuartz: user / environment when executing xinit? (XMonad, xmodmap, etc.)
What user/env is actually calling xinit when you start XQuartz?

Under Linux, this would be the user that you logged in as; I'd suspect that it's probably the same for Mac OS X.  As for the environment, whatever the current environment is when you run xinit, that will be the environment that XQuartz runs with, excepting changes to the environment done within one of the files that XQuartz reads when it starts up.

Where should I put xmodmap so that it's called once, and only once, when XQuartz is started?

To create your own custom map/table and store it in a configuration file, run:

xmodmap -pke &gt; ~/.Xmodmap


Make the desired changes to ~/.Xmodmap and then test the new configuration with:

xmodmap ~/.Xmodmap


To active your custom table when starting Xorg, that is XQuartz, add the following to your ~/.xinitrc

[ -s ~/.Xmodmap ] &amp;&amp; xmodmap ~/.Xmodmap # you can also try using `[[ -s ~/.Xmodmap ]] &amp;&amp; xmodmap ~/.Xmodmap`


How do I get the LANG set once, and only once, as an environment variable when I start XQuartz (I need it for unicode support)

To set LANG, simply add one of the following to your ~/.xinitrc

[[ -z "$LANG" ]] &amp;&amp; LANG=&lt;VALUE&gt; # only sets LANG, if LANG is empty
LANG=&lt;VALUE&gt; # sets LANG regardless of whether it is or is not empty