21c4c1004d
Attempt to fix #2277689 without reintroducing #684447. We shouldn’t need to use alternatives for the versioned binaries, since there should only ever be one version installed at a time.
19 lines
441 B
Bash
Executable File
19 lines
441 B
Bash
Executable File
#!/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
|
|
case "$(readlink -f /usr/bin/emacs)" in
|
|
*/emacs-*.*-pgtk)
|
|
if type emacs-gtk+x11 >/dev/null; then
|
|
exec emacs-gtk+x11 "$@"
|
|
elif type emacs-lucid >/dev/null; then
|
|
exec emacs-lucid "$@"
|
|
fi
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
exec emacs "$@"
|