QDesktopServices::openUrl() fails when called on local files from within a snap

Bug #1876237 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is something we might want to fix to help people who build snaps based on Focal's Qt.

The QGenericUnixServices implementation of openUrl() passes an O_PATH file descriptor to xdg-desktop-portal when it detects it is running under snap confinement. This is rejected because xdg-desktop-portal expects an O_RDONLY file descriptor, leading to the operation failing. More details are available in the upstream bug report I filed:

https://bugreports.qt.io/browse/QTBUG-83939

This originated from a report on the Snapcraft forum here:

https://forum.snapcraft.io/t/xdg-open-or-gvfs-open-qdesktopservices-openurl-file-somelocation-file-txt-wont-open-the-file/16824?u=jamesh

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.15.9+dfsg-2

---------------
qtbase-opensource-src (5.15.9+dfsg-2) experimental; urgency=medium

  * Bump years for 3rdparty copyright.
  * Backport upstream patch to stop using O_PATH in OpenFile portal
    (LP: #1876237).
  * Add a patch to fix capitalization error in auto-generated qdbusmacros.h
    include (LP: #2016703).
  * Make qtbase5-private-dev suggest packages providing includes which are
    used by some of its headers (closes: #1034830).

 -- Dmitry Shachnev <email address hidden> Sat, 13 May 2023 18:27:14 +0300

Changed in qtbase-opensource-src (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.