diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-28 01:53:38 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-28 22:17:26 -0800 |
commit | 338f096861136fb6c4f604e93ff21277252676b7 (patch) | |
tree | b9e9fa2b54528c45ae487a1b122a9c287c26ae0d | |
parent | 61ae56f97326c57dda05632ca9f4873238ee18e1 (diff) |
XQuartz: Try harder to get the user's login environment
(cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa)
-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 @@ | |||
1 | #!/bin/bash --login | 1 | #!/bin/bash |
2 | |||
3 | set "$(dirname "$0")"/X11.bin "${@}" | ||
2 | 4 | ||
3 | if [ -x ~/.x11run ]; then | 5 | if [ -x ~/.x11run ]; then |
4 | exec ~/.x11run "$(dirname "$0")"/X11.bin "${@}" | 6 | exec ~/.x11run "${@}" |
5 | else | ||
6 | exec "$(dirname "$0")"/X11.bin "${@}" | ||
7 | fi | 7 | fi |
8 | 8 | ||
9 | case $(basename "${SHELL}") in | ||
10 | bash) exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;; | ||
11 | ksh|sh|zsh) exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;; | ||
12 | csh|tcsh) exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;; | ||
13 | es|rc) exec -l "${SHELL}" -l -c 'exec $*' "${@}" ;; | ||
14 | *) exec "${@}" ;; | ||
15 | esac | ||