[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Fri Dec 26 05:04:15 PST 2008
+ Jeremy Huddleston <jeremyhu at apple.com>:
> So this thread has pretty much settled down, and I'm still not 100%
> sure where the chips landed.
The chips have landed? Umm, okay, in a manner of speaking I guess
they have.
> Did I miss a criticism of this approach (most replies seemed to be
> questions/comments rather than problems).
Not really, except Cameron Simpson would like to replace the final
fall through clause in the case statement to call his own generic
script instead. Personally, I have no really strong opinions about
that, except I wonder if it adds a lot of flexibility to the
approach. For example, I pretty much doubt that it would work with
scsh. But then, after browsing through scsh.net for a while I get the
distinct impression that there is no such thing as a scsh login
shell, nor do I think there is a default startup file being run by
scsh; in short, I think we should not worry about scsh. If anybody
out there is masochist enough to run scsh as their login shell, we
can also reasonably expect them to find out about and use the .x11run
mechanism.
I have only two small changes to the script as you posted:
Quote "${SHELL}" in the basename call, and we might as well use exec
-l on es and rc to make this case look more like the others, thus
highlighting the essential differences between the shells and
ignoring the trivial ones. This works for me at least:
#!/bin/bash --login
set "$(dirname "$0")"/X11.bin "${@}"
if [ -x ~/.x11run ]; then
exec ~/.x11run "${@}"
fi
case $(basename "${SHELL}") in
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
- Harald
More information about the Xquartz-dev
mailing list