Xfce Forum

Sub domains
 

You are not logged in.

#1 2026-06-17 04:54:48

Mana
Member
Registered: 2025-01-02
Posts: 13
LinuxFirefox 151.0

Issues with: xdg-desktop-portal & graphical-session.target

I'm on EndeavourOS (XFCE4 | systemd)

Clicking links in Flatpak apps (e.g. Vesktop) does nothing. xdg-open works fine from the terminal, so the issue was specific to Flatpak.
Both xdg-desktop-portal and xdg-desktop-portal-gtk are installed but are not running — they fail to start with "Dependency failed" and "Current graphical user session is inactive" in the logs.

xdg-desktop-portal requires graphical-session.target to be active before it starts. On GNOME and KDE, the session manager automatically activates this systemd target at login. XFCE does not, so the portal waits forever and never starts, silently dropping all link-open requests from my Flatpak apps.

Below are the duct tape solutions I came up with, for now...

Shadow the system unit file to remove the graphical-session.target dependency:

cp /usr/lib/systemd/user/xdg-desktop-portal.service ~/.config/systemd/user/ && grep -v 'graphical-session' ~/.config/systemd/user/xdg-desktop-portal.service > /tmp/xdgportal.tmp && mv /tmp/xdgportal.tmp ~/.config/systemd/user/xdg-desktop-portal.service && systemctl --user daemon-reload

Add the portal to autostart so it launches at login:

mkdir -p ~/.config/autostart && printf '[Desktop Entry]\nType=Application\nName=XDG Desktop Portal\nExec=systemctl --user start xdg-desktop-portal xdg-desktop-portal-gtk\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\n' > ~/.config/autostart/xdg-portal.desktop

Set the portal backend explicitly for XFCE:

mkdir -p ~/.config/xdg-desktop-portal && printf '[preferred]\ndefault=gtk\norg.freedesktop.impl.portal.OpenURI=gtk\n' > ~/.config/xdg-desktop-portal/portals.conf

Once the portal started working, Firefox began reading theme information through it. The portal reads from GSettings (org.gnome.desktop.interface) rather than XFCE's xsettings, and GSettings was empty on a fresh install, causing Firefox's titlebar/toolbar to appear with wrong colors. Fix:

gsettings set org.gnome.desktop.interface gtk-theme 'Your-Theme-Name'
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

The real fix would be XFCE properly activating graphical-session.target at login, like GNOME and KDE do.
Until XFCE implements full systemd session management, this workaround appears to be necessary.

Does anyone know of a better solution to these issues?

Added later 3 h 19 min 59 s:
It seems to be a larger issue
https://bbs.archlinux.org/viewtopic.php … 9#p2300839
https://forum.endeavouros.com/t/bug-in-cinnamon/80193

Last edited by Mana (2026-06-17 05:03:35)

Offline

#2 2026-06-18 09:17:11

bggf
Member
Registered: 2026-04-13
Posts: 35
Windows 10Firefox 139.0

Re: Issues with: xdg-desktop-portal & graphical-session.target

hhmm not using flatpak myself, but I'm wondering if simply putting the "Exec" lines of the  xdg-desktop-portal and xdg-desktop-portal-gtk services into a ".xsessionrc" file in your $HOME works (perhaps you have to create the file) .
If you have desktop files for the portals, then you can use a "gtk-launch <>.desktop" (try this on CLI first.., not sure if Endevour has gtk-launch or gio..to execute .desktops.)

Offline

#3 2026-06-18 14:21:44

Mana
Member
Registered: 2025-01-02
Posts: 13
LinuxFirefox 151.0

Re: Issues with: xdg-desktop-portal & graphical-session.target

Looks like xdg-desktop-portal was just updated. Haven’t had a chance to test yet: https://gitlab.archlinux.org/archlinux/ … mmits/main

Edit: The update didn't address this issue.  sad

Last edited by Mana (2026-06-18 15:40:25)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 545.74 KiB (Peak: 550.72 KiB) ]