[Xquartz-dev] xmodmap during in .xinitrc does not stick

Jeremy Huddleston Sequoia jeremyhu at apple.com
Fri Jan 24 01:25:50 PST 2014


On Jan 24, 2014, at 00:31, Marcus Crestani <crestani at informatik.uni-tuebingen.de> wrote:

> Jeremy,
> 
> thanks a lot for your quick reply!
> 
>>>>>> "JHS" == Jeremy Huddleston Sequoia <jeremyhu at apple.com> writes:
> JHS> Don't use ~/.xinitrc ... place scripts in ~/.xinitrc.d
> 
> I did and this simplifies things a lot, thanks.  Reworking my
> configuration led to another problem.  The environment when the scripts
> in ~/.xinitrc.d run is not set according to my .cshrc (my login shell is
> /bin/tcsh).  The launched WM has my environment, however.  A `printenv'
> in a script below ~/.xinitrc.d shows an environment without my settings:
> 
>  SHELL=/bin/tcsh
>  TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n0000nqr0005dy/T/
>  Apple_PubSub_Socket_Render=/tmp/launch-JaMsGM/Render
>  USER=crestani
>  SSH_AUTH_SOCK=/tmp/launch-PNlOy8/Listeners
>  PATH=/opt/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin
>  PWD=/
>  HOME=/home/crestani
>  SHLVL=2
>  LOGNAME=crestani
>  __LAUNCHD_FD=36
>  DISPLAY=:43
>  X11_PREFS_DOMAIN=org.macosforge.xquartz.X11
>  XAUTHORITY=/home/crestani/.Xauthority
>  _=/usr/bin/printenv
> 
> Is there a way to have the .xinitrc scripts inherit my tcsh environment
> settings?

They are sourced (not executed) from xinitrc, which is a bash script:

if [ -d "${HOME}/.xinitrc.d" ] ; then
        for f in "${HOME}"/.xinitrc.d/*.sh ; do
                [ -x "$f" ] && . "$f"
        done
        unset f
fi

If you want to inherit your tcsh environment, then unfortunately, I think the only way would be creating ~/.xinitrc as:

#!/bin/tcsh
exec /opt/X11/lib/X11/xinit/xinitrc

or whatever the tcsh syntax is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4136 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/xquartz-dev/attachments/20140124/550e551b/attachment.p7s>


More information about the Xquartz-dev mailing list