How is portals configured on Cachy as it works correctly but not on other distros such as EndeavourOS?

With Bubblejail when I edited the instanceEDITOR=vim bubblejail edit librewolf

and I added [xdg_desktop_portal] in:

[x11]

[network]

[pulse_audio]

[home_share]
home_paths = [
    "Downloads",
]

[direct_rendering]

[notify]

[xdg_desktop_portal]

Portals worked fine on Cachy but not on Endeavour when I did the same thing.

I am getting errors when I checked the status of xdg-desktop-portal on endeavourOS but not on CachyOS

systemctl --user status xdg-desktop-portal
○ xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: inactive (dead)

Jun 14 00:14:27 joe-z97xsoc systemd[2739]: Dependency failed for Portal service.
Jun 14 00:14:27 joe-z97xsoc systemd[2739]: xdg-desktop-portal.service: Job xdg-deskto>
Jun 14 00:14:27 joe-z97xsoc systemd[2739]: Dependency failed for Portal service.
Jun 14 00:14:27 joe-z97xsoc systemd[2739]: xdg-desktop-portal.service: Job xdg-deskto>
Jun 14 00:14:27 joe-z97xsoc systemd[2739]: Dependency failed for Portal service.
Jun 14 00:14:27 joe-z97xsoc systemd[2739]: xdg-desktop-portal.service: Job xdg-deskto>
Jun 14 00:32:42 joe-z97xsoc systemd[2739]: Dependency failed for Portal service.
Jun 14 00:32:42 joe-z97xsoc systemd[2739]: xdg-desktop-portal.service: Job xdg-deskto>
Jun 14 00:35:21 joe-z97xsoc systemd[2739]: Dependency failed for Portal service.
Jun 14 00:35:21 joe-z97xsoc systemd[2739]: xdg-desktop-portal.service: Job xdg-deskto>
lines 1-14/14 (END)

My question is how does CachyOS configure portals? Is it a custom compiled version of xfce which has support for xdg-desktop-portal or something else?

Check: Regression: D-Bus service does not start in MATE (1.21.1) · Issue #1983 · flatpak/xdg-desktop-portal · GitHub

After the latest update, xdg-desktop-portal requires graphical-session.target, which can be a problem in lightweight desktop environments and window managers.

Try:

systemctl --user start xdg-desktop-portal.service --ignore-dependencies

This worked on endeavour, is this what cachyos also does? Where would this be configured for cachyOS?

Modified this file: /usr/lib/systemd/user/xdg-desktop-portal.service to make it this:

[Unit]
Description=Portal service
PartOf=graphical-session.target
Requires=dbus.service
After=dbus.service

[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/lib/xdg-desktop-portal
Slice=session.slice

this works!

Might have been better to create an override with systemctl edit --user xdg-desktop-portal.service` instead of modifying the default system file - this way you don’t have to watch if it has been changed every time you update your system.