Bug 2481764 - xdg-desktop-portal.service can no longer start in DEs which don't reach graphical-session.target
Summary: xdg-desktop-portal.service can no longer start in DEs which don't reach graph...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-desktop-portal
Version: 44
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: David King
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/flatpak/xdg-deskto...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-05-27 03:57 UTC by Fernando Datz
Modified: 2026-06-20 23:58 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fernando Datz 2026-05-27 03:57:30 UTC
When graphical-session.target is inactive, xdg-desktop-portal.service cannot be started, even manually, failing with:
xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'. 

This breaks access to desktop features in applications that need the portal running, such as those inside Flatpaks.

Reproducible: Always

Steps to Reproduce:
1. Start an XFCE/Cinnamon/MATE session
2. Check status with `systemctl --user status graphical-session.target xdg-desktop-portal.service`
3. Try to start the service, or open e.g. a file chooser in an application that depends on the portal
Actual Results:
Both units show as inactive. The portal service cannot be started and access to files or applications through the portal is not available.

Expected Results:
xdg-desktop-portal.service should start successfully when requested.

Additional Information:
The commit below has made xdg-desktop-portal have `Requisite=graphical-session.target`, which is never reached in some environments:
https://github.com/flatpak/xdg-desktop-portal/commit/4d284de29d1d0740c9b80b634631a8f253287680

This effectively breaks access to user files from inside Flatpaks in those environments.

I noticed this after upgrading to F44, which packages versions 1.21.0 and above (affected by this commit), when the file chooser for Firefox Flatpak only showed the sandbox FS and could not access the host FS, except for the paths already allowed in its metadata file (like ~/Downloads). In fact, Firefox warned about being unable to start the portal when run from the terminal with this warning:

WARNING: Failed to call SchemeSupported method: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer 'org.freedesktop.portal.Desktop': startup job failed

This is a known issue with some workarounds in the wild like:
https://github.com/NixOS/nixpkgs/blob/fb17f63ca5c1fc347de1f49974d823d465f771f7/nixos/modules/services/x11/display-managers/default.nix#L38-L60
and:
https://salsa.debian.org/debian/xdg-desktop-portal/-/blob/51290686fd795daaea131c35efd3ee395d42d976/debian/patches/ubuntu/allow-no-graphical-session-target.patch

For now, I have partially rolled that commit back by using the Ubuntu patched version of the service unit configuration as a full drop-in with:
systemctl --user --full edit xdg-desktop-portal.service

I can only confirm this issue in XFCE, but judging by upstream issue #1983, it also affects Hyprland, Cinnamon, and MATE. This will not be fixed upstream, however, as it's the result of a bugfix and working as intended.

It seems the only supported way of solving this is making every one of those environments reach graphical-session.target, perhaps through a dummy target. Would it be reasonable to partially revert that commit for now, as in Ubuntu, to avoid leaving the portal service broken in the meantime?


Note You need to log in before you can comment on or make changes to this bug.