After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784600 - Snap plugin should be smarter about which app from a package to launch
Snap plugin should be smarter about which app from a package to launch
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: Snap
git master
Other Linux
: Normal normal
: ---
Assigned To: Robert Ancell
Robert Ancell
Depends on:
Blocks:
 
 
Reported: 2017-07-06 04:47 UTC by James Henstridge
Modified: 2017-07-06 05:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-snap-update-logic-to-pick-which-app-from-the-snap-to.patch (5.23 KB, patch)
2017-07-06 04:47 UTC, James Henstridge
committed Details | Review

Description James Henstridge 2017-07-06 04:47:58 UTC
Created attachment 354996 [details] [review]
0001-snap-update-logic-to-pick-which-app-from-the-snap-to.patch

A snap package can expose multiple applications, so the plugin needs to make a decision about which one to call when the user clicks the "Launch" button in gnome-software.

Currently it just picks the first one returned by snapd, but this list is unsorted so results in unpredictable behaviour.  This patch adds some heuristics to the selection process, favouring (in preference order):

 1. apps with associated .desktop files
 2. apps whose name matches the package name
 3. the first app in the list

In addition, if the selected app has a desktop file we use it to launch the app.
Comment 1 Robert Ancell 2017-07-06 05:10:36 UTC
Review of attachment 354996 [details] [review]:

Works well, thanks James!
Comment 2 Robert Ancell 2017-07-06 05:10:54 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.