xdg-desktop-portal-gtk icon indicating copy to clipboard operation
xdg-desktop-portal-gtk copied to clipboard

org.freedesktop.portal.Background interface completely missing

Open 266-750Balloons opened this issue 1 year ago • 5 comments

Issue: org.freedesktop.portal.Background interface does not seem to exist with this backend.

Hi. I run Debian Trixie on an AMD64 system with XFCE4. I ran into an issue with a Flatpak program called Emote that was failing to start due to, as the thread later came to the conclusion, a failure to set itself up as a background task due to issues with the Freedesktop API. (See tom-james-watson/Emote#117. While messing around, I saw that the org.freedesktop.portal.Background object was missing from the org.freedesktop.portal.Desktop bus and could not get it to work. After testing in Arch and Fedora VMs, and later the Debian host, I found that installing xdg-desktop-portal-gnome solved the problem, initiating org.freedesktop.portal.Background and allowing the application to start.

Thus, this leads me to conclude that something is missing or wrong in this repository that leads the background interface to not initiate. I think this may have existed since 2020 with issue #296.

266-750Balloons avatar Jul 04 '23 00:07 266-750Balloons

This repo does have the portal if you build with --enable-background. However the reason it was disabled by default is because it was specific to GNOME-Shell and was moved to -gnome.

The portal requires desktop integration to be really useful so it belongs in those implementations.

TingPing avatar Jul 05 '23 02:07 TingPing

I ran into an issue with a Flatpak program called Emote that was failing to start

I would expect it to return an error instead of hanging. But I think that would be a bug for xdg-desktop-portal itself?

TingPing avatar Jul 05 '23 02:07 TingPing

It doesn't hang; It returns what at first glance seems like a type error, but upon further inspection is because of the lack of the Background interface. I wonder if a fallback could be written, either in this or xdg-desktop-portal, for desktops that don't support the interface to instead create a .desktop entry in ~/.config/autostart. Should I start a different bug report upstream?

266-750Balloons avatar Jul 05 '23 04:07 266-750Balloons

You should install the appropriate backend for your desktop environment. It is not a bug that the non-desktop-specific -gtk backend doesn't know your desktop environment's preferred way to set the background.

I wonder if a fallback could be written, either in this or xdg-desktop-portal, for desktops that don't support the interface to instead create a .desktop entry in ~/.config/autostart

I don't think we should get into writing fallback implementations that will "fight" with whatever mechanism your desktop environment wants to use to manage the background.

smcv avatar Jul 10 '23 10:07 smcv