3

Firefox keeps asking for being set as default browser when GTK_USE_PORTAL=1 is s...

 2 years ago
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1516290
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
default.jpg

Reporter

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

According to KDE developers recommendation, I tried enabling native KDE dialog integration with Firefox using xdg-desktop-portal-kde, and noticed that Firefox keeps asking about being set as default browser on each startup.

System: Debian testing Linux, Firefox 65.0b6.

I installed:
xdg-desktop-portal 1.0.3
xdg-desktop-portal-kde 5.14.3

Set in $HOME/.profile:

export GTK_USE_PORTAL=1

Applications > Default Applications > Web Browser already set to Firefox.

When GTK_USE_PORTAL is not set, it's not asking after first time.

I also noticed, that Firefox normally remembers this setting after creating a NoDisplay .desktop file in $HOME/.local/share/applications

Such as:

$HOME/.local/share/applications/userapp-Firefox-IIJAUZ.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/opt/mozilla/firefox/firefox-bin %u
Name=Firefox
Comment=Custom definition for Firefox

This is not visible in menu and not available to System Settings choice (because of NoDisplay=true), so I usually create another .desktop file there, to expose Firefox. Something like:

$HOME/.local/share/applications/Firefox.desktop 

[Desktop Entry]
Comment=
Exec=/opt/mozilla/firefox/firefox %u
GenericName=Mozilla Firefox
Icon=/home/user/pictures/icons/firefox.png
MimeType=application/x-www-browser;
Name=Firefox
NoDisplay=false
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
Categories=Network;WebBrowser;

This way it can be selected in System Settings > Applications > Default Applications > Web Browser.

Something between these two and xdg desktop portal goes wrong I suppose.

Corresponding KDE bug https://bugs.kde.org/show_bug.cgi?id=402206 was closed and KDE developers suggested it's a Firefox issue.

Can you please take a look?

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK