Skip to content

fix(bundler): respect configured GDK backend (fix: #15781) - #15786

Merged
FabianLars merged 1 commit into
tauri-apps:devfrom
yingyanzhitong:agent/appimage-respect-gdk-backend
Jul 27, 2026
Merged

FabianLars merged 1 commit into
tauri-apps:devfrom
yingyanzhitong:agent/appimage-respect-gdk-backend

Conversation

@yingyanzhitong

Copy link
Copy Markdown
Contributor

Summary

  • preserve an explicitly configured GDK_BACKEND in the AppImage GTK hook
  • retain x11 as the safe default when the variable is unset
  • add a patch release note for tauri-bundler

Fixes #15781.

OpenJobs task: https://openjobs.bot/jobs/6cbdfdad-d49f-4eed-a0b9-04df4a7e2b12

Testing

  • bash -n crates/tauri-bundler/src/bundle/linux/appimage/linuxdeploy-plugin-gtk.sh
  • explicit GDK_BACKEND=wayland preservation check
  • unset GDK_BACKEND fallback-to-x11 check
  • cargo fmt --check
  • cargo test -p tauri-bundler

@FabianLars FabianLars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yolo (as i said in the issue, this isn't really a good idea but i don't care)

@FabianLars
FabianLars merged commit 7164de3 into tauri-apps:dev Jul 27, 2026
2 checks passed
stoneharborent pushed a commit to stoneharborent/aquarius-os that referenced this pull request Aug 29, 2026
Both baked-in apps shipped in the image from f091497, both appeared in the
app grid, and clicking either one did nothing at all — no window, no error.

ROOT CAUSE (Aquarius Writer, proven against the real v0.1.0 artifact):
inside the AppImage, AppRun.wrapped — the file AppRun hands over to — is
mode 0770. Owner and group may run it; nobody else may. Every step of the
build runs as root, and root ignores permissions, so `[ -x AppRun ]` passed
and the build was green. Then a real account clicked the icon and got
"Permission denied", written to a terminal that was not there.

The general lesson is bigger than the bug: an AppImage carries whatever
permissions its build machine produced, and that never shows while the
person running it is the person who downloaded it. Unpacking one into /usr
turns those into system permissions. Normalising them is part of installing.

WHAT CHANGED

build_files/creator-apps.sh
  * Normalise the whole unpacked tree: dirs 0755, programs 0755, data 0644.
    This also closes 53 world-writable files and one world-writable folder
    that the Writer's AppImage shipped into /usr.
  * Drop symlinks that point at the machine that built the AppImage.
  * Replace the root-only checks with ones written as "could somebody who is
    NOT root run this" — the only form of the question that has an honest
    answer when root is asking it.
  * Fix the icon search, which was picking the wrong picture entirely: the
    `*` in find's -path matches slashes, so "a png at the top of the app"
    actually meant "any png anywhere", and Aquarius Editor was handed a
    vendor logo out of resources/remotion-bundle/vendor-icons/. It now looks
    in named places in order and stops at the first real hit.
  * Make the packaged GTK hook's `export GDK_BACKEND=x11` a default rather
    than an order (upstream's own fix, tauri-apps/tauri#15786), so a
    launcher can influence it. Behaviour is unchanged with nothing set.
  * Detect ujust recipe-name collisions with the base image. An alias
    collision is fatal — it breaks the entire ujust menu, not one recipe.

system_files/usr/libexec/aquarius-app-launch (new)
  The shared launcher both apps now go through. It checks the app is really
  runnable BY THIS ACCOUNT before starting it, keeps everything the app
  prints in ~/.local/state/aquarius/<app>.log with the previous run beside
  it, and puts a real window on screen when the app fails to start or falls
  over — naming the log and the command to watch it happen live. It does not
  `exec`, deliberately: a process that has replaced itself cannot notice
  that its replacement failed.

system_files/usr/bin/aquarius-{editor,writer}
  Now hold only what is true of each app. Writer: on NVIDIA only, set
  WEBKIT_DISABLE_DMABUF_RENDERER=1 — the documented fix for WebKitGTK's
  blank window on NVIDIA (webkit bug 262607, closed WONTFIX, still live on
  2.46), and the narrow one; WEBKIT_DISABLE_COMPOSITING_MODE stays off.
  Editor: if chrome-sandbox is present but not setuid, use
  --disable-setuid-sandbox so the app stays sandboxed the modern way rather
  than aborting with no window. Both take AQUARIUS_DEBUG=1.

.github/workflows/build.yml
  New "Verify creator apps" step, after the rechunk, on the exact bits that
  get pushed: it asks whether an ordinary account could run these apps, and
  whether Electron's setuid helper survived packaging. Verified to catch the
  original 0770 fault, the world-writable files and the dangling symlink.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] AppImage GTK hook overrides an explicitly set GDK_BACKEND, silently disabling Wayland-native functionality

2 participants