2023-09-24 20:38:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# The pure GTK build of emacs is not supported on X11, so try to avoid
|
|
|
|
# using if there is an alternative.
|
|
|
|
|
|
|
|
if [ "$XDG_SESSION_TYPE" = 'x11' ]; then
|
|
|
|
emacs="$(readlink -f /usr/bin/emacs)"
|
|
|
|
emacs="${emacs##*/}"
|
2024-04-09 13:28:54 +00:00
|
|
|
emacs="${emacs%-*.*}"
|
2023-09-24 20:38:47 +00:00
|
|
|
if [ "$emacs" = 'emacs' ]; then
|
|
|
|
if type emacs-gtk+x11 >/dev/null; then
|
|
|
|
exec emacs-gtk+x11 "$@"
|
|
|
|
elif type emacs-lucid >/dev/null; then
|
|
|
|
exec emacs-lucid "$@"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec emacs "$@"
|