Bug 510546 - geo:// URLs don't work with OpenURI portal due to NoDisplay
Summary: geo:// URLs don't work with OpenURI portal due to NoDisplay
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.5
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-13 00:49 UTC by Ilya Fedin
Modified: 2025-10-22 03:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Fedin 2025-10-13 00:49:08 UTC
SUMMARY
The files in https://invent.kde.org/frameworks/kguiaddons/-/tree/master/src/geo-scheme-handler have NoDisplay=true set what prevents them from being listed by open with dialog opened by the portal. Given that portal requires choose the same app 3 times in the dialog before it starts launching it automatically, geo:// is completely broken with OpenURI portal. This likely mainly affects flatpak and snap apps but GTK4 always uses portals. GTK apps apparently don't use geo://, though.

STEPS TO REPRODUCE
1. Open any app supporting geo:// in flatpak?

OBSERVED RESULT
Opening geo:// URLs leads to open with dialog with all installed applications but no actual geo:// handler

EXPECTED RESULT
Opening geo:// URLs leads to open with dialog with actual geo:// handlers

SOFTWARE/OS VERSIONS
Operating System: NixOS 25.11
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 ГиБ of RAM (62.7 ГиБ usable)
Graphics Processor: AMD Radeon RX 6400
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C94
System Version: 1.0

ADDITIONAL INFORMATION
Personally I observed this while implementing support for geo:// URLs in a non-KDE application
Comment 1 Nate Graham 2025-10-13 19:30:07 UTC
Wanna submit a patch?
Comment 2 Ilya Fedin 2025-10-13 20:57:08 UTC
FWIW, I noticed https://bugs.kde.org/show_bug.cgi?id=508607 after I created this bug... Having NoDisplay being displayed in open with dialog is likely better solution than removing NoDisplay from those files as this will lead to geo handlers being displayed in applications menu which will look broken (they immediately attempt to open browser with the passed longitude/latitude and application menu won't pass them).

Regarding the patch, I'm not sure as I haven't even found open with dialog code yet (and just removing NoDisplay is unlikely a good solution)...
Comment 3 Ilya Fedin 2025-10-14 09:05:48 UTC
I made more checks:
* Marble has a separate marble_geo.desktop with NoDisplay so installing it doesn't change anything. FWIW, this .desktop file not starting with org.kde.marble leads to the Marble's flatpak package not actually installing it (as well as marble_worldwind.desktop). Weird Marble doesn't handle all the URLs via the org.kde.marble.desktop.
* GNOME Maps doesn't have NoDisplay so installing it leads to open with dialog presenting only it.
* If I create a portals.conf with `org.freedesktop.impl.portal.AppChooser=gtk`, I get xdg-desktop-portal-gtk's open with dialog that shows KDE's handlers properly unlike KDE's own dialog.

So, looks like the bug is actually at xdg-desktop-portal-kde side and I think I even see the offending line...
Comment 4 Bug Janitor Service 2025-10-14 09:36:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/440
Comment 5 Ilya Fedin 2025-10-21 19:39:42 UTC
Git commit a2b180bb92778f82b5402d1661d6cbd00c7afe06 by Ilya Fedin.
Committed on 21/10/2025 at 19:28.
Pushed by davidre into branch 'master'.

AppChooserDialog: Show NoDisplay services

M  +1    -1    src/appchooserdialog.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/a2b180bb92778f82b5402d1661d6cbd00c7afe06
Comment 6 Nate Graham 2025-10-21 22:06:09 UTC
Git commit bcfda003e3136b514c2a438dae426086a4c84863 by Nate Graham.
Committed on 21/10/2025 at 22:01.
Pushed by ngraham into branch 'Plasma/6.5'.

AppChooserDialog: Show NoDisplay services


(cherry picked from commit a2b180bb92778f82b5402d1661d6cbd00c7afe06)

Co-authored-by: Ilya Fedin <fedin-ilja2010@ya.ru>

M  +1    -1    src/appchooserdialog.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/bcfda003e3136b514c2a438dae426086a4c84863