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
|
2024-07-02 23:55:41 +00:00
|
|
|
case "$(readlink -f /usr/bin/emacs)" in
|
|
|
|
*/emacs-*.*-pgtk)
|
2023-09-24 20:38:47 +00:00
|
|
|
if type emacs-gtk+x11 >/dev/null; then
|
|
|
|
exec emacs-gtk+x11 "$@"
|
|
|
|
elif type emacs-lucid >/dev/null; then
|
|
|
|
exec emacs-lucid "$@"
|
|
|
|
fi
|
2024-07-02 23:55:41 +00:00
|
|
|
;;
|
|
|
|
esac
|
2023-09-24 20:38:47 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exec emacs "$@"
|