SUMMARY Cannot find application installed via snap STEPS TO REPRODUCE 1. install visual studio code via snap 2. install gimp via snap 3. press "super" or click on "application launcher" 4. Try to find them... they are not there OBSERVED RESULT There's no indexation of any snap installed program EXPECTED RESULT find and launch snap applications SOFTWARE/OS VERSIONS Operating System: KDE neon 5.22 KDE Plasma Version: 5.22.4 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.3 Kernel Version: 5.11.0-27-generic (64-bit) Graphics Platform: X11 Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz Memory: 22.9 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 630
Can you find them from KRunner? What about kmenuedit?
No, I cannot find them anywhere, but I can run them via terminal just fine. Tested on a fresh install KDE neon, and my workstation (old, but updated over time up today)
Did you install them using Discover, or another means?
tried both ways, discover, and then via terminal. No success.
I don't know anything about snap packaging, but this seems like either a bug in Snap Packaging for not installing the necessary desktop integration bits, or a bug in our software for not looking for Snap apps in the places where they do get installed. CCing the Neon packagers who are more familiar with Snap than I am.
>but I can run them via terminal just fine. Please confirm desktop files can be found at $XDG_DATA_DIRS /applications
(In reply to David Edmundson from comment #6) > >but I can run them via terminal just fine. > > Please confirm desktop files can be found at $XDG_DATA_DIRS /applications it does not exists
Created attachment 142399 [details] insane data written?
ups, I wrongly attached another image report to this thread. Sorry
>it does not exists Then plasma is not at fault
(In reply to David Edmundson from comment #10) > >it does not exists > > Then plasma is not at fault but i'm using kde default program installer to add programs, it's KDE NEON fault?
Re-opening; this is bugs.kde.org, not bugs.plasmashell.org, and the issue could still be in a different part of our software stack.
Franco, how did you install the Snap app in question? Using Discover? Can you try installing it on the command line to see if a relevant .desktop file appears in the applications folder of any of the directories in $XDG_DATA_DIRS?
(snapd itself installs a file - /etc/profile.d/apps-bin-path.sh - that injects the relevant XDG_DATA_DIRS path, which is a non-standard location managed by snapd. if that is not working then chances are that file is broken/missing, or a garbage login shell is being used that doesn't source /etc/profile, or /etc/profile is broken, or something overwrites XDG_DATA_DIRS without appending the original entries)
(In reply to Nate Graham from comment #13) > Franco, how did you install the Snap app in question? Using Discover? > > Can you try installing it on the command line to see if a relevant .desktop > file appears in the applications folder of any of the directories in > $XDG_DATA_DIRS? I tried both ways, same results. For example installing gimp from command line or from discover. No icons, no folders. The only way to run it is via terminal typing "gimp"
(In reply to Harald Sitter from comment #14) > (snapd itself installs a file - /etc/profile.d/apps-bin-path.sh - that > injects the relevant XDG_DATA_DIRS path, which is a non-standard location > managed by snapd. if that is not working then chances are that file is > broken/missing, or a garbage login shell is being used that doesn't source > /etc/profile, or /etc/profile is broken, or something overwrites > XDG_DATA_DIRS without appending the original entries) If I type in a terminal echo $XDG_DATA_DIRS I get: /usr/share/plasma:/home/franco/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
(In reply to Franco Pellegrini from comment #15) > I tried both ways, same results. For example installing gimp from command > line or from discover. No icons, no folders. The only way to run it is via > terminal typing "gimp" Oh, sorry for leading you down the wrong path. I forgot that you were using Neon and that there wouldn't be anything there due to Neon's decision to remove AppStream Metadata from distro-provided apps end encourage people to use apps from Snap or Flatpak instead. So to a certain extent that's expected behavior; you should get GIMP from Snap or Flatpak.
(In reply to Franco Pellegrini from comment #16) > If I type in a terminal > echo $XDG_DATA_DIRS > I get: > /usr/share/plasma:/home/franco/.local/share/flatpak/exports/share:/var/lib/ > flatpak/exports/share:/usr/local/share:/usr/share Looks to me like the snap path isn't in there. Can you print the contents of /etc/profile.d/apps-bin-path.sh?
(In reply to Nate Graham from comment #18) > (In reply to Franco Pellegrini from comment #16) > > If I type in a terminal > > echo $XDG_DATA_DIRS > > I get: > > /usr/share/plasma:/home/franco/.local/share/flatpak/exports/share:/var/lib/ > > flatpak/exports/share:/usr/local/share:/usr/share > Looks to me like the snap path isn't in there. Can you print the contents of > /etc/profile.d/apps-bin-path.sh? # shellcheck shell=sh # Expand $PATH to include the directory where snappy applications go. snap_bin_path="/snap/bin" if [ -n "${PATH##*${snap_bin_path}}" ] && [ -n "${PATH##*${snap_bin_path}:*}" ]; then export PATH="$PATH:${snap_bin_path}" fi # Ensure base distro defaults xdg path are set if nothing filed up some # defaults yet. if [ -z "$XDG_DATA_DIRS" ]; then export XDG_DATA_DIRS="/usr/local/share:/usr/share" fi # Desktop files (used by desktop environments within both X11 and Wayland) are # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for # snappy applications' desktop files. snap_xdg_path="/var/lib/snapd/desktop" if [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}:*}" ]; then export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${snap_xdg_path}" fi
Just as a comment, I did not edit such files, they are all untouched since I first installed KDE neon.
I can reproduce this problem on my 3 different PC. All of them are updated, but from old KDE versions to the latest one. Its seems an old problem carried up today. What should I do to workaround the problem? I test a NEW kde neon on a virtual machine, and the problem cannot be reproduced.
Do the expected .desktop files appear in /var/lib/snapd/desktop/?
Created attachment 142717 [details] /var/lib/snapd/desktop/applications content (In reply to Nate Graham from comment #22) > Do the expected .desktop files appear in /var/lib/snapd/desktop/? yes, all snap app appears there as the attached screenshot (in my test example, code and gimp). But they does not appear as an installed app on KDE neon menu, or in KRunner (it only shows a folder named gimp)
Are you using zsh there? If so it is configured as your login shell (in /etc/passwd)?
(In reply to Harald Sitter from comment #24) > Are you using zsh there? If so it is configured as your login shell (in > /etc/passwd)? I set zsh as the default shell using chsh -s "$(which zsh)"
zsh counts as garbage login shell https://bugs.kde.org/show_bug.cgi?id=441227#c14 https://realjenius.com/2020/01/12/kde-neon-snap-apps-missing/
(In reply to Harald Sitter from comment #26) > zsh counts as garbage login shell > https://bugs.kde.org/show_bug.cgi?id=441227#c14 > > https://realjenius.com/2020/01/12/kde-neon-snap-apps-missing/ I can confirm that https://realjenius.com/2020/01/12/kde-neon-snap-apps-missing/ solves the issue