From 963744a7775c8451f5067c105e105b2bf552987a Mon Sep 17 00:00:00 2001 From: Yannic Meyer Date: Tue, 2 Jun 2026 13:17:22 +0200 Subject: [PATCH] AppImage: prefer Wayland backend, fall back to x11 The linuxdeploy GTK plugin hardcodes GDK_BACKEND=x11 as a workaround for older crashes. Darktable supports Wayland natively, so override this setting after the plugin runs. GTK will automatically fall back to x11 if no Wayland compositor is available. --- packaging/AppImage/AppRun | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/AppImage/AppRun b/packaging/AppImage/AppRun index c4cba3f4b92c..714cc243799c 100644 --- a/packaging/AppImage/AppRun +++ b/packaging/AppImage/AppRun @@ -14,6 +14,11 @@ HERE="$(dirname "$(readlink -f "${0}")")" source "$HERE"/apprun-hooks/"linuxdeploy-plugin-gtk.sh" +# The GTK linuxdeploy plugin forces GDK_BACKEND=x11 as a workaround for +# older crashes. Darktable supports Wayland natively, so override this +# and fall back to x11 only if Wayland is unavailable. +export GDK_BACKEND="wayland,x11" + export CAMLIBS=$HERE/usr/lib/libgphoto2/`ls -1 --group-directories-first $HERE/usr/lib/libgphoto2|head -1` export IOLIBS=$HERE/usr/lib/libgphoto2_port/`ls -1 --group-directories-first $HERE/usr/lib/libgphoto2_port|head -1`