[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Fri Dec 26 05:24:16 PST 2008
Uh, sorry, there was one more thing ... if a former bash user has
converted to another shell, and still has his bash login stuff lying
around, it will be run in addition to the other shell's login files. I
think that is wrong. Therefore I believe this version is better:
#!/bin/sh
set "$(dirname "$0")"/X11.bin "${@}"
if [ -x ~/.x11run ]; then
exec ~/.x11run "${@}"
fi
case $(basename "${SHELL}") in
bash) exec "${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}" -c 'exec $*' "${@}" ;;
*) exec "${@}" ;;
esac
(I also added the ;; to the final clause, since the bash docs show it
to be required, even though in practice it is not.)
- Harald
More information about the Xquartz-dev
mailing list