unity7: LauncherEntry API does not work due to snapd not respecting the upstream .desktop naming

Bug #1652441 reported by Pavel Rojtberg on 2016-12-24
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Undecided
Unassigned
snapd
Medium
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

The progress bar is not displayed. Probably get_for_desktop_id() returns the wrong desktop file. I could trace it back until here:
https://bazaar.launchpad.net/~unity-team/libunity/trunk/view/head:/src/unity-launcher.vala#L193

however I have no idea how the "application://" part is resolved.

For the example code triggering this see here: https://git.launchpad.net/teatime/tree/teatime.py#n207

(snap install teatime)

Note that if the deb version is also installed. i.e. the /usr/share/applications/teatime.desktop file is present. The snap picks that one.

description: updated
Sebastien Bacher (seb128) wrote :

the issue there is that the source is using an hardcoded desktop name where snapd generates one with a different name

summary: - unity7: LauncherEntry API does not work
+ unity7: LauncherEntry API does not work due to snapd not respecting the
+ upstream .desktop naming
Pavel Rojtberg (rojtberg) wrote :

for anybody wanting to workaround this the generated desktop file is named:
<snap_name>_<app_name>.desktop and placed in /var/lib/snapd/desktop/.
For teatime this requires to change code to search for "teatime_teatime.desktop".

As a solution I think that snapcraft should check that the meta/gui/*.desktop filename is correct instead of snapd generating it. This way me (as a developer) would have a chance to guess what to look for.

Michael Vogt (mvo) on 2018-01-17
affects: snapd (Ubuntu) → snapd
Changed in snapd:
importance: Undecided → Medium
status: New → Triaged
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Michael Vogt (mvo) wrote :

Adding a snapcraft test for the suggestion about the namingin meta/gui/*.desktop

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers