Make Firefox use Dolphin file dialog

Hi,
when I save something from Firefox, I want to use Dolphin as the File Manager.
How do I do that?
By searching I only found this 4yr old reddit post:
“how_do_i_make_firefox_open_files_on_dolphin” (can’t post links)

Which isn’t clear on the solution and might be outdated (?).

Which distro do you use? On openSUSE Firefox uses Plasma dialogs when you save a file through the kmozillahelper package.

For Firefox, make sure you have xdg-desktop-portal and xdg-desktop-portal-kde packages both installed, and set widget.use-xdg-desktop-portal.file-picker to 1 in about:config.

2 Likes

I use Manjaro KDE edition.
xdg-desktop-portal and xdg-desktop-portal-kde packages were installed. Setting widget.use-xdg-desktop-portal.file-picker to 1 in about:config did indeed solved the issue. Thanks!

PS:
I have also Plasma Integration add-on installed, which however doesn’t change this by default or even offers an option for this… :roll_eyes:

2 Likes

See Distributions/Packaging Recommendations - KDE Community Wiki

1 Like

Good to know, I guess I need to carry this to my distro maintainers…

On the KDE side of things, why not include this (as an option) in the plasma integration add-on?

1 Like

Install xdg-desktop-portal-kde and nano /etc/environmentGTK_USE_PORTAL=1 it works on fedora with firefox. reboot

I’ve just noticed something and want to check if anybody else can reproduce. The above works in the file downloads dialog, i.e. Dolphin is displayed. However, if you press “ctrl-shift-y” and display the downloads history, it shows up using Nautilus. If you then select a download to show the location on your system, it shows using Nautilus. This appears to be a bug/oversight. Shouldn’t Dolphin always be used? It appears this has only been fixed in the file downloads dialog.

Please don’t add a GTK debug variable globally. If you’re going to recommend this method, at least do the following:

  • Open launcher/menu
  • Right-click Firefox
  • Edit Application…
  • Open the Application tab
  • Add GTK_USE_PORTAL=1 in the Environment Variables section

But better than setting this up, you can also try the Firefox flatpak which forces all dialogs through the portal and thus should always pick the native dialog.

With Firefox 125.0.3 on Plasma 6.0.4/Wayland, I don’t see your problems, I always get KDE open/save dialogs to appear everywhere inside the browser.

What I did is:

  • set widget.use-xdg-desktop-portal.file-picker to 1,
  • and added GTK_USE_PORTAL=1 to /etc/environment.

Thanks for taking the time to reply. Yes, I’ve set the file-picker to 1, I did try the GTK_USE_PORTAL in /etc/environment, and it didn’t help. I removed it because I read that it can cause problems - and from what I can tell, it isn’t needed. The file-picker “should” be the solution, but it appears that there is a bug somewhere, because it isn’t working. You can see from the attachment that if I press “ctrl-shift-y” it shows Dolphin, but if I select a file to find the location, that dialog is shown in Nautilus.

I confirm the bug, if I install Nautilus, then opening a file location from “Downloads” page either in Firefox or Chromium will launch Nautilus.

The same is happening with printing using system printing dialog, it opens gtk one instead of KDE printing dialog.

While normal save or upload launch KDE open/save dialogs.

Thanks for confirming. So you think this is a KDE bug or a Fx bug? I removed Nautilus and that circumvented the issue, although don’t know how to work around the print dialog issue.

The printing issue for Firefox is already reported, the others are probably coming from absence of implementation of XDG portals in those places, but I can’t confirm, so may be someone from KDE team can investigate the issue.

Can you please explain why? I’m using nix and the distrobox, and other programs can work incorrect.

If you mean why not to use GTK_USE_PORTAL globally:

  • it’s a GTK3 debug variable whose intended use is for flatpak and people started using as a hack
  • it has been replaced in GTK4
  • setting it globally has created silent bugs for both GTK and Plasma in the past

Related:

  1. 417441 – Update ~/.xsettingsd file for all changes that affect GTK apps
  2. GTK4 FileChooserNative: Failed to unify file dialog under KDE Plasma (#5332) · Issues · GNOME / gtk · GitLab
  3. Rename GTK_USE_PORTAL to avoid portal services being run with portals force-enabled (#3107) · Issues · GNOME / GLib · GitLab
  4. Font is not antialiased with GTK apps on wayland · Issue #2861 · flatpak/flatpak · GitHub
  5. Wayland GTK Flatpaks do not antialias fonts when run on KDE Plasma Wayland · Issue #355 · flatpak/xdg-desktop-portal-gtk · GitHub
  6. Talk:Uniform look for Qt and GTK applications - ArchWiki

Btw the KDE file dialog, is not dolphin but provided by KIO and offer close look and features on purpose.