26

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.

3
  • 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 2: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 4:57
34

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

1
  • For Debian I had /usr/share/applications/.
    – user149244
    Apr 27 '20 at 11:39
22

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.

5
  • 1
    Yes. Can confirm on Elementary OS as well... built on Ubuntu 18.04 LTS Nov 15 '19 at 16:15
  • 1
    Working here on Kali Linux and XFCE4 Jul 23 '20 at 3:09
  • 2
    works with pop OS as well Jan 25 at 23:52
  • 2
    Totally works with Lubuntu 20.04. Feb 23 at 20:16
  • 1
    @SaeedAhadian Kubuntu as well May 20 at 9:03
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 ;^).

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.