Skip to content

feat(linux): run as a Flatpak - #29

Merged
TheBiemGamer merged 5 commits into
mainfrom
feat/flatpak
Nov 16, 2026
Merged

TheBiemGamer merged 5 commits into
mainfrom
feat/flatpak

Conversation

@TheBiemGamer

@TheBiemGamer TheBiemGamer commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

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)

  • No update checks: check_update answers "none", and Settings hides the check button and the "up to date" line.
  • The autostart switch is hidden: the plugin would write to the sandbox's config folder, which the host never reads. The Background portal would need zbus as a direct dependency, so I left it out.
  • Steam "running": the sandbox can't see host processes, so Guild trusts RunningAppID in registry.vdf without the pid check. After a Steam crash a stale id counts as running until Steam starts again (marked shortcut:).
  • The log names the host's distro (/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's xdg-open comes from flatpak-xdg-utils, so steam:// links and folders go through the OpenURI portal.

Permission Why
--share=network, --share=ipc stores, downloads; X11 shared memory
--socket=x11, --socket=wayland the window on Wayland; Proton games need X11
--socket=pulseaudio game audio
--device=all GPU and controllers
--allow=multiarch + Compat.i386 + GL32 32-bit Wine/Proton
--allow=devel syscalls Wine and pressure-vessel use that the default seccomp filter blocks
--allow=per-app-dev-shm pressure-vessel shares /dev/shm with its container
--talk-name=org.freedesktop.secrets the keyring
--talk-name=org.kde.StatusNotifierWatcher tray icon
--talk-name=org.freedesktop.Notifications download-finished notifications
~/.steam:ro, xdg-data/Steam:ro, ~/.var/app/com.valvesoftware.Steam:ro Steam's library, registry.vdf and art; Guild never writes there
~/Games:create the default install folder
/mnt, /media, /run/media install folders and Steam libraries on other drives

Tested on dev (headless)

  • flatpak-builder --user --install, then flatpak build-bundle. Under xvfb-run the window shows after about 430 ms, and launcher.log has no errors (only "not installed" warnings for Steam and the store tools, since dev has neither).
  • Legendary 0.21.1, gogdl 1.4.0, Nile 1.2.0 and umu-run 1.4.4 run inside the sandbox.
  • Lint: manifest gives one warning, finish-args-contains-both-x11-and-wayland, which is needed (see above). appstream passes. repo reports appstream-external-screenshot-url / appstream-screenshots-not-mirrored-in-ostree, which only Flathub's own build fixes by mirroring screenshots.
  • All checks pass: 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

  • Blank tray icon: tray-icon writes its PNG to $XDG_RUNTIME_DIR/tray-icon and 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.
  • Windows games didn't start (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.
  • DEVELOPMENT.md: a bundle install doesn't fetch Compat.i386/GL32 (a bundle has no remote), so they're installed by hand.

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).

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.
@TheBiemGamer
TheBiemGamer merged commit 628930e into main Nov 16, 2026
3 checks passed
@TheBiemGamer
TheBiemGamer deleted the feat/flatpak branch November 16, 2026 12:57
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.

1 participant