Tag Archives: firefox

Native KDE File Dialogs in Firefox

One of my favorite things about running KDE’s own distro, KDE Neon, is how it defaults to using the KDE file UI in Firefox. I’m not sure why Kubuntu and Fedora KDE don’t know this, but it’s easy enough to configure.

Installation

The magic behind this is Firefox’s ability to use an XDG desktop portal. You probably already have the KDE XDG desktop portal installed, but if not, simply run:

Fedora
sudo dnf -y install xdg-desktop-portal-kde
Kubuntu
sudo apt install xdg-desktop-portal-kde

Configuring Your Shell

Next, we tell GTK apps, like Firefox, to use the KDE file dialogs if they’re able. We do that by setting in a variable in either our ZSH or BASH configuration (whichever your default shell is).

ZSH
echo export GTK_USE_PORTAL=1 >> .zprofile
BASH
echo export GTK_USE_PORTAL=1 >> .profile

Now just log out and back in and you get should native KDE file dialogs when saving or opening files with Firefox!