Snap store request: SamRewritten

  • name: samrewritten
    • description: SamRewritten is a Steam achievement and stats manager. It lets users lock and unlock achievements on their own Steam account, edit per-game stats, and idle apps. It ships three commands: a GTK GUI (samrewritten), a libadwaita GUI (samrewritten-adw), and a CLI (samrewritten-cli). The snap release specifically targets users who run Steam itself as a snap.
    • snapcraft: SamRewritten/snapcraft.yaml at v1.4.1 · PaulCombal/SamRewritten · GitHub
    • upstream: GitHub - PaulCombal/SamRewritten: A modern Steam achievements manager for Windows and Linux · GitHub
    • upstream-relation: I am the upstream author and maintainer of SamRewritten.
    • interfaces:
      • access-steam-folder (personal-files):
        • request-type: installation and auto-connection
        • reasoning: SamRewritten only functions when paired with a Steam installation. For the snap release, that means the Steam snap. The plug grants read-only access to a strictly scoped set of paths under $HOME/snap/steam/common/.local/share/Steam/:
          • linux64/steamclient.so — loaded with dlopen so SamRewritten can call the Steamworks API (this is what physically performs the achievement/stat reads against Steam).
          • appcache/stats — Steam’s local achievement/stat schema cache, used to enumerate which achievements and stats exist per app without round-tripping to the Steam servers.
          • appcache/librarycache — local cache of app icons and header images, used to render the library grid.
          • userdata — used to detect which Steam user is currently logged in and to locate their per-user files. Auto-connection is requested because the app is completely non-functional without these paths: with manual connection the user installs the snap, launches it, sees an empty/erroring window, and has to be told to run snap connect samrewritten:access-steam-folder before anything works. Auto-connect keeps the first-run experience consistent with the Steam snap, which is the only intended pairing.
      • dbus-samrewritten (dbus, session bus, name org.samrewritten.SamRewritten):
        • request-type: installation and auto-connection
        • reasoning: SamRewritten is built on GtkApplication with application ID org.samrewritten.SamRewritten. GTK uses the session bus to enforce single-instance behaviour and to forward command-line arguments (in particular samrewritten --auto-open=<AppId>, which asks an already-running window to navigate to a specific Steam app’s details page) to the existing process instead of starting a second one. Owning this well-known name on the session bus is therefore a hard requirement for the app to launch at all under the standard GTK/GLib application lifecycle. The name is namespaced to the upstream project’s reverse-DNS (org.samrewritten.*) and is not used to expose any IPC API to third parties.

Please note that version 1.4.1 onwards only is targeted, which is not yet merged on master. I have previously applied for validation as a classic Snap (SamRewritten). This submission targets a strict confinement.

This request has been added to the queue for review by the @reviewers team.

Hello @yhu420!

Given the snap’s functionality and the strict scope of your request, this is a +1 (#voteFor) from my side, for granting the personal-files interface to the SamRewritten snap. What do other @reviewers think?

Concerning the dbus interface, I already granted it, as it is correctly namespaced to your project’s reverse-DNS identity, and it does not require voting!

Hey folks!

Whilst I really appreciate the effort to grant access to the minimum set of files needed, granting access to the private home of a different snap clearly looks like an anti-pattern to me. I believe we should not grant auto-connection, and I am really doubtful even about manual connection. -1 from me.

When running from the snap, SamRewritten may use the FileChooser xdg portal in directory mode and instruct the user to select their `Steam` installation folder (i.e. $HOME/snap/steam/common/.local/share/Steam/ in the case of the stream snap). This should work also for non-snap installations of Steam.

Thanks

Hi, fair points. Thank you for suggesting the portals route, I will dig a little bit this way. I will let you know if I encounter other blocking points

1 Like