Bug 507222 - xdg-open on KDE Plasma 6 does not respect custom x-scheme-handler MIME types, falling back to default browser
Summary: xdg-open on KDE Plasma 6 does not respect custom x-scheme-handler MIME types,...
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: URL navigator (other bugs)
Version First Reported In: 6.16.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-19 09:44 UTC by robin
Modified: 2025-08-22 03:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description robin 2025-07-19 09:44:18 UTC
When using KDE Plasma 6, the freedesktop utility `xdg-open` does not correctly recognize or dispatch custom URL schemes registered via `x-scheme-handler` MIME types. Instead of opening the custom handler (e.g., a desktop file registered for scheme vivaldiopen://), `xdg-open` falls back to opening the default web browser (Firefox in my case).

This breaks expected usage of custom protocols and only affects `xdg-open`. Native KDE utilities such as `kioclient` and the `gio` command respect the custom handler and open the correct application.

Steps to reproduce:
1. Register a custom desktop file for a custom scheme, e.g. vivaldiopen://
2. Confirm KDE MIME apps list recognizes it (e.g., grep vivaldiopen ~/.config/mimeapps.list)
3. Run `kioclient exec "vivaldiopen://example.com"` → opens correct handler
4. Run `gio open "vivaldiopen://example.com"` → opens correct handler
5. Run `xdg-open "vivaldiopen://example.com"` → falls back to Firefox (default browser)

Workarounds:
- Using a wrapper script replacing xdg-open in ~/.local/bin/ that routes the custom scheme to kioclient works well.
- Aliasing xdg-open to gio open also works, but is less flexible.

Additional info:
-  xdg-utils version: 1.2.1-1
- Operating System: EndeavourOS (Arch Based)
- KDE Plasma Version: 6.4.3
- KDE Frameworks Version: 6.16.0
- Qt Version: 6.9.1
- Kernel Version: 6.15.6-zen1-1-zen (64-bit)
- Graphics Platform: X11

The issue appears to be caused by `xdg-open` not supporting KDE Plasma 6 properly. It does not handle KDE_SESSION_VERSION=6, and misclassifies custom URL schemes as normal HTTP/HTTPS URLs, causing fallback to the default browser.

Request:
Please update `xdg-open` or KDE’s integration to properly handle custom URL schemes in Plasma 6, respecting registered x-scheme-handler MIME types and dispatching accordingly.
Comment 1 robin 2025-07-19 11:02:26 UTC
Update:

Retested again with kio client exec and it opens in firefox. Thought it worked, but must have gotten mixed up.

Also retested with gio open, that works as expected.
Comment 2 TraceyC 2025-07-23 22:12:57 UTC
I'm not able to reproduce this exactly in git-master or with Plasma 6.4.3, xdg-utils 1.2.1

I already had Jitsi in x-scheme-handler under Settings -> File Associations. I added one for vivaldiopen://*

When I enter this, it opens Jitsi, with the name I entered:
xdg-open jitsi-meet://somemeetingname

When I enter this, Vivaldi opens, but with a blank tab:
vivaldiopen://kde.org

gio-open and kioclient exec also open Vivaldi with a blank tab

Can you share the actual output of ` vivaldiopen ~/.config/mimeapps.list`? This is what it looks like on mine:

❯ rg vivaldiopen mimeapps.list
49:x-scheme-handler/vivaldiopen=vivaldi-stable.desktop;
108:x-scheme-handler/vivaldiopen=vivaldi-stable.desktop;
Comment 3 Bug Janitor Service 2025-08-07 03:46:44 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2025-08-22 03:47:22 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.