Repository navigation
feat(linux): run as a Flatpak - #29
Merged
Merged
Conversation
In a Flatpak Guild skips update checks (the store updates it), hides the autostart switch (the sandbox can't reach the host's autostart folder), trusts Steam's RunningAppID without the host process it can't see, and names the host's distro in the log.
pressure-vessel failed with "bwrap: Can't find source path": in a Flatpak umu keeps the Steam Linux Runtime in the host's ~/.local/share/umu, which without xdg-data/umu was a tmpfs the Flatpak portal's sub-sandbox can't use, and downloaded again at every launch. Guild now also looks for the runtime there, so a launch only counts as setting up when it is.
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.
Guild runs as a Flatpak, and
packaging/flatpak/builds a local test bundle. Nothing goes to Flathub.Code (Linux only, behind
platform::flatpak(), read once from/.flatpak-info)check_updateanswers "none", and Settings hides the check button and the "up to date" line.RunningAppIDinregistry.vdfwithout the pid check. After a Steam crash a stale id counts as running until Steam starts again (markedshortcut:)./run/host/os-release) instead of "GNOME 51 (Flatpak runtime)".Windows behavior is unchanged.
Packaging
GNOME 51 runtime (it has webkit2gtk-4.1; based on freedesktop 26.08). Like Heroic, the manifest unpacks the AppImage into
/app. For local builds that is an AppImage built from this checkout. It copies the binary and the AppImage's libayatana/libdbusmenu (for the tray, missing from the runtime). The runtime'sxdg-opencomes from flatpak-xdg-utils, sosteam://links and folders go through the OpenURI portal.--share=network,--share=ipc--socket=x11,--socket=wayland--socket=pulseaudio--device=all--allow=multiarch+ Compat.i386 + GL32--allow=devel--allow=per-app-dev-shm/dev/shmwith its container--talk-name=org.freedesktop.secrets--talk-name=org.kde.StatusNotifierWatcher--talk-name=org.freedesktop.Notifications~/.steam:ro,xdg-data/Steam:ro,~/.var/app/com.valvesoftware.Steam:ro~/Games:create/mnt,/media,/run/mediaTested on dev (headless)
flatpak-builder --user --install, thenflatpak build-bundle. Underxvfb-runthe window shows after about 430 ms, andlauncher.loghas no errors (only "not installed" warnings for Steam and the store tools, since dev has neither).manifestgives one warning,finish-args-contains-both-x11-and-wayland, which is needed (see above).appstreampasses.reporeportsappstream-external-screenshot-url/appstream-screenshots-not-mirrored-in-ostree, which only Flathub's own build fixes by mirroring screenshots.npm run check,npm test,cargo test, clippy, fmt, prettier.Not tested (no display, GPU, Steam or store logins on dev): the keyring (dev has no Secret Service), the tray, notifications, Steam detection, a real game under umu/pressure-vessel in the sandbox (including whether Guild sees that game's process), winetricks (Heroic adds cabextract and 7zip for it), and the folder picker for folders outside the granted paths.
After the owner's first test
$XDG_RUNTIME_DIR/tray-iconand only passes that path to the desktop's tray. In a Flatpak, that folder is private to the sandbox. Guild now writes it to$XDG_RUNTIME_DIR/app/cloud.biem.guild/tray-icon(platform::tray_icon_dir), which is the same folder on the host. Checked on dev: the PNG is there on the host. Not checked on a desktop with a tray.bwrap: Can't find source path /proc/self/fd/N): in a Flatpak, umu keeps the Steam Linux Runtime in the host's~/.local/share/umu. Without--filesystem=xdg-data/umu:create, that path is a sandbox tmpfs that the Flatpak portal's sub-sandbox can't use (and the runtime downloaded again at every Play). Added the permission, as Heroic has, and Guild's setup check now looks there too. Reproduced on dev with umu-run + GE-Proton in the built Flatpak: it fails without the permission and runs with it.Related PRs against main, found while testing this: #30 (a game that exits ends its watch and is logged), #31 (the first Play installs umu-launcher and GE-Proton).