← Back to issue list

Incorrect Exec entry transformation in .desktop file

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1883145
Type
issue
State
open
Author
~alan-griffiths
Labels
Created
Updated
Closed

Current evaluation

Snapcraft incorrectly transforms Exec=snap run <snap> in .desktop files to Exec=<snap> run <snap>, producing a broken command. 6+ years old, no labels, no comments, no maintainer interaction.

Suggested action: needs triage

Reason: The issue has no labels, zero comments, and no maintainer response in over 6 years, showing no sign of triage. However, code inspection tools are unavailable (pinned SHA errors), so it cannot be confirmed whether the desktop file Exec transformation in snapcraft/meta/desktop.py still exhibits this bug. A maintainer needs to verify if the 'snap run' → snap-name substitution still occurs in the current codebase before deciding to close or fix.

Impact: 35 Quick Win: 21.0 Staleness: 95 Complexity: 40 Confidence: 40 Support Request: 10

Issue body

Changes made to the Exec entry for a .desktop file can result in an invalid entry: For example, with this input: [Desktop Entry] Name=egmde (confined) Comment=The example Mir server Exec=snap run egmde-confined-desktop Type=Application The result is: $ cat /snap/egmde-confined-desktop/current/meta/gui/egmde-confined-desktop.desktop [Desktop Entry] Name=egmde (confined) Comment=The example Mir server Exec=egmde-confined-desktop run egmde-confined-desktop Type=Application $ cat /var/lib/snapd/desktop/applications/egmde-confined-desktop_egmde-confined-desktop.desktop [Desktop Entry] X-SnapInstanceName=egmde-confined-desktop Name=egmde (confined) Comment=The example Mir server Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/egmde-confined-desktop_egmde-confined-desktop.desktop /snap/bin/egmde-confined-desktop run egmde-confined-desktop Type=Application But trying to run `env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/egmde-confined-desktop_egmde-confined-desktop.desktop /snap/bin/egmde-confined-desktop run egmde-confined-desktop` will fail: $ env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/egmde-confined-desktop_egmde-confined-desktop.desktop /snap/bin/egmde-confined-desktop run egmde-confined-desktop realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory Unknown command line options: run egmde-confined-desktop

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21.0
Staleness: 95
Complexity: 40
Confidence: 40
Support Request: 10
needs triage Snapcraft incorrectly transforms Exec=snap run <snap> in .desktop files to Exec=<snap> run <snap>, producing a broken command. 6+ years old, no labels, no comments, no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Bug report detailing incorrect Exec entry transformation in snapd-generated .desktop files, causing runtime failures. Unlabeled, zero comments, and inactive for over five years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 5
close stale Incorrect Exec entry transformation in .desktop files causes command execution failures. Issue remains untriaged with zero maintainer interaction for over five years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 10
needs triage Unassessed bug report detailing incorrect Exec entry transformation in snapd-generated .desktop files, causing execution failures. No maintainer response or labels in over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 5
close stale Bug in .desktop Exec entry transformation generates invalid commands that fail at runtime. Open with zero comments and no activity since 1912 days ago, requiring triage and assignment.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1814907 (confidence 55%)

    Launchpad bug 'desktop file Exec mangling broken' covers the same desktop-file Exec transformation area but a different failure mode (Exec left unmodified rather than incorrectly rewritten). Closed without resolution.

Related issues

Issue Project State Summary Similarity
#1814907 desktop file Exec mangling broken snapcraft (launchpad) closed Closed without resolution. Snapcraft failed to mangle desktop file Exec lines to the $snap.$app format, leaving them unmodified. No fix or follow-up was provided.
81%
#1655832 App name in snapcraft.yaml must match case of .desktop file snapcraft (launchpad) open Snapcraft breaks the .desktop file Exec line when the app name case in snapcraft.yaml mismatches the .desktop filename. Reported 2016, untriaged, no maintainer response, inactive 9 years.
72%
#1658123 Exec key from desktop files gets trimmed when installed by snapd snapcraft (launchpad) closed Snapd incorrectly trims invalid Exec keys from desktop files during installation. The report was closed without resolution and appears abandoned.
71%