When using the file chooser for saving downloaded files or anything else in Firefox, Chrome etc I am always shown the gtk file picker instead of the default KDE one, which I believe is supplied by the kdialog package that is already installed. How does one fix this?
Kdialog has nothing to do with file pickers.
You have to use Portals (xdg-desktop-portal) to be able to use a different file picker in place of the applicationâs native one. The application needs to support this, as well. This is for any distro, not just neon. You should already have xdg-desktop-portal-kde
installed by default.
For me, Firefox works using KDEâs file picker out of the box, as does Google Chrome.
Testing Chromium installed as a flatpak, it also is using the KDE file picker. (The xdg-desktop-portal was designed originally for flatpak)
I do not believe I have done anything to change any settings.
You may need to set a variable somewhere to force some Gtk apps to use the KDE file picker. Such as GTK_USE_PORTAL=1 command
If you have xdg-desktop-portal-gnome
installed, this may cause the appâs native file picker to be used as well.
I am probably missing something basic that fixes this for you.
I have both the kde and gnome version of xdg-desktop-portal installed. Iâm not using any flatpaks, both browsers are directly installed. Should I remove xdg-desktop-portal-gnome
?
The âproblemâ with Firefox is that it only uses portals by default if it runs inside a Flatpak.
But this can be enforced through a setting.
Go to about:config
look for widget.use-xdg-desktop-portal.file-picker
and set the value to 1
(default is 2
which means âdetect if in flatpakâ).
No idea about Chrome/Chromium, for me those already seem to use the portals regardless of running in Flatpak or not
Yes, I would try that. Then reboot.
I donât have it here on any of my systems.
Aah, that explains it for me. I had changed this setting ages ago, and my profile is pretty old and carried over from a couple of different systems and installs.
Thanks, that fixed it for Firefox. I use Chrome very rarely so will see later.
Ideally Firefoxâs default would be âdetect if portals are availableâ not âdetect if running inside sandboxâ.
Then it would show native dialog for most systems automatically and only fall back to built-ins on systems that are either too old to have portals or specifically not deployed them.
Seriously. When will the search function on this site be in bright neon with a huuuuge search icon.
It doesnât work anymore even if I reset it to 2 - any operation with an open dialog causes an instant crash.
A value of 0
should force the built-in dialog.
But maybe you can report the crash to Mozilla?
Confirmed that the problem happens with a fresh browser profile as well - so looks like something with my setup.
I thought I might need to install xdg-desktop-portal-gnome - but it seems to want to install all of GNOME along with it and remove pulseaudio from my system.
What else could be wrong? I have xdg-desktop-portal-gtk and xdg-desktop-portal-kde installed and am only facing this problem with Firefox.
Did you do the about:config edit mentioned previously? This is necessary for Firefox, at least on Mozilla-sourced packaging (which is what neon uses).
Of course. Like i said, it crashed instantly, and it continues to do despite reverting the edit and also on a fresh, unmodified Firefox profile.
Sorry, I missed that. I just did this on my laptop a few moments ago â it is a fairly fresh install.
Iâm wondering if Firefox (I am actually using a fork, Floorp, but itâs just a rebuild with some extra addons) forces itself to look for the GNOME version of the file picker and crashes if itâs not found?
Yes, it is a rebuild, but what options used there, compared to the mozilla-built ones? These changes could be casing this to occur.
I just realized I have the âportableâ floorp sitting around unused here , and it works just fine for me with the config edit, both before and after updating it.
Options are the same - it adds a few visual changes like vertical tabs and different color themes; the core browser functionality is unaffected.