If we’re creating a snap for a specific platform, such as Gnome, we can guarantee that we need either X11 or unity7 as plugs on our app. For library paths we use a
desktop-launch script from the desktop-helpers repo which can be thought of as inheriting the code provided by the chosen helper.
I think it would be interesting to extend the idea to allow for the desktop-helper to define bare-minimum plugs for apps using the helper based on what platform the helper is designed to enable. E.g. for gnome the file chooser dialog likes to see what filesystems are mounted by reading
/proc/<pid>/mounts which requires the
mount-observe plug. So I’m wondering if it would be beneficial to pre-define such plugs in the desktop-helper and then inherit that definition in our app snap?