Recently, I was fighting with FF desktop sharing feature [1], which did not work. It turns out this was caused by missing xdg-desktop-portal-gnome package, what was not obvious. I think there are two possible areas of improvement:
$ sudo dnf repoquery --whatdepends xdg-desktop-portal-gnome Last metadata expiration check: 1:10:14 ago on Mon Apr 4 16:27:48 2022. flameshot-0:11.0.0-3.fc36.x86_64 telegram-desktop-0:3.6.1-1.fc37.x86_64
Maybe all the xdg-desktop-portal implementation should have some common virtual provide and all the users, such as FF, should depend on this provide?
My vote would be for Firefox to have Recommends: xdg-desktop-portal-gtk and for gnome-shell to have Recommends: xdg-desktop-portal-gnome
Recommends: xdg-desktop-portal-gtk
Recommends: xdg-desktop-portal-gnome
Do we not have the portal backend in comps? We don't need applications recommending backends, we need desktops doing it.
My vote would be for Firefox to have Recommends: xdg-desktop-portal-gtk
But this would be apparently not enough, because having xdg-desktop-portal-gtk is not enough to have the desktop sharing working. So there should be Recommends: xdg-desktop-portal-gtk xdg-portal(dekstop-specific-implementation), where the virtualxdg-portal(dekstop-specific-implementation) would be provided by the desktop specific implementations.
Recommends: xdg-desktop-portal-gtk xdg-portal(dekstop-specific-implementation)
xdg-portal(dekstop-specific-implementation)
and for gnome-shell to have Recommends: xdg-desktop-portal-gnome
This would be certainly welcome.
Do we not have the portal backend in comps?
This is good for installation and good to make really sure that the package is installed on fresh system although it is just recommended elsewhere. It won't help for systems which were installed a while ago.
We don't need applications recommending backends, we need desktops doing it.
I think the dependency list should always be complete (or as complete as possible). We should not assume any dependency. We've been there, assuming a lot of stuff in e.g. buildroot and we subsequently replaced this assumptions by explicit dependencies (gcc, make).
However, I have no idea how the portal works and as I said, one of the issues is that I don't think there was any clue which would pointed out that the xdg-desktop-portal-gnome is missing. Probably something to improve upstream, but what would be the right place to report such RFE?
Currently, xdg-desktop-portal-gtk has:
xdg-desktop-portal-gtk
%if 0%{?fedora} # Use rich deps to pull in this package when gtk3 and flatpak (or snapd) are both installed Supplements: (gtk3 and (flatpak or snapd)) %endif
... and xdg-desktop-portal-gnome has:
xdg-desktop-portal-gnome
# Use rich deps to pull in this package when gnome-shell and flatpak (or snapd) are both installed Supplements: (gnome-shell and (flatpak or snapd))
Hi, this won't work because not all portal backends correspond to desktops. E.g. xdg-desktop-portal-gtk is needed if you run GTK apps regardless of which desktop you're using. GNOME users need both -gnome and -gtk. Etc. Virtual provides would need to be more complicated than this: we'd need one virtual provides for each portal backend, and Firefox would need to declare exactly which portal backends it needs.
I was going to say: "it's a lot easier to just add Recommends where they're really needed. For xdg-desktop-portal-gnome, that's surely gnome-shell. Perhaps for xdg-desktop-portal-gtk that should be gtk3 and gtk4 rather than passing the burden to Firefox and other apps." But it seems the Supplements we currently have work too. The problem here IMO is that the portals are nowadays needed even if the user does not have flatpak or snap. E.g. anything that uses WebKit needs portals. I suspect Firefox needs the portal for screen sharing even if not running under flatpak/snap. So how about we remove the "and (flatpak or snapd)" condition from those Supplements?
The best you're going to get is a D-Bus error. How applications choose to handle that error is up to them.
So how about we remove the "and (flatpak or snapd)" condition from those Supplements?
Fine with me, if that gets the job done. Feel free to commit directly to xdg-desktop-portal-gtk and xdg-desktop-portal-gnome.
I have also been puzzled by why the Supplements are Fedora-specific. Is there any reason to not have them in RHEL? But I suppose that's a different topic.
They are surely needed in RHEL too. Let's drop those.
Vit, are you OK with this resolution? If so, I can spin new builds.
But this would be apparently not enough, because having xdg-desktop-portal-gtk is not enough to have the desktop sharing working. So there should be Recommends: xdg-desktop-portal-gtk xdg-portal(dekstop-specific-implementation), where the virtualxdg-portal(dekstop-specific-implementation) would be provided by the desktop specific implementations. Hi, this won't work because not all portal backends correspond to desktops. E.g. xdg-desktop-portal-gtk is needed if you run GTK apps regardless of which desktop you're using. GNOME users need both -gnome and -gtk. Etc. Virtual provides would need to be more complicated than this: we'd need one virtual provides for each portal backend, and Firefox would need to declare exactly which portal backends it needs.
Please note that
Recommends: xdg-desktop-portal-gtk xdg-portal(dekstop-specific-implementation)`
corresponds to
Recommends: xdg-desktop-portal-gtk Recommends: xdg-portal(dekstop-specific-implementation)`
So I think we are on the same page here.
I think that adding the g-s recommends and improving the xdg-desktop-portal-gnome Supplements should make the situation much more readable. Thx.
Supplements
I'll followup with FF if the DBus error could be somehow reported.
I'll also followup with DNF, because I don't understand why the Supplements are not reported by --whatdepends.
--whatdepends
https://bugzilla.redhat.com/show_bug.cgi?id=2072413
I don't have permission to push to xdg-desktop-portal-gtk. Created PR here. Rishi, please consider granting commit access to gnome-sig here.
xdg-desktop-portal-gnome change landed here. I've built it only for rawhide, to avoid update churn in F36, but it should be fine there too if desired.
Rishi, please consider granting commit access to gnome-sig here.
Done. I wonder if I should've gone all the way and granted admin.
admin
Submitted an update for Fedora 36: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9095c8b25c
It seems worthwhile to ensure that screen sharing works reliably in applications like Firefox. In fact, I am wondering if we should do the same for Fedora 35.
If there's a BZ to attach to it, please do so and nominate it for freeze exception.
Bugs: xdg-desktop-portal-gtk: https://bugzilla.redhat.com/show_bug.cgi?id=2074187 xdg-desktop-portal-gnome: https://bugzilla.redhat.com/show_bug.cgi?id=2074189
So, shall we do it for Fedora 35 too? I don't feel knowledgeable enough to balance the pros and cons.
Other than that, is there anything left to address in this issue?
Let's close this.
So, shall we do it for Fedora 35 too?
It makes sense to do. GNOME users always want xdg-desktop-portal-gnome. As long as the dependency is conditional on gnome-shell, it should be fine.
Metadata Update from @catanzaro: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
(I would be more cautious about changing xdg-desktop-portal-gtk in F35, just in case users of GTK might legitimately not want it installed.)
So, shall we do it for Fedora 35 too? It makes sense to do. GNOME users always want xdg-desktop-portal-gnome. As long as the dependency is conditional on gnome-shell, it should be fine.
Done: https://bodhi.fedoraproject.org/updates/FEDORA-2022-594405302f
Login to comment on this ticket.