Desktop file and icon

This seems like a trivial thing, but it’s driving me mad.

I’ve written a small utility which i install with a bash file. The myapp.desktop has

Icon=/usr/local/share/icons/myapp

Note there is no .png extension, which I believe is correct.

With the icon named myapp.png as I’m told it should be, it doesn’t show. I’ve restarted and used update-desktop-database. I’ve also tried

/usr/local/share/icons/hicolor/128x128/apps

If I remove the .png it works. I should be happy with that, but I am trying to conform to the conventions. I can see other apps with the extension too.

If I remove the path, it works. I imagine that with it, the behaviour changes and it looks for the actual filename myapp instead of its usual behaviour of looking for myapp+any-permitted-extension. Watch out! I’ve wasted days on this with various packaging systems.

Icon=/usr/local/share/icons/myapp

Should be just

Icon=myapp

1 Like