31

How do I add a snap application (Notes) icon to the desktop?

The normal method of usr/shared/applications does not work for a snap application.
I have looked in the snap folder and could not find anything useful.

Dan
  • 724
  • I have found the executable in computer>snap>notes>4>user>bin>notes executable and the icon in computer>snap>meta>gui>snap icon.png. I put the executable on the Desktop but its gonna get of the same icons. Any ideas on how to fix this? – Dan Jul 20 '16 at 02:19
  • Look in /var/lib/snapd/desktop/applications for the .desktop. You can copy it to your Desktop (- though when running notes it could just be pinned to the launcher if using unity. – doug Jul 20 '16 at 11:45
  • Thanks Doug- That's exactly what I was looking for. I would give those points if I could - Solved – Dan Jul 21 '16 at 04:57

3 Answers3

39

Currently .desktops for snaps are located in /var/lib/snapd/desktop/applications

One can copy them out for use as a Desktop or in the case of Unity when running the snap just pin the icon that shows up in the launcher.

As far as snap icons in the unity launcher - atm if the snap has a .deb equivilant installed (vlc is one example) then the snap will use the .deb's icon. (improper behavior)

In those cases a new .desktop for the snap should be created in ~/.local/share/applications & on the Exec= line use a full path to the snap binary, this will differentiate the .desktop

doug
  • 17,026
28

A simple permanent solution for all snap installations is to link your snap .desktop folder inside one of your user or system .desktop folders.

For administrators:

sudo ln -s /var/lib/snapd/desktop/applications/ /usr/share/applications/snap 

For your user only:

ln -s /var/lib/snapd/desktop/applications/ ~/.local/share/applications/snap

Confirmed to work instantly on Linux Mint.

2

When I snap install blender, the .desktop file stayed in a /snap subdirectory. To make it work with gnome, I had to copy blender.desktop from /snap/blender/current/blender.desktop to /usr/share/applications (as root) and then all was fixed: blender shows in the gnome menus and nautilus associates it with .blend files.

Looks like some sort of crack between snaps and gnomes to me. Perhaps what we need is a snappy gnome (or is it a gnomey snap ;^).

  • I made a link. sudo ln -s /var/lib/snapd/desktop/applications/postman_postman.desktop /usr/local/share/applications/postman.desktop – Lasith Niroshan Apr 23 '19 at 09:08