Xdg-open throws "filed to register with host portal" error

I get this error when trying to open an mp3 file with xdg-run:

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’”)

The file does open, but I still get the error on the cl. I’m now running Wayland and wondering if this is because I’m no longer running x. Is there a Wayland equivalent to xdg-open to open the file in the registered program? Any help greatly appreciated! Thanks!

1 Like

xdg-open should normally be Wayland-compatible. It’s not specifically linked to X11. It’s a desktop standard created by freedesktop.org.

1 Like

Hmm…. okay, thanks for that. I was unaware. So, I’m not sure what changed except the most recent update. I mean, it’s not really critical as it seems to be working (launching the right program anyway), but the error is a little disturbing. Thanks again.

Considering the reference to KIO — which is a KDE-specific framework — I suspect that it’s probably just a bug in this particular version of the KDE Frameworks.

If everything works, then I wouldn’t worry about it. :wink:

1 Like

Found a solution here:

Essentially, I had to create a file called org.kde.kioclient.desktop in the /usr/share/applications directory, then put this in it:

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

Doing this seems to fix the error. Thanks everybody!

4 Likes

Thanks for that solution. I had mentioned the issue recently in one of the Testing Updates threads, and was still waiting for a fix to be rolled out.

I made a couple of modifications to the text in the /usr/share/applications/org.kde.kioclient.desktop file though.

The first was changing kioclient5 to just kioclient, as kioclient5 is only a symbolic link to kioclient:

ls -laH /usr/bin | grep kioclient 
-rwxr-xr-x 1 root root       64440 Dec  9 22:51 kioclient
lrwxrwxrwx 1 root root           9 Dec  9 22:51 kioclient5 -> kioclient

The second change was completely removing the X-Desktop-File-Install-Version=5.0 line. I don’t think it is required (although someone with more expertise than me may know more about this).

So this is what my /usr/share/applications/org.kde.kioclient.desktop file now looks like:

[Desktop Entry]
Name=KDE Kioclient (compat)
Exec=kioclient %u
Type=Application
NoDisplay=true

I just did a test run using a script I have which uses xdg-open to open multiple URLs in a browser. Everything worked as it should, and the irritating warning message is now gone.

5 Likes

Reported at bugs.kde.org/show_bug.cgi?id=512650#c3.

Relevant

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.