Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2079194

Summary: per window screensharing does not work with xdg-desktop-portal-gnome installed
Product: Red Hat Enterprise Linux 9 Reporter: Martin Krajnak <mkrajnak>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.1CC: adam.winberg, jadahl, jgrulich, rstrode, tpelka, tpopela
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-shell-40.10-4.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2144743 (view as bug list) Environment:
Last Closed: 2023-05-09 07:41:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2144743    

Description Martin Krajnak 2022-04-27 07:39:52 UTC
Description of problem:
I  tried multiple scenarios with 'xdg-desktop-portal*' packages, the outcome is that windows of individual applications cannot be shared under wayland as there is no application shown in the window list provided by portal.

Individual window sharing works when:
Any version of xdg-desktop-portal-gtk and xdg-desktop-portal are installed.

Individual window sharing does NOT work when:
we install xdg-desktop-portal-gnome-41.1-3.el9.x86_64


Version-Release number of selected component (if applicable):
xdg-desktop-portal-gnome-41.1-3.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1.Open firefox
2.go to https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/#9280247760099046
3. Click Share Your screen
4. Click on Single Window

Actual results:
No application window is in the list.

Expected results:
The list of windows should be shown

Additional info:
This scenario works on latest rawhide with:
xdg-desktop-portal-1.12.4-1.fc37.x86_64
xdg-desktop-portal-gtk-1.12.0-5.fc37.x86_64
xdg-desktop-portal-gnome-42.0.1-4.fc37.x86_64

Comment 1 Martin Krajnak 2022-06-02 11:14:12 UTC
I can still reproduce this with xdg-desktop-portal-gnome-41.2-1.el9.x86_64

Comment 2 Martin Krajnak 2022-06-02 12:00:24 UTC
I don't know what changes, but it looks like now the workaround with erasing xdg-desktop-portal-gnome does not work anymore. 

When I delete the package, reboot the PC, the portal dialog is not spawned at all,
is there a way to debug this ? I see no background crashes in journal.

xdg-desktop-portal-1.12.4-1.el9.x86_64
xdg-desktop-portal-gtk-1.12.0-3.el9.x86_64
firefox-91.10.0-1.el9.x86_64

Everything is working after reverting back to:
xdg-desktop-portal-1.12.3-1.el9.x86_64
xdg-desktop-portal-gtk-1.12.0-2.el9.x86_64 + when I add xdg-desktop-portal-gnome-41.2-1.el9.x86_64, the dialog is spawning but as before the is no list of windows.

Comment 3 Debarshi Ray 2022-06-02 12:15:23 UTC
(In reply to Martin Krajnak from comment #2)

Thanks a lot for continuing to poke into this, Martin!

> I don't know what changes, but it looks like now the workaround with erasing
> xdg-desktop-portal-gnome does not work anymore. 
> 
> When I delete the package, reboot the PC, the portal dialog is not spawned
> at all,
> is there a way to debug this ? I see no background crashes in journal.

I can't think of anything off the top of my head.  I would start debugging this by using something like 'dbus-monitor --session --monitor' to see the D-Bus traffic, and then try to follow the thread from there.  Since things are working on Fedora, I would compare the behaviour between Fedora and RHEL to narrow things down.

Comment 4 Martin Krajnak 2022-06-02 12:34:26 UTC
   string "type='signal',sender='org.freedesktop.portal.Desktop',interface='org.freedesktop.portal.ScreenCast',path='/org/freedesktop/portal/desktop'"
method return time=1654173221.388868 sender=org.freedesktop.DBus -> destination=:1.110 serial=4294967295 reply_serial=256
method call time=1654173221.388886 sender=:1.110 -> destination=org.freedesktop.DBus serial=257 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0='org.freedesktop.portal.Desktop'"
method return time=1654173221.388893 sender=org.freedesktop.DBus -> destination=:1.110 serial=4294967295 reply_serial=257
method call time=1654173221.388944 sender=:1.110 -> destination=org.freedesktop.DBus serial=258 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
   string "org.freedesktop.portal.Desktop"
   uint32 0
method return time=1654173221.388953 sender=org.freedesktop.DBus -> destination=:1.110 serial=4294967295 reply_serial=258
   uint32 2
method call time=1654173221.396183 sender=:1.110 -> destination=org.freedesktop.DBus serial=259 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.freedesktop.portal.Desktop"
method return time=1654173221.396199 sender=org.freedesktop.DBus -> destination=:1.110 serial=4294967295 reply_serial=259
   string ":1.115"
method call time=1654173221.396436 sender=:1.110 -> destination=:1.115 serial=260 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Properties; member=GetAll
   string "org.freedesktop.portal.ScreenCast"
error time=1654173221.396632 sender=:1.115 -> destination=:1.110 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=260
   string "No such interface “org.freedesktop.portal.ScreenCast”"

BINGO ? ^

Comment 6 Jan Grulich 2022-11-22 07:54:44 UTC
We will need to backport https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1894 into gnome-shell.

Currently xdg-desktop-portal-gnome fails with:
 (xdg-desktop-portal-gnome:23092): WARNING : 08:38:06.445: Failed to get window list: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: GetWindows is not allowed

Comment 7 Jan Grulich 2022-11-22 07:56:22 UTC
Also, we might want to add somewhere dependency (runtime) on xdg-desktop-portal-gnome as it looks it might happen it will not get pulled in during upgrade from RHEL 9.0 to RHEL 9.1 (see https://bugzilla.redhat.com/show_bug.cgi?id=2144516).

Comment 11 Tomas Popela 2022-11-29 11:12:45 UTC
*** Bug 2144516 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2023-05-09 07:41:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gnome-shell bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2280