Integrate flatpack

My flatpack installed applications are not recognized by krunner. I need to start them via CLI.

So, when I do this, I am greeted with the following (in Brazilian Portuguese, out of some reason, whereas all my language settings are set to a different language; I put LANG=EN_US to get this output here)

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/janlimpens/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

(process:2): Gtk-WARNING **: 11:01:06.819: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 11:01:06.821: Failed to load module "xapp-gtk3-module"
Gtk-Message: 11:01:06.825: Failed to load module "appmenu-gtk-module"

However

echo $XDG_DATA_DIRS
/var/lib/flatpak/exports/share/

What can I do?
Where should I set there variables for them to be understood. Currently I set them only in my fish.config, so they only ought to be picked up in the shell. However, even this does not seem to work.

Don’t know anything about fish, but in bash (~/.bashrc) you’d do something like this (I added $HOME/.local/bin):

PATH="/home/merell/.local/bin:$PATH"

Any of my local scripts can be run just like an installed program.

Usually, what you put into your .bashrc only has relevance in the cli, however, your de will have no knowledge of these environment variables (unless you started it manually from a bash session). The funny thing is, as I have demonstrated, these env vars have been set (at least partially), however the program still reports them as missing, even when started from the cli.

Hm, maybe I’ll move these to .profile …

The flatpak package should install a file in /etc/profile.d/ called flatpak.sh which is supposed to add these paths to XDG_DATA_DIRS. Check if that file exists, if it does then it’s probably something with KDE I’m guessing.

It works for me on manjaro gnome with the alt+f2 run command, for what it’s worth.