I use latest KDE neon, but I believe the problem regards not exactly KDE but Ubuntu.
When I install flatpak or snap applications KDE doesn't see them - I mean I can't find them in list of applications in the application launcher.
I made some research and I found out that both snaps and flatpak have the following dirs where they keep launchers:
for flatpak its: /var/lib/flatpak/exports/share
for snaps its: /var/lib/snapd/desktop
And I figured out that the system searches for applications in dirs defined in the variable: XDG_DATA_DIRS
So when I execute echo $XDG_DATA_DIRS I get:
/usr/share//usr/share/xsessions/plasma:/usr/local/share/:/usr/share/
So it doesn't contain folders with launchers of snaps and flatpak.
What's more, I can see there are suitable scripts in the /etc/profile.d/ that should update this variable, for instance: /etc/profile.d/flatpak.sh has the following content:
# /etc/profile.d/flatpak.sh - set XDG_DATA_DIRS
if [ "${XDG_DATA_DIRS#*flatpak}" = "${XDG_DATA_DIRS}" ]; then
XDG_DATA_DIRS="${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak/exports/share:/var/lib/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
fi
export XDG_DATA_DIRS
So I guess maybe these scripts for some reason are not executed or they are wrong? Can you guys tell me what is wrong?