org.freedesktop.portal.OpenURI.OpenDirectory doesn't highlight the selected file

Bug #1978295 reported by Olivier Tilloy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Olivier Tilloy

Bug Description

[Impact]

 * The OpenDirectory method of the OpenURI portal opens a file manager window showing the requested directory, but it doesn't select the passed file in that directory. This affects all users of this API, particularly the chromium and firefox snaps.

 * This is an upstream bug that was fixed in later versions of xdg-desktop-portal, this SRU backports the fix to the 1.6 series that's in focal.

[Test Plan]

 * On a focal machine, install the chromium snap, launch it and download any file from a web page (from e.g. https://kernel.org/)
 * Once the download is complete, browse to chrome://downloads
 * Click the "Show in folder" link for the downloaded file, this opens a Nautilus window showing the contents of the default downloads directory (e.g. $HOME/Downloads)
 * Expected result: the downloaded file is selected in the Nautilus window
 * Actual result without the patch: no file is selected

 * Similarly for the firefox snap, downloading a file and clicking the "Show in Folder" button in the downloads panel should select the downloaded file

 * General functionality of all other portals (including the wallpaper portal) should be thoroughly tested to look out for regressions

[Where problems could occur]

 * The backported patches potentially affect other portals (not just OpenURI), including the Wallpaper portal.
 * Therefore the functionality of all other portals should be thoroughly tested to ensure there are no functional regressions.

[Other Info]

 * The firefox snap wasn't using this API before version 103.0, which at the time of writing this hasn't officially been released yet (it is due for release tomorrow, 2022-07-26). In the meantime it can be installed from the candidate channel.

[Original Description]

This is an upstream issue (https://github.com/flatpak/xdg-desktop-portal/issues/564) that was fixed in xdg-desktop-portal 1.10.0.

I'm proposing to SRU the corresponding patch to focal. This will be especially useful for browsers packaged as snaps (see bug #1887195 for chromium, and https://bugzilla.mozilla.org/show_bug.cgi?id=1772063 for firefox).

Olivier Tilloy (osomon)
Changed in xdg-desktop-portal (Ubuntu):
status: New → Fix Released
Revision history for this message
Olivier Tilloy (osomon) wrote :

The upstream commit doesn't apply cleanly to version 1.6.0 that's in focal.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Given the changes are non-trivial, I'm building them in a PPA to test properly before uploading to the archive: https://launchpad.net/~osomon/+archive/ubuntu/bionic-xdp-fixes.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Very limited testing in a focal VM using the package built in my PPA in conjunction with the chromium snap shows that this works. This will require further testing to ensure there are no regressions elsewhere.

Changed in xdg-desktop-portal (Ubuntu Focal):
assignee: nobody → Olivier Tilloy (osomon)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Olivier Tilloy (osomon) wrote :

I also tested in a focal VM with the firefox snap from the candidate channel (version 103.0-1), and I can confirm that in conjunction with the xdg-desktop-portal backport in that PPA the "Show in Folder" functionality works as expected.

Olivier Tilloy (osomon)
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Olivier, or anyone else affected,

Accepted xdg-desktop-portal into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal/1.6.0-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xdg-desktop-portal (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

> Therefore the functionality of all other portals should be thoroughly tested to ensure there are no functional regressions.

This seems sensible, so, please add this to the Test Plan.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thank you Robie. I have updated the test plan.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : [xdg-desktop-portal/focal] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for focal for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I installed the Chromium snap and verified that the show in folder feature doesn't highlight the downloaded file. I installed xdg-desktop-portal 1.6.0-1ubuntu2, logged out and logged back in and verified that the show in folder feature now works.

I installed the Firefox snap (from the stable channel). The show in folder feature did not work at all with either version of xdg-desktop-portal.

I had difficulty testing whether the Wallpaper portal works. I didn't see Wallpaper in the portal-test snap. I ended up installing the NautilusDevel Flatpak from GNOME Nightly. I know that Nautilus 43+ only uses the Wallpaper portal to set the Wallpaper. I successfully used NautilusDevel to set my Wallpaper.

I believe this fix is verified now.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.6.0-1ubuntu2

---------------
xdg-desktop-portal (1.6.0-1ubuntu2) focal; urgency=medium

  * Cherry-pick an upstream commit and its prerequisites to highlight the
    selected file when invoking tho OpenDirectory method (LP: #1978295)
    - debian/patches/upstream-32da40b-unset-fd-from-requests.patch
    - debian/patches/upstream-9c81f44-real-path-for-doc-path.patch
    - debian/patches/upstream-8f3ab60-opendirectory-fixes.patch

 -- Olivier Tilloy <email address hidden> Fri, 10 Jun 2022 11:10:25 +0200

Changed in xdg-desktop-portal (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for xdg-desktop-portal has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.