[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Sun Dec 21 10:45:53 PST 2008
+ Martin Costabel <costabel at wanadoo.fr>:
> The following is tested on bash, tcsh, ksh, zsh login shells, and
> in a directory with spaces in its name. In all cases it transmits a
> login environment to X11.bin. This is the X11 wrapper script, not
> the ~/.x11run user script, which will be superfluous with this.
>
> #!/bin/bash --login
> export cmd=$(dirname "$0")/X11.bin
> export args="${@}"
> exec -l "$SHELL" -c 'exec "$cmd" "$args"'
That won't work with es and rc, because double quotes aren't special
to those shells. They can put lists of strings, rather than single
strings, in variables, but the way they export such values in the
environment is by separating the words with SOH (^A) characters, and
I guess you don't really want to try to implement that from bash.
If the above method is used (and I am not necessarily opposed to
this), one should check first that $SHELL is indeed one of those
shells you mentioned. Otherwise, it seems better to du the .x11run
thing or, if that fails, fall back on bash.
- Harald
More information about the Xquartz-dev
mailing list