elementary / applications-menu

Applications Menu for elementary OS and the Pantheon desktop environment
https://elementary.io
GNU General Public License v3.0
103 stars 36 forks source link

Snap icon missing #99

Open ghost opened 6 years ago

ghost commented 6 years ago

There's no icon:

snap

This was after the installation. After closing the session and coming back looks like this:

clem

This happened with LibreOffice snap too but on the Guest session, the regular session the icons worked fine.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/58264577-snap-icon-missing?utm_campaign=plugin&utm_content=tracker%2F62023936&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F62023936&utm_medium=issues&utm_source=github).
ghost commented 6 years ago

By the way, Clementine snap, version 1.3.1, integrates very poorly, the theme is wrong and the icon on the panel(near the clock) is not there. Maybe it's some GTK/Qt issue. I didn't test Flatpaks.

I think these issues explain why Clemetine(a popular music player) snap elementary OS is not even appearing on the list of the distros that it was installedl(check https://snapcraft.io/clementine), but for example LibreOffice snap elementary OS is ranked 7 on the list(check https://snapcraft.io/libreoffice).

My theory is that some people are installing the snap, seeing the issues and uninstalling but I might be wrong.

ghost commented 6 years ago

Also:

Turning off sound notification when music changes is not working https://github.com/elementary/wingpanel-indicator-notifications/issues/46

peteruithoven commented 5 years ago

I noticed the same with the Spotify snap. Looking at the .desktop file (I love AppEditor) I noticed this Icon line:

Icon=/snap/spotify/19/usr/share/spotify/icons/spotify-linux-128.png

When I searched for this icon I found:

$ sudo find /snap -name "spotify-linux-128.png"
/snap/spotify/22/usr/share/spotify/icons/spotify-linux-128.png
/snap/spotify/24/usr/share/spotify/icons/spotify-linux-128.png
/snap/spotify/21/usr/share/spotify/icons/spotify-linux-128.png

What is this 19 / 21 / 22 / 24 number? Could this get out of sync?

In the /snap/spotify folder there also seems to be a current symlink:

$ ll /snap/spotify/
total 8
drwxr-xr-x  5 root root 4096 nov  2 14:42 ./
drwxr-xr-x 14 root root 4096 okt 17 13:50 ../
drwxr-xr-x  8 root root  158 sep 10 12:51 21/
drwxr-xr-x  8 root root  146 okt 16 15:53 22/
drwxr-xr-x  8 root root  146 okt 31 22:19 24/
lrwxrwxrwx  1 root root    2 nov  2 14:42 current -> 24/
peteruithoven commented 5 years ago

These desktop files are retrieved from: /var/lib/snapd/desktop/applications/:

$ cat /var/lib/snapd/desktop/applications/spotify_spotify.desktop 
[Desktop Entry]
Type=Application
Name=Spotify
GenericName=Music Player
Icon=/snap/spotify/24/usr/share/spotify/icons/spotify-linux-128.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

The Spotify snap seems to contain this desktop file:

$ cat /snap/spotify/24/usr/share/spotify/spotify.desktop
[Desktop Entry]
Type=Application
Name=Spotify
GenericName=Music Player
Icon=/usr/share/spotify/icons/spotify-linux-128.png
TryExec=spotify
Exec=spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

Maybe snapd transforms and moves these desktop files?

arshubham commented 5 years ago

@peteruithoven Does this still happen in Spotify for you? As for clementine I searched but couldn't find the actual icon at all. It seems like a packaging issue here. Will have to check once for libreoffice in guest.

davidwinter commented 3 years ago

This is an issue for me with a fresh install of Odin. After installing a snap application it seems the .desktop file is not respected immediately. One workaround is to log out and back in again and then search for the application again to see the correct icon.