Ensure that desktop file names in meta/gui/ match app names

Bug #1659330 reported by Olivier Tilloy on 2017-01-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Olivier Tilloy

Bug Description

From an IRC conversation between ted, Kaleo and oSoMoN:

<ted> Kaleo: The issue is the desktop file is called "com.ubuntu.terminal.desktop" it needs to match the application name in the snap.yaml.
<Kaleo> oSoMoN, did you know that issue?
<oSoMoN> Kaleo, no I didn’t know that, I guess I didn’t realize because the apps I care for all follow that convention already
<oSoMoN> ted, isn’t unity8 getting info for installed apps from /var/lib/snapd/desktop/applications/ anyway?
<ted> oSoMoN: Nope
<oSoMoN> the desktop files in there are rewritten and renamed by snapd
<ted> oSoMoN: We get it straight from snapd
 oSoMoN: The problem is that when it's copied there it loses its relationship to the interfaces, which is really important to understanding how to run the app.
<oSoMoN> ted, so the recommendation for now is to ensure that desktop file name and app name (as declared in snapcraft.yaml) match, right?
<ted> oSoMoN: Correct
<oSoMoN> ted, and you said unity8 is getting info for installed apps straight from snapd, can you point me to the code involved? we might be able to enhance snapcraft so that it renames the desktop files in meta/gui/ (if that’s what snapd exposes to unity8 of course)
<ted> oSoMoN: http://bazaar.launchpad.net/~indicator-applet-developers/ubuntu-app-launch/trunk.17.04/view/head:/libubuntu-app-launch/application-impl-snap.cpp
<oSoMoN> ted, right, so if snapcraft magically renamed desktop files in meta/gui/ to match app names, that would make life easier for app developers, right?
<ted> oSoMoN: Sure, that'd make sense to me.

It would be easy enough for snapcraft to rename desktop files that it rewrites in meta/gui/ so that they match the app names. Files already in setup/gui/ should probably be ignored (i.e. not renamed but still copied), as they most likely already match the app name, and if they don’t it’s just a packaging change, not an upstream one.

Olivier Tilloy (osomon) on 2017-01-25
Changed in snapcraft:
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon) on 2017-01-25
Changed in snapcraft:
status: New → In Progress
Sergio Schvezov (sergiusens) wrote :

I would advocate for not losing the relationship all-together and have snapd add some header into the desktop file so you can link back to it.

Olivier Tilloy (osomon) wrote :

That would be ideal, indeed. Can that be tracked in a separate bug report? The two approaches are not mutually exclusive (and implementing the easy one (this one) first won’t hurt the other one, either). Should I file a bug at https://bugs.launchpad.net/snappy/+filebug to request the change in snapd?

Sergio Schvezov (sergiusens) wrote :

I would just add a bug task here

Changed in snapcraft:
status: In Progress → Fix Committed
importance: Undecided → Wishlist
milestone: none → 2.26
Changed in snapcraft:
status: Fix Committed → Fix Released
Michael Vogt (mvo) on 2018-01-03
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers