diff options
-rwxr-xr-x | hw/xquartz/bundle/X11.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/hw/xquartz/bundle/X11.sh b/hw/xquartz/bundle/X11.sh index 4295da9b7..3b8b6799c 100755 --- a/hw/xquartz/bundle/X11.sh +++ b/hw/xquartz/bundle/X11.sh @@ -1,8 +1,15 @@ -#!/bin/bash --login +#!/bin/bash + +set "$(dirname "$0")"/X11.bin "${@}" if [ -x ~/.x11run ]; then - exec ~/.x11run "$(dirname "$0")"/X11.bin "${@}" -else - exec "$(dirname "$0")"/X11.bin "${@}" + 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 |