Snap app icon doesn't appear in menu

Quick to answer questions about finding your way around LMDE as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums within the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rodrigosilva0494
Level 1
Level 1
Posts: 12
Joined: Tue May 12, 2020 1:18 am

Snap app icon doesn't appear in menu

Post by rodrigosilva0494 »

Hello.

I have installed the snap app Rambox via terminal

Code: Select all

sudo snap install rambox
, and I can run the app normally with

Code: Select all

snap run rambox
. I just wanted to open the app via cinnamon menu, but the icon isn't there. Also, when I run the app via terminal, the icon on the panel has a figure of a gear, and I can't add to panel. Is there anyway I could fix this? I have already rebooted the system.

Thank you!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Snap app icon doesn't appear in menu

Post by smurphos »

Hi,

Can you run the following terminal commands?

Check if the snapd desktop file location is registered properly

Code: Select all

echo $XDG_DATA_DIRS
Check for a rambox .desktop file

Code: Select all

ls -l /var/lib/snapd/desktop/applications
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
rodrigosilva0494
Level 1
Level 1
Posts: 12
Joined: Tue May 12, 2020 1:18 am

Re: Snap app icon doesn't appear in menu

Post by rodrigosilva0494 »

Hi, and thanks for the reply!

When I write "echo $XDG_DATA_DIRS", I get this:
/usr/share/gnome:/home/rodrigo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

And when I write "ls -l /var/lib/snapd/desktop/applications" I get this:
total 8
-rw-r--r-- 1 root root 13 May 16 13:41 mimeinfo.cache
-rwxr-xr-x 1 root root 352 May 16 13:41 rambox_rambox.desktop

I'm not an expert user, so I don't know exactly that it means.
Thank you!
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Snap app icon doesn't appear in menu

Post by smurphos »

Thanks - looks like a snapd bug - the first output should include /var/lib/snapd/desktop

You can work around the issue by making a copy of the rambox desktop file to your local applications folder

Run this in a terminal, then log off and back on. Rambox should be in the menu and pinnable.

Code: Select all

cp /var/lib/snapd/desktop/applications/rambox_rambox.desktop ~/.local/share/applications/
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
rodrigosilva0494
Level 1
Level 1
Posts: 12
Joined: Tue May 12, 2020 1:18 am

Re: Snap app icon doesn't appear in menu

Post by rodrigosilva0494 »

Thanks again for the reply.
When I write the command, I get this message:
cp: cannot create regular file '/home/rodrigo/.local/share/applications/': Not a directory

Should I create this directory then?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Snap app icon doesn't appear in menu

Post by smurphos »

rodrigosilva0494 wrote: Sat May 16, 2020 2:50 pm Should I create this directory then?
Yep - you can do it the file manager or with terminal command

Code: Select all

mkdir -p ~/.local/share/applications
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
rodrigosilva0494
Level 1
Level 1
Posts: 12
Joined: Tue May 12, 2020 1:18 am

Re: Snap app icon doesn't appear in menu

Post by rodrigosilva0494 »

Worked like a charm. Thank you very much for the help! :)
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Snap app icon doesn't appear in menu

Post by Monsta »

So... snapd actually sets $XDG_DATA_DIRS in /etc/profile.d/apps-bin-path.sh, but that file isn't used in the graphical logins in Debian: viewtopic.php?f=247&t=278474
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Snap app icon doesn't appear in menu

Post by smurphos »

Monsta wrote: Sun May 17, 2020 7:56 am So... snapd actually sets $XDG_DATA_DIRS in /etc/profile.d/apps-bin-path.sh, but that file isn't used in the graphical logins in Debian: viewtopic.php?f=247&t=278474
Ah, I hadn't actually clocked the question was in the LMDE section. Interesting how the equivalent flatpak path does make it to XDG_DATA_DIRS though - I guess the Mint team have tweaked something in LMDE to make that work out of the box. I'm surprised the snapd developers haven't implemented a work-around for Debian.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
axisofevil
Level 4
Level 4
Posts: 388
Joined: Mon Nov 14, 2011 12:22 pm

