Tiny bug: Firefox uses xdg-portal without reason

Moderator: BarryK

Post Reply
Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Tiny bug: Firefox uses xdg-portal without reason

Post by Caramel »

(Easy 5.6.7 and other versions)
It's a bug that probably bothers no one but me.

Since several versions, when Firefox (the "normal"Firefox, the one that was downloaded via an entry in the menu) is launched, il is impossible to open the directory /home/firefox/.doc

In fact, it is due to the XDG Desktop Portals that "fusemount" this directory (see cat/proc/mounts when Firefox is opened)

From https://wiki.archlinux.org/title/Firefox :

XDG Desktop Portal integration

Starting with version 64, Firefox can optionally use XDG Desktop Portals to handle various desktop features, such as opening a file picker, or handling MIME types. Using Desktop Portals allows you to, for example, customize which program is invoked to display a dialog when you select files to upload on a webpage or when picking a download location using Save as.... See XDG Desktop Portal#List of backends and interfaces for a list of available backend options.

Firefox has a number of independent settings for specifying whether each feature should be handled with a Desktop Portal request or whether to use the default GTK feature.

Each setting can have the following values:

Code: Select all

0 – Never
1 – Always
2 – Auto (typically depends on whether Firefox is run from within Flatpak or whether the GDK_DEBUG=portals environment is set)

The settings are:

Code: Select all

widget.use-xdg-desktop-portal.file-picker – Whether to use XDG portal for the file picker
widget.use-xdg-desktop-portal.mime-handler – Whether to use XDG portal for the mime handler
widget.use-xdg-desktop-portal.settings – Whether to try to use XDG portal for settings/look-and-feel information
widget.use-xdg-desktop-portal.location – Whether to use XDG portal for geolocation
widget.use-xdg-desktop-portal.open-uri – Whether to use XDG portal for opening to a file

In Firefox all these settings (accessible by the page about:config) are set to 2 (that is "Auto") and, normally, outside a Flatpak, xdg-portal should not be used. That's "the original bug"
(Warning : I remind you that I am not a developer and that I have already been wrong)

To fix this i change the values of the five settings of the quote to 0 instead of 2

Post Reply

Return to “EasyOS”