Incorrect Exec entry transformation in .desktop file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
Medium
|
Chris Patterson |
Bug Description
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-
Type=Application
The result is:
$ cat /snap/egmde-
[Desktop Entry]
Name=egmde (confined)
Comment=The example Mir server
Exec=egmde-
Type=Application
$ cat /var/lib/
[Desktop Entry]
X-SnapInstanceN
Name=egmde (confined)
Comment=The example Mir server
Exec=env BAMF_DESKTOP_
Type=Application
But trying to run `env BAMF_DESKTOP_
$ env BAMF_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-
- We will deprecate rewriting PART_INSTALL/ snap/desktop/ <snap-name> .<app-name> .desktop
- Warn when rewriting happens
- The deprecation page will show how to have full control over this
SNAPCRAFT_
Even with all this said, snapd has strict rules on what a valid exec line is.