SUMMARY It seems that the XDG_DATA_DIRS environment variable is not exported into the session as is done for the X11 session. STEPS TO REPRODUCE 1. Install a app via flatpak 2. Try to find newly installed app via krunner 3. krunner does not show any results OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Also applies to snaps btw. $ grep -rl XDG_DATA /etc/profile.d /etc/profile.d/apps-bin-path.sh /etc/profile.d/flatpak.sh If I were to guess it's because our session does not spin out of a shell but is purely started by c++ and thus never loads the profile scripts.
I thought the session was spun out of /usr/bin/startplasmacompositor, which is a shell script.
So it is, makes the bug weirder though. $ grep Exec /usr/share/wayland-sessions/plasmawayland.desktop Exec=dbus-run-session /usr/bin/startplasmacompositor TryExec=/usr/bin/startplasmacompositor
Things that I tried and didn't work : * Wayland doesn't source /etc/profile.d/flatpak.sh * Running that script via the KDE startup mechanism * Creating a /etc/environment.d/990-flatpak.conf Not really sure how else to inject the flatpak path's into the Wayland session.
/etc/profile.d is normally sourced from SDDM via /usr/share/sddm/scripts/Xsession The wayland version is /usr/share/sddm/scripts/wayland-session which looks to me to still include /etc/profile It possibly means that we're sourcing fine and kwin is destroying the env. I shall investigate.
Potentially related : https://bugzilla.redhat.com/show_bug.cgi?id=92132 Though after applying the workaround checking the environment of kwin_wayland still does not have the correct XDG_DATA_DIRS. I investigated /usr/share/sddm/scripts/wayland-session and realised that it doesn't actually source zshrc. Once I made it source zshrc, everything works properly. I also noticed that for the XSession Neon ships a /etc/X11/Xsession.d/20flatpak which is probably what makes it work on X11.
The problem is once again zsh configuration. The /etc/profile.d/ files are not sourced by default with zsh, whereas sourcing /etc/profile in bash leads to sourcing all the files in /etc/profile.d Sourcing the files manually in $HOME/.zprofile makes it work. But this should work by default, so as a quick workaround the apps-bin-path.sh and flatpak.sh files should just be additionally sourced in the startup-script when zsh is the used shell. It's ugly anyway. Why are the shells even involved? Setting these environment variable for our non-terminal desktop environment shouldn't be in any way related with them in the first place.
I'm having this problem as well. I have my shell set to fish. Oddly enough, if I open Krunner and run `plasmashell --replace` then it works.
*** Bug 428548 has been marked as a duplicate of this bug. ***
*** Bug 391628 has been marked as a duplicate of this bug. ***
>I investigated /usr/share/sddm/scripts/wayland-session and realised that it doesn't actually source zshrc. Once I made it source zshrc, everything works properly. That's upstream, it was also fixed