zsh environment not always set properly using XQuartz's X11.app (v2.3.3.2)
zsh environment not always set properly using XQuartz's X11.app (v2.3.3.2)
- Subject: zsh environment not always set properly using XQuartz's X11.app (v2.3.3.2)
- From: Daniel Sproul <email@hidden>
- Date: Mon, 15 Jun 2009 16:15:33 -0400
I have installed XQuartz's X11.app version 2.3.3.2 over the normal
X11.app that comes with MacOSX. I'm running OSX version 10.5.7.
If I launch X11.app by clicking the dock icon, my (zsh) environment will
not be set properly (ie. .zprofile not getting read), whereas if I
launch X11.app from a Terminal.app window (say with "startx &" or "xterm &")
my environment *will* be properly set (ie. .zprofile does get read)
There was some mention of a similar problem on the XQuartz FAQ:
http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ#Howcanmylauncedapplicationsinheritmytcshenvironment
This suggests that the shell script:
/Applications/Utilities/X11.app/Contents/MacOS/X11
is the culprit. however, more recent version of the script appears to
have cases for most of the commonly used shells:
--------------------------------------------------
% cat /Applications/Utilities/X11.app/Contents/MacOS/X11
#!/bin/bash
set "$(dirname "$0")"/X11.bin "${@}"
if [ -x ~/.x11run ]; then
exec ~/.x11run "${@}"
fi
case $(basename "${SHELL}") in
bash) exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;
ksh|sh|zsh) exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;;
csh|tcsh) exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;;
es|rc) exec -l "${SHELL}" -l -c 'exec $*' "${@}" ;;
*) exec "${@}" ;;
esac
--------------------------------------------------
AFAICT, if I click on the dock icon that script isn't being read at all,
whereas it is read if I launch from Terminal.app as described above (did a
bit of hackery with sudo to edit the script to echo a line to suggest
whether or not it is being run, and inspected the Console.app output...
um... any help?
thanks,
- daniel
--
Daniel Sproul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden