Firefox PDF opening with default system application looks different in Ubuntu 26.04 compared to 25.10

Ubuntu Version:
26.04 LTS

Desktop Environment (if applicable):

Gnome

Problem Description:
Firefox (Snap), open a link to a PDF file.

In settings I have to “Use default system default application”, which in my case is “evince”.

In Ubuntu 25.10 clicking on the link would download the file and open it immediately with evince.

In 26.04 I get a dialog to choose among several applications, with Evince highlighted and first in the list. It doesn’t say anything like “Choose this application from now on” or similar.

What I’ve Tried:
Changing to “Ask what to do” and going back to “Use default application”. Reinstalling xdg-desktop-poral-gnome and xdg-desktop-portal and xdg-desktop-portal-gtk.

This is happening in two different computers where I upgraded from 25.10 to 26.04.

It looks like a problem with xdg-desktop-portal but I can’t figure how to return to the previous behavior.

How can I make it to open again directly with Evince and avoid the intermediate dialog?

Evince is not included in Ubuntu 26.04
The Document Viewer is papers 50.1-0ubuntu1

Right click a pdf > Open with Document Viewer

1 Like

@tea-for-one that was my first thought, too. But it shouldn’t really matter. When evince is installed and the preferred system default, which is the user’s prerogative to change at will, then there should be no difference.

I think this could be a bug with how that setting is supposed to be persisted in Firefox. Or Firefox consistently fails to recognize what the “default system viewer” is and falls back to asking every time. Any fancy snap connections, @wgarcia?

snap connections firefox

That dialog comes from a portal, not sure how to tell portals to remember the selection or not ask for choosing though… (snap connections won’t help here I fear)

I guess a bug should be opened against the xdg-portal package

1 Like

In-situ upgrade?
Or download iso and fresh installation?

My guess is an in-situ upgrade because papers 48.0-1ubuntu1 is the default in Ubuntu 25.10.
Was evince still the default application from an even earlier installation?

You have to choose Evince (or whatever pdf viewer you choose) 3 times before xdg-desktop-portal believes you and saves your choice.

1 Like

Sorry, I forgot to tell this was an upgrade from 25.10 to 26.04, not a clean installation. I always do in situ upgrades, right now I have 3 computers with Ubuntu , and I upgraded two of them (in situ) from 25.10 to 26.04. In both I observe the same, the PDF viewer (in my case Evince, just inertia since these systems have been upgraded several times) does not open directly as before, I get this long list of options with Evince highlighted first in the list.

You have to choose Evince (or whatever pdf viewer you choose) 3 times before xdg-desktop-portal believes you and saves your choice.

I tried this and and the dialog keeps popping up beyond 3 times of choosing the same PDF viewer.

What output do you get with the following command?

$ xdg-mime query default application/pdf

Also, do you have flatpak installed? If so, use the following command and show its output:

$ flatpak permission-show snap.firefox

If flatpak not installed, use this longish command:

$ gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.Lookup "desktop-used-apps" "application/pdf"

No flatpaks several kilometers around, and these are the outputs:

$ xdg-mime query default application/pdf

org.gnome.Evince.desktop

and:

$ gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.Lookup “desktop-used-apps” “application/pdf”

({‘snap.firefox’: [‘org.gnome.Evince’, ‘1’, ‘3’]}, <byte 0x00>)

I filed a bug report against xdg-desktop-portal-gnome:

Please if anybody else is seeing this check “I’m affected” in this bug.

2 Likes

Right. Although when troubleshooting xdg-desktop-portal permissions, it’s a lot easier using the flatpak command rather than long gdbus commands.

$ flatpak permission-show snap.firefox
Table             Object                          App          Permissions          Data
webextensions     org.keepassxc.keepassxc_browser snap.firefox yes                  0x00
desktop-used-apps application/pdf                 snap.firefox org.gnome.Evince,3,3 0x00

Snap should have something like this.

Anyway, your output shows that xdg-desktop-portal has only recorded 1 outta the 3 attempts it needs to make the your choice persistent. So to bypass xdg-desktop-portal, you can set it directly with the following command.

gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.SetPermission "desktop-used-apps" true "application/pdf" "snap.firefox" "['org.gnome.Evince', '3', '3']"

I deleted the permission from the permission store and used the above gdbus command to set it and it worked. No prompt. Hopefully, it’ll work for you too.

2 Likes

So you were getting also the dialog?

Anyway, I don’t think snaps are involved at all with this, it looks like something directly related with xdg-desktop-portal.

I deleted the permission with:

gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/ freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.Delete “desktop-used-apps” “application/pdf”

After this, the command that you suggested to check this permission:

gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.Lookup “desktop-used-apps” “application/pdf”

shows:

Error: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for application/pdf

So I use your second command:

gdbus call --session --dest org.freedesktop.impl.portal.PermissionStore --object-path /org/freedesktop/impl/portal/PermissionStore --method org.freedesktop.impl.portal.PermissionStore.SetPermission “desktop-used-apps” true “application/pdf” “snap.firefox” “[‘org.gnome.Evince’, ‘3’, ‘3’]”

And now the previous than last command shows:

({‘snap.firefox’: [‘org.gnome.Evince’, ‘3’, ‘3’]}, <byte 0x00>)

but the dialog keeps popping up in Firefox in my case, so this workaround has not worked for me.

I wonder if there might be some silent crashes of the portal, which thus fails to record the number of attempts properly; or start from 0 after a crash. I have journalctl --follow running permanently and do see some crashes of portals sometimes, without a more visible indication to the user. Granted, most of the time it’s my own doing causing those crashes, like restarting PipeWire/WirePlumber, but maybe there can be other circumstances.

Disappointng. One more thing and then I’m all out ideas. That should have worked if xdg-desktop-portal is able to read the files (specially desktop-used-apps) in ~/.local/share/flatpak/db/

One thing that would aid in troubleshooting is installing the flatpak executable for the simple reason that it’s much easier to use than constructing syntactically fragile gdbus commands.

Fortunately, for our purposes it’s not required that you install the full flatpak package, but just the flatpak executable from it. This is how I have it on my system.

  1. $ sudo apt install libostree-1-1 --no-install-recommends required by flatpak
  2. $ apt download flatpak to fetch flatpak package
  3. Extract flatpak binary from deb package into current directory
    $ dpkg-deb --fsys-tarfile flatpak_1.16.6-1_amd64.deb |tar -xvf - --strip-components=3 ./usr/bin/flatpak
  4. move flatpak binary to ~/bin directory. If you don’t have ~/bin, create it.

Now with the flatpak executable in your $PATH, you can use it to read and edit values within the permissionstore.

First, delete snap.firefox permission for application/pdf handler
$ flatpak permission-remove desktop-used-apps application/pdf snap.firefox
Confirm it’s gone
$ flatpak permission-show snap.firefox

We could use flatpak to add the permission back, but that won’t tell us why xdg-desktop-portal is apparently failing to do it or why its not reading the values stored.

So let’s try this:

  1. Close all snap user applications you have opened including firefox. Anything that uses xdg-desktop-portal should be closed. Goal is to minimize debug output specifically to firefox’s interaction with xdg-desktop-portal
  2. In a terminal, execute ~$ /usr/libexec/xdg-desktop-portal -v -r 2>&1 |tee portal-debug.txt
  3. While that’s running, open firefox and choose and open a pdf link.
  4. When the xdg-desktop-portal dialog appears choose Evince (Document Viewer) and let it open the pdf.
  5. Close evince and firefox. Switch to terminal an enter Ctrl-C to quit the xdg-desktop-portal program.
  6. Examine the portal-debug.txt file and look at the entries towards the very bottom:
portal-debug.txt
XDP: Looking for portals configuration in '/home/gpmitch/.config/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/home/gpmitch/.config/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/home/gpmitch/.config/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-ubuntu-wayland/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-ubuntu-wayland/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-ubuntu-wayland/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/home/gpmitch/.local/share/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/home/gpmitch/.local/share/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/home/gpmitch/.local/share/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/usr/share/ubuntu-wayland/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/usr/share/ubuntu-wayland/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/usr/share/ubuntu-wayland/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/usr/share/gnome/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/usr/share/gnome/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/usr/share/gnome/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/gnome-portals.conf'
XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/portals.conf'
XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/ubuntu-portals.conf'
XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/gnome-portals.conf'
XDP: Preferred portals for interface 'default': gnome, gtk
XDP: Preferred portals for interface 'org.freedesktop.impl.portal.Secret': gnome-keyring
XDP: Using portal configuration file '/usr/share/xdg-desktop-portal/gnome-portals.conf' for desktop 'gnome'
XDP: load portals from /usr/share/xdg-desktop-portal/portals
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
XDP: portal implementation supports org.freedesktop.impl.portal.Secret
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome.portal
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: portal implementation supports org.freedesktop.impl.portal.Account
XDP: portal implementation supports org.freedesktop.impl.portal.AppChooser
XDP: portal implementation supports org.freedesktop.impl.portal.Background
XDP: portal implementation supports org.freedesktop.impl.portal.Clipboard
XDP: portal implementation supports org.freedesktop.impl.portal.DynamicLauncher
XDP: portal implementation supports org.freedesktop.impl.portal.FileChooser
XDP: portal implementation supports org.freedesktop.impl.portal.InputCapture
XDP: portal implementation supports org.freedesktop.impl.portal.Lockdown
XDP: portal implementation supports org.freedesktop.impl.portal.Print
XDP: portal implementation supports org.freedesktop.impl.portal.RemoteDesktop
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.Settings
XDP: portal implementation supports org.freedesktop.impl.portal.Wallpaper
XDP: loading /usr/share/xdg-desktop-portal/portals/gtk.portal
XDP: portal implementation supports org.freedesktop.impl.portal.FileChooser
XDP: portal implementation supports org.freedesktop.impl.portal.AppChooser
XDP: portal implementation supports org.freedesktop.impl.portal.Print
XDP: portal implementation supports org.freedesktop.impl.portal.Notification
XDP: portal implementation supports org.freedesktop.impl.portal.Inhibit
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: portal implementation supports org.freedesktop.impl.portal.Account
XDP: portal implementation supports org.freedesktop.impl.portal.Email
XDP: portal implementation supports org.freedesktop.impl.portal.DynamicLauncher
XDP: portal implementation supports org.freedesktop.impl.portal.Lockdown
XDP: portal implementation supports org.freedesktop.impl.portal.Settings
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Lockdown (config)
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Settings (config)
XDP: Found 'gtk' in configuration for default
XDP: Using gtk.portal for org.freedesktop.impl.portal.Settings (config)
XDP: providing portal org.freedesktop.portal.Settings
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.FileChooser (config)
XDP: providing portal org.freedesktop.portal.FileChooser
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.AppChooser (config)
XDP: providing portal org.freedesktop.portal.OpenURI
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Print (config)
XDP: providing portal org.freedesktop.portal.Print
XDP: Found 'gtk' in configuration for default
XDP: Using gtk.portal for org.freedesktop.impl.portal.Notification (config)
XDP: providing portal org.freedesktop.portal.Notification
XDP: Found 'gtk' in configuration for default
XDP: Using gtk.portal for org.freedesktop.impl.portal.Inhibit (config)
XDP: providing portal org.freedesktop.portal.Inhibit
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Access (config)
XDP: providing portal org.freedesktop.portal.Device
XDP: providing portal org.freedesktop.portal.WebExtensions
XDP: providing portal org.freedesktop.portal.Location
XDP: providing portal org.freedesktop.portal.Camera
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Screenshot (config)
XDP: providing portal org.freedesktop.portal.Screenshot
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Background (config)
XDP: Starting background app monitor
XDP: providing portal org.freedesktop.portal.Background
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Wallpaper (config)
XDP: providing portal org.freedesktop.portal.Wallpaper
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Account (config)
XDP: using org.freedesktop.impl.portal.Account at org.freedesktop.impl.portal.desktop.gnome

XDP: providing portal org.freedesktop.portal.Account
XDP: Found 'gtk' in configuration for default
XDP: Using gtk.portal for org.freedesktop.impl.portal.Email (config)
XDP: providing portal org.freedesktop.portal.Email
XDP: Found 'gnome-keyring' in configuration for org.freedesktop.impl.portal.Secret
XDP: Using gnome-keyring.portal for org.freedesktop.impl.portal.Secret (config)
XDP: providing portal org.freedesktop.portal.Secret
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.DynamicLauncher (config)
XDP: providing portal org.freedesktop.portal.DynamicLauncher
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.ScreenCast (config)
XDP: providing portal org.freedesktop.portal.ScreenCast
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.RemoteDesktop (config)
XDP: providing portal org.freedesktop.portal.RemoteDesktop
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.Clipboard (config)
XDP: providing portal org.freedesktop.portal.Clipboard
XDP: Found 'gnome' in configuration for default
XDP: Using gnome.portal for org.freedesktop.impl.portal.InputCapture (config)
XDP: providing portal org.freedesktop.portal.InputCapture
XDP: org.freedesktop.portal.Desktop acquired
XDP: Running: snap routine portal-info 28434
XDP: Running app windows changed, wake up monitor thread
XDP: webextensions session owned by ':1.275' created
XDP: Checking background permissions
XDP: Checking background permissions
XDP: document portal returned empty doc id for path '/home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf'
XDP: OpenFile: translating path value '/home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf' to host path '/home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf'
XDP: Content type for file /home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf: application/pdf
XDP: Default handler org.gnome.Evince for file, application/pdf
XDP: Recommended handlers for file, application/pdf: wine, org.gnome.Evince, chromium_chromium, vivaldi_vivaldi-stable, display-im6.q16, chromium_daemon, firefox_firefox, gimp_gimp, libreoffice_draw
XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: (null)
XDP: Opening app chooser
XDP: Received choice org.gnome.Evince
XDP: Launching org.gnome.Evince file:///home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf
XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: updating permissions for snap.firefox: content-type application/pdf, handler org.gnome.Evince, count 1 / 3
XDP: Read org.freedesktop.appearance color-scheme
XDP: Read org.freedesktop.appearance contrast
XDP: Running app windows changed, wake up monitor thread

Specifically this section:

XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: (null)
XDP: Opening app chooser
XDP: Received choice org.gnome.Evince
XDP: Launching org.gnome.Evince file:///home/gpmitch/Downloads/SUL_Marketplace_Cooking-Instructions_Final.pdf
XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: updating permissions for snap.firefox: content-type application/pdf, handler org.gnome.Evince, count 1 / 3

xdg-desktop-portal looks to see if there’s an entry for snap.firefox on how to handle application/pdf. Doesn’t find one, but is aware that the application/pdf files are default handled by Evince, so it selects it by default and opens it and passes the pdf URI when user chooses it. It reports count of 0 for how many times this has occurred before. Always ask is set to 0 or false. If evince launch is successful it increments the count successfully.

Look over the file here and see if it matches what you see on your system. The only things that should be that different is the pdf file to open and home directory paths.

Yeah, I’m wondering that too. Since it always provide a prompt when opening a pdf, it’s either crashes and restarts, or it having trouble reading/editing the permissionstore. That might be because of file corruption, or corrupted values in the files, or a permission issue. xdg-desktop-portal might try read the permissionstor and failing that just moves on and logs an error.

Hopefully getting some debug output from xdg-desktop-portal will shed some light on the issue.

So I tried this:

I didn’t close all running snaps. Here is the part of the command starting from the point when I opened Firefox, and showing the messages when I opened a PDF file, clicking “Evince” in the dialog offering me all the applications (Papers, Inskcape and a lot others, including Firefox itself). At the end I closed Firefox:

XDP: Running app windows changed, wake up monitor thread
XDP: Checking background permissions
XDP: No background permissions found: No entry for background
XDP: Checking background permissions
XDP: No background permissions found: No entry for background
XDP: Found XdpAppInfo in cache: io.snapcraft app ‘firefox_firefox’ for :1.527
XDP: Content type for file /home/wgarcia/Downloads/worksheet-89.pdf: application/pdf
XDP: Default handler org.gnome.Evince for file, application/pdf
XDP: Recommended handlers for file, application/pdf: org.gnome.Papers, AdobeReader, atril, com.google.Chrome, gimp, google-chrome, libreoffice-draw, org.gnome.Evince, org.inkscape.Inkscape, display-im7.q16, acrordrdc_acrordrdc, chromium_chromium, chromium_daemon, firefox_firefox
XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: (null)
XDP: Opening app chooser
XDP: Received choice org.gnome.Evince
XDP: Launching org.gnome.Evince file:///home/wgarcia/Downloads/worksheet-89.pdf
XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
XDP: updating permissions for firefox_firefox: content-type application/pdf, handler org.gnome.Evince, count 1 / 3
XDP: Adding XdpAppInfo: XdpAppInfoHost app ‘’ for :1.533
XDP: Found XdpAppInfo in cache: XdpAppInfoHost app ‘’ for :1.533
XDP: inhibit session owned by ‘:1.533’ created
XDP: Received state-changed /org/freedesktop/portal/desktop/session/1_533/gtk1348461691: screensaver-active: 0, session-state: 1
XDP: Found XdpAppInfo in cache: XdpAppInfoHost app ‘’ for :1.533
XDP: Read org.freedesktop.appearance color-scheme
XDP: Found XdpAppInfo in cache: XdpAppInfoHost app ‘’ for :1.533
XDP: Read org.freedesktop.appearance contrast
XDP: Found XdpAppInfo in cache: XdpAppInfoHost app ‘’ for :1.533
XDP: Read org.freedesktop.appearance accent-color
XDP: Found XdpAppInfo in cache: XdpAppInfoHost app ‘’ for :1.533
XDP: Read org.gnome.desktop.interface gtk-theme
XDP: inhibit session owned by ‘:1.533’ closed
XDP: Deleting XdpAppInfo: XdpAppInfoHost app ‘’ for :1.533
XDP: Running app windows changed, wake up monitor thread
XDP: Deleting XdpAppInfo: io.snapcraft app ‘firefox_firefox’ for :1.527
XDP: Checking background permissions
XDP: No background permissions found: No entry for background

If I keep opening the PDF file and closing it, at some point it shows again 0 / 3 and goes to 1 / 3, but it never goes above 1.

1 Like

I’ve narrowed down the package where the problem first occurs. However, the problem is in the xdg-desktop-portal package and not in the xdg-desktop-portal-gnome package. I’m not sure what you’ll need to do to move the report from xdg-desktop-portal-gnome to xdg-desktop-portl. Maybe just file a new bug report.

Specifically, the problem cropped up in xdg-desktop-portal-1.21.0+ds-1ubuntu4. xdg-desktop-portal-1.21.0+ds-1ubuntu3 works correctly.

And the diff between 3 and 4 indicates there were a lot of patches that address snap permissions, so one or more of those patches are likely responsible.

As workaround, you can downgrade to xdg-desktop-portal-1.21.0+ds-1ubuntu3 by downloading the package from here

Then in the directory you downloaded it too, use the following command:

$ sudo apt -s install --allow-downgrades ./xdg-desktop-portal_1.21.0+ds-1ubuntu3_amd64.deb

If apt doesn’t report an error, then remove “-s” and rerun the command.

Afterwards, you can pin the version or use apt-mark to put a hold on it to prevent it upgrading back to the current broken version.

Thanks for your comments, @gpmitch . The version that I have is not the one that you say, it is:

apt-cache policy xdg-destkop-portal

xdg-desktop-portal:
  Installed: 1.21.1+ds-1ubuntu3
  Candidate: 1.21.1+ds-1ubuntu3
  Version table:
 *** 1.21.1+ds-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages
        100 /var/lib/dpkg/status

I downgraded anyway to

xdg-desktop-portal_1.21.0+ds-1ubuntu3_amd64.deb

as @gpmitch suggested, but the problem subsists.

@gpmitch: I would appreciate if 1) you confirm this bug in the launchpad bug report if you can reproduce it (I changed the package to xdg-desktop-portal), 2) if you want to continue this exchange, we continue in launchpad, as doing things like downgrading packages should in my opinion not be suggested to users in general that may not know the consequences and impact of using these outdated packages in their systems. Instead in launchpad it makes perfect sense to suggest this type of things.

I didn’t say that the problem occurred with the current version in the repo, but the bug did carry over to it. The bug appeared in version 1.21.0+ds-1ubuntu4 and has been present in subsequent updates.

The workaround does work. I’ve confirmed it. I could produce evidence that is does with debug logs, screen captures, etc. However since it didn’t work for you, then there may be something on else at play on you system that’s preventing from it from working.

If the workaround I suggested doesn’t work, then I would advise filing a bug report and wait for a fix. That’s the advice I would give to an inexperienced, general user.

Since you’ve already filed a bug report, and since I’m not an affected user (I run 26.04 in a vm mainly for troubleshooting purposes to help other Ubuntu users) of the bug, I’ll end my participation on this topic here.

Sorry the workaround didn’t work out for you.