feat(linux): improve Wayland support and AppImage integration - #1309
Draft
minpeter wants to merge 2 commits into
Draft
feat(linux): improve Wayland support and AppImage integration#1309minpeter wants to merge 2 commits into
minpeter wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Pot's current Linux AppImage works on X11, but a clean install on a modern GNOME Wayland session exposes several related problems:
libwayland-client.so.0; on newer hosts this can conflict with the compositor/WebKitGTK stack and abort startup with an EGL allocation error;selectioncrate falls back by mutating process-wideXDG_SESSION_TYPEandGDK_BACKEND, which can affect the rest of the running UI;This PR makes the AppImage usable as a self-contained Wayland-oriented installation while preserving the existing X11, Windows, and macOS paths.
What changed
AppImage runtime and packaging
libwayland-client.so.0from the completed AppDir and rebuild only through linuxdeploy's AppImage output plugin. Calling the full linuxdeploy pipeline again would rescan the AppDir and copy the incompatible host library back.rust:bullseyetag now selects a compiler that fails in this Tauri 1/Wry dependency graph; the pinned image makes releases reproducible and was used for the full Rust verification below.Native Wayland shortcuts
org.freedesktop.portal.GlobalShortcutsthroughashpdwhen running in a Wayland session.Ctrl+'becomesCTRL+apostrophe).pot --selection-translate. They are forwarded through the existing single-instance plugin, providing a compositor/system-shortcut fallback without depending oncurlor a fixed HTTP port.The portal remains responsible for user consent, so the desktop can display its normal shortcut confirmation dialog.
Selected text handling
DISPLAYis available.selectioncrate implementation for Windows and macOS.This intentionally does not claim universal selected-text access on Wayland. If a compositor does not expose the primary-selection protocol, native Wayland clients cannot provide their selection through this mechanism; the documentation recommends copying the text or using clipboard monitoring in that case.
User-local AppImage integration
packaging/linux/install-appimage.shto install or uninstall the AppImage for the current user.potcommand, desktop entry, icon, and desktop actions for translation/OCR.No onboarding/default translation-provider configuration is changed by this PR.
Verification
libwayland-client.so.0is absent from the final image.pnpm buildcargo +1.82.0 test --manifest-path src-tauri/Cargo.tomlin Debian Bullseye with WebKitGTK 4.0: 3 tests passed.cargo fmt --checkand targeted Prettier check.bash -nfor the modified packaging scripts.Review notes
The two commits are separated by concern: the first contains the AppImage Wayland ABI fix, and the second contains the portal, selection, integration, and build-reproducibility improvements. The PR is opened as a draft so the Linux packaging/portal approach can be discussed before merge.