Getting That Ubuntu Snap Icon Right On Unity Shell

Ever wondered why after installing that Ubuntu Snap application on your desktop, initially the icon is shown correctly as it should be on the Unity Dash or the Unity Launcher when you locked it there. But subsequently, the icon DOES NOT load properly after the next reboots?

To put it accurately, it goes away and you’re left with a generic file icon that looks terrible or is not representative of the application at all. Worse, when you have it locked on the Launcher, then you click on it, the right icon appears down at the bottom of the stack leaving the generic icon you clicked in its original spot. Now there are 2 icons on your Launcher for the same application. Makes it look odd, does it not?

For a long time I tried to look the other way and turned a blind eye on this weird behavior. It is not supposed to be this way, but I have better things to do than O/C over such minor inconsistencies.

At the back of my mind though, it really bothered me. So I finally searched for answers from almighty Google recently.

And the answer is quite simple:

Create a symbolic link of that Snap application’s shortcut to your local applications shortcuts folder.

That’s right! A shortcut to a shortcut. How ironic. 🤣

Fire your favorite Linux terminal application. Then follow this command to create that shortcut to your Snap application’s .desktop shortcut.

:-$ ln -s /var/lib/snapd/desktop/applications/<snap-app-name>.desktop ~./local/share/applications/

Make sure you replace – <snap-app-name> – with the application’s name. That’s it!

Now the right icon to that Snap application will show properly on your Ubuntu desktop.

Okay, what just happened?

Well, the ln command above creates the link. The “-s” option tells it that you only want a symbolic link. Yes, that needs to be a small letter S.

The 2nd argument – /var/lib/snapd/desktop/applications/<snap-app-name>.desktop – is the file you want linked. Oh, this folder is where the shortcuts of Snap applications normally are found. Choose the .desktop shortcut you want from there.

After that, the next argument is the target location, or folder, where you want that symbolic link placed. This folder – ~/.local/share/applications – is the default location for user-specific application shortcuts.

Say goodbye to that generic file icon from hereon and ogle at your Snap app’s lovely icon forever.

Similar Posts: