Bug 500240 - Google Chrome and Firefox open the GTK file picker instead of KDialog when we use GTK_USE_PORTAL=1
Summary: Google Chrome and Firefox open the GTK file picker instead of KDialog when we...
Status: RESOLVED NOT A BUG
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-17 10:05 UTC by Petar Nedyalkov
Modified: 2025-02-17 11:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Google Chrome (1.57 MB, image/png)
2025-02-17 10:05 UTC, Petar Nedyalkov
Details
Firefox (1.69 MB, image/png)
2025-02-17 10:06 UTC, Petar Nedyalkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petar Nedyalkov 2025-02-17 10:05:45 UTC
Created attachment 178470 [details]
Google Chrome

SUMMARY
Google Chrome and Firefox don't open the GNOME file picker instead of KDialog when we use the environment variable GTK_USE_PORTAL=1

STEPS TO REPRODUCE
1. Open Konsole
2. Start Google Chrome or Firefox with this command - "GTK_USE_PORTAL=1 google-chrome" or GTK_USE_PORTAL=1 firefox"
3. Try to save something on both browsers

OBSERVED RESULT
The GTK file picker is opened instead of KDialog.

EXPECTED RESULT
KDialog is opened.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.13-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2060
Installed packages and versions:
- xdg-desktop-portal - 1.18.4
- xdg-desktop-portal-kde - 6.3.0
- xdg-desktop-portal-gtk - 1.15.1 (this cannot be removed because it's a dependency of plasma-desktop in Fedora)

ADDITIONAL INFORMATION
If we start VS Code with GTK_USE_PORTAL=1, KDialog is showing properly and I don't have any problems there.
Comment 1 Petar Nedyalkov 2025-02-17 10:06:03 UTC
Created attachment 178471 [details]
Firefox
Comment 2 John 2025-02-17 11:04:50 UTC
I can reproduce / confirm it happening on Debian 13 (Trixie) - unstable (Sid) repository too!
With:

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.7.2
Kernel Version: 6.12.13-amd64 (64-bit)
Graphics Platform: Wayland

Package: xdg-desktop-portal-kde
Version: 6.3.0-1
Architecture: amd64
Installed: yes

For these 2 web browsers:
Librewolf: 135.0
Firefox: 128.7.0esr

Tested by:
1. Left-clicking on the "Browse..." button here:
https://www.w3schools.com/howto/howto_html_file_upload_button.asp
2. Right-clicking on the image on the right side and then "Save Image As..." here:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_image_test 

But I cannot confirm it for this web browser:
thorium-browser_130.0.6723.174_AVX.deb
Downloaded from here:
https://github.com/Alex313031/thorium/releases/tag/M130.0.6723.174
As here for both cases the correct file picker is opening (it even shows the KDE icon in the title bar).

I wished to set this report as "CONFIRMED" since that's what I can see for my primary web browser (LibreWolf) and for my backup web browser (Firefox ESR), but since it's not also happening for Thorium that I installed just for testing and which should be pretty similar to Chrome, having the same Chromium source, I left it as it is as I don't know what the proper decision here when it's partially confirmed.
Comment 3 Harald Sitter 2025-02-17 11:25:35 UTC
Considering this works in vscode this doesn't look like a bug in our code. More likely in gtk, or firefox, or your installation.