Xdg-Open Works, But Shows an Error Message

Whenever I run xdg-open from the terminal to open a URL in the default browser, for example:

xdg-open https://forum.endeavouros.com/

the command works, opening the page in Firefox, but throws the following error in the terminal:

qt.qpa.services: Failed to register with host portal QDBusError(“org.freedesktop.
portal.Error.Failed”, “Could not register app ID: App info not found for ‘org.kde
.kioclient’”)

I’ve been searching, but haven’t had any luck finding information on a similar problem. I also went down a rabbit hole by asking ChatGPT, but got nowhere with its suggestions. I’ve checked arch.org’s Wiki for xdg-desktop portal and the Plasma forums, and also found nothing. Usually when this happens, it’s either specific to my system, or I’m searching using the wrong keywords. I suspect that someone more-knowledgeable than I can tell what’s wrong just by the error message, but I haven’t got a clue.

I’m using KDE 6.5.3, kernel 6.12.59-1-lts (I also tried the current kernel and got the same error), and Wayland.

I’ve confirmed that xdg-desktop-portal and xdg-desktop-portal-kde are running, and as I said, xdg-open works, it’s just giving me that annoying error message.

Can anyone confirm that this is not specific to my system by trying to open a URL with xdg-open on KDE/Wayland, or suggest a way to determine what the problem is?

1 Like

I think I found out what the error message means. According to GPT-OSS 120B:

The error is produced by Qt’s portal integration layer when it tries to register the application that is going to open the URL (in this case org.kde.kioclient).

On a Wayland session the xdg‑desktop‑portal service is consulted via D‑Bus; it expects the caller to have a valid desktop‑file entry (the “App ID”) that it can look up in the system’s desktop‑file database.

The AI says it doesn’t affect Plasma on X11 because X11 doesn’t use the portal.

It recommended creating a desktop file called “org.kde.kioclient.desktop“, and adding it to /usr/share/applications to provide the correct App ID:

[Desktop Entry]
Name=KDE Kioclient (compat)
Exec=kioclient5 %u
Type=Application
NoDisplay=true
X-Desktop-File-Install-Version=5.0

I tried it, and I can now use xdg-open without causing the error.

The AI also gave me bad links to supposed bug entries on Arch and KDE’s Bugzilla that went to either 404 pages or the wrong bug reports, so that wasn’t helpful, but at least it gave me a decent workaround.

1 Like

@linux4me, reported at bugs.kde.org/show_bug.cgi?id=512650#c3:

Thanks @RokeJulianLockhart

1 Like