xserver-multidpi/hw/xquartz/bundle/X11.sh
Jeremy Huddleston 997e8c321b XQuartz: Try harder to get the user's login environment
(cherry picked from commit 6bedaddd78)
2008-12-28 22:17:31 -08:00

16 lines
434 B
Bash
Executable File

#!/bin/bash
set "$(dirname "$0")"/X11.bin "${@}"
if [ -x ~/.x11run ]; then
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