I’m trying to follow the documentation on adding .desktop files here: https://snapcraft.io/docs/desktop-menu-icon-support#heading–snap-gui. I put my .desktop file and icon in my snap/gui folder, and can see them being copied to /meta/gui in the resulting snap package. I’m unclear from reading the documentation if this alone should work but when I launch my app it still uses the system default icon and I cannot launch my application from the menu (Ubuntu 18.04/Gnome). I then try setting the
apps.<app-name>.desktop variable to
meta/gui/<app-name>.desktop. The documentation says:
A path relative to the prime directory pointing to a desktop file, commonly used to add an application to the launch menu. Snapcraft will take care of the rest.
However, when I do this I get this error:
Failed to generate desktop file: Invalid desktop file 'meta/gui/snapcraft-tkinter.desktop': does not exist (defined in the app 'snapcraft-tkinter').
Code example here: https://github.com/argosopentech/snapcraft-desktop-icon
Looking around online I haven’t been able to find any solutions, any help appreciated!