← Back to issue list

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

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1659330
Type
issue
State
closed
Author
~osomon
Labels
—
Created
Updated
Closed

Current evaluation

Snapcraft now renames rewritten .desktop files in meta/gui/ to match app names (PR #1074, commit 1b97a09d3); files from setup/gui/ are left untouched. Launchpad bug #1659330 closed as fixed.

Resolution: closed resolved

Reason: The reporter linked snapcore/snapcraft#1074, which landed as commit 1b97a09d3 "meta: rename desktop files to match the app names", implementing exactly the requested behaviour (only snapcraft-rewritten desktop files are renamed, setup/gui/ files are copied as-is).

Evaluated by: mr-cal-bot

No scores available.

Issue body

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.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Snapcraft now renames rewritten .desktop files in meta/gui/ to match app names (PR #1074, commit 1b97a09d3); files from setup/gui/ are left untouched. Launchpad bug #1659330 closed as fixed.
stealth/space-bunny-alpha — closed resolved Snapcraft now renames generated desktop files in meta/gui to match declared app names; merged in canonical/snapcraft#1074 (commit 1b97a09d3).
stealth/space-bunny-alpha — closed resolved Desktop files in meta/gui/ were renamed to match app names, preserving their association with snap interfaces. Merged in canonical/snapcraft#1074 via commit 1b97a09d3.
qwen/qwen3.6-35b-a3b — — The proposal to have snapcraft automatically rename desktop files in meta/gui/ to match app names was closed without implementation. The suggestion was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The proposal to have snapcraft automatically rename desktop files in meta/gui/ to match app names was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The proposal for snapcraft to automatically rename desktop files in meta/gui/ to match app names was abandoned and never merged.
qwen3.6-35b-a3b-mtp-q6 — — Closed without implementation. The proposal for snapcraft to auto-rename desktop files in meta/gui/ to match app names was abandoned.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1074 (confidence 95%)

    Upstream PR linked in the last comment; squashed to commit 1b97a09d3 in snapcraft.

Related issues

Issue Project State Summary Similarity
#1074 Rename desktop files to match the app names. snapcraft merged Merged PR #1074 as commit 1b97a09d3, renaming desktop files to match app names so Unity 8 associates them correctly (LP: #1659330).
75%
#2722 meta: fixes for desktop file handling snapcraft merged Merged in snapcraft PR #2722 via dac7a776c and 81d13ed06, fixing multi-section desktop files and preserving arguments in Exec=.
70%