Skip to content

snap: make invokeApplication handle .desktop files

Currently, invokeApplication simply calls snap run on a given snap. This will work in regular environments, but in a Ubuntu Core environment where Discover would also be packaged as a snap, this command is not allowed.

This change lets Discover attempt to launch the snap using its desktop file's Exec key, which is adapted to the environment in which the snap is installed (snap run in an unrestricted environment, snap routine desktop-launch in a Ubuntu Core environment).

If the desktop file cannot be found, default back to the current snap run implementation.

Merge request reports

Loading