Qt5.12 QDesktopServices::openUrl not working

This error indicates your app is trying to access the desktop portal, probably to call the OpenURI method. For this to work, there needs to be a xdg-desktop-portal program running as part of your user session. When your snap applcation has to use the desktop plug, it will be allowed to access the interface of the desktop portal.

In your case, I think the problem is that the portal is not running, and could not have been started by dbus activation. Maybe looking at the user journal could help, see journalctl --user could help. Also check ps -ef|grep xdg-desktop.

IIRC, some frameworks implement a fallback mechanism that calls xdg-open. Perhaps Qt does not.

2 Likes