[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Tue Dec 23 04:26:38 PST 2008
+ Harald Hanche-Olsen <hanche at math.ntnu.no>:
> + Martin Costabel <costabel at wanadoo.fr>:
>
>> Harald's "untested" script does not work as X11 wrapper script: It
>> does not execute X11.bin.
>
> Odd. With what login shell is that? With all of them? I am sure
> there must be a simple explanation, but I cannot see it by
> inspection.
That must be because I'm an idiot. I forgot the dirname ... bit!
Here is a corrected script (STILL untested):
#!/bin/bash --login
set "$(dirname "$0")"/X11.bin "$@"
if [ -x ~/.x11-run ]; then exec ~/.x11-run "$@"; fi
case "$SHELL" in
*/ksh | */sh | */zsh)
exec -l "$SHELL" -c 'exec "$@"' - "$@" ;;
*/csh | */tcsh)
exec -l "$SHELL" -c 'exec $argv:q' "$@" ;;
*/es | */rc)
exec "$SHELL" -l -c 'exec $*' "$@" ;;
*)
exec "$@" ;;
esac
The obvious advantage of this being, in case it needs spelling out,
that we are not trying so hard to quote stuff for the benefit of
oddball shells, but pass in the raw arguments for each shell itself
to handle properly according to its own ways.
- Harald
More information about the Xquartz-dev
mailing list