Re: Snap app icon doesn't appear in menu

Post by axisofevil »

Yet another "general" package system fail.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Snap app icon doesn't appear in menu

Post by Monsta »

smurphos wrote: Sun May 17, 2020 12:13 pm Ah, I hadn't actually clocked the question was in the LMDE section. Interesting how the equivalent flatpak path does make it to XDG_DATA_DIRS though - I guess the Mint team have tweaked something in LMDE to make that work out of the box. I'm surprised the snapd developers haven't implemented a work-around for Debian.
Flatpak has its paths set in /etc/X11/Xsession.d/20flatpak file - that one is used in the X logins.

Actually, I found that snapd used to have a similar file in /etc/X11/Xsession.d/ dir as well, until upstream dropped it. It should be there in LMDE 3, but it's gone in LMDE 4.
jenbites

Re: Snap app icon doesn't appear in menu

Post by jenbites »

smurphos wrote: Sat May 16, 2020 2:35 pm Thanks - looks like a snapd bug - the first output should include /var/lib/snapd/desktop

You can work around the issue by making a copy of the rambox desktop file to your local applications folder

Run this in a terminal, then log off and back on. Rambox should be in the menu and pinnable.

Code: Select all

cp /var/lib/snapd/desktop/applications/rambox_rambox.desktop ~/.local/share/applications/

Wow! I really created an account just to say, thankyou! this one worked for me! <3
skimo12

Re: Snap app icon doesn't appear in menu

Post by skimo12 »

As a Debian user trying to get the 'snap' version of keepassxc on my menu, i found your answers very helpful. Here's what i did.
mkdir -p ~/.local/share/applications
cp /var/lib/snapd/desktop/applications/keepassxc_keepassxc.desktop ~/.local/share/applications/

Thanks for the clear answers :D
RedBearAK
Level 1
Level 1
Posts: 36
Joined: Wed Aug 19, 2020 3:03 am

Re: Snap app icon doesn't appear in menu

Post by RedBearAK »

This continues to be a problem with a new Linux Mint 20.1 install (fresh install, not an upgrade). I just went through the instructions to activate snapd and install the snap version of Authy (a 2-factor authentication app), and it didn't show up in the menu or app launchers like Albert. I didn't have to create the folder but I did have to copy the Authy desktop file into ~/.local/share/applications to actually be able to find it with any launchers/menus.

EDIT: This seems to be fixed as of at least March 10, 2021. I got rid of the copied version of the Authy desktop file from ~/.local/share/applications and the app still appears in Cinnamon menu, Ulauncher and Albert launcher, even after logging out. So they all seem to be searching in /var/lib/snapd/desktop/applications now.
skrtboi101
Level 1
Level 1
Posts: 1
Joined: Wed Dec 15, 2021 1:15 pm

Re: Snap app icon doesn't appear in menu

Post by skrtboi101 »

hi @smurphos your tips helped me so much and i can see my apps on the launcher but my icons don't look like original size they look a little pixelated
gbguarro
Level 1
Level 1
Posts: 1
Joined: Sat Mar 05, 2022 11:29 pm

Re: Snap app icon doesn't appear in menu

Post by gbguarro »

smurphos wrote: Sat May 16, 2020 2:35 pm Thanks - looks like a snapd bug - the first output should include /var/lib/snapd/desktop

You can work around the issue by making a copy of the rambox desktop file to your local applications folder

Run this in a terminal, then log off and back on. Rambox should be in the menu and pinnable.

Code: Select all

cp /var/lib/snapd/desktop/applications/rambox_rambox.desktop ~/.local/share/applications/
Thanks for this! What is this doing exactly? Does the OS look for shortcuts in "~/.local/share/applications/"?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Snap app icon doesn't appear in menu

Post by smurphos »

Yep, it's the standard location for user modified or added .desktop files used to populate the menu. System equivalent is /usr/share/applications/
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Locked

Return to “Beginner Questions”