Skip to content

Enable screensharing in Zoom from Gnome Wayland#182

Closed
smlx wants to merge 1 commit intoflathub:masterfrom
smlx:zoom-gnome-screenshare
Closed

Enable screensharing in Zoom from Gnome Wayland#182
smlx wants to merge 1 commit intoflathub:masterfrom
smlx:zoom-gnome-screenshare

Conversation

@smlx
Copy link

@smlx smlx commented May 21, 2020

Closes #22

@flathubbot
Copy link
Contributor

Started test build 20411

@smlx
Copy link
Author

smlx commented May 21, 2020

Tested via

$ sudo flatpak override --talk-name=org.gnome.Shell --talk-name=org.gnome.Shell.Screenshot --talk-name=org.gnome.SessionManager --talk-name=org.freedesktop.PowerManagement.Inhibit --talk-name=org.freedesktop.ScreenSaver us.zoom.Zoom
$ flatpak run us.zoom.Zoom

@flathubbot
Copy link
Contributor

Build 20411 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/19571/us.zoom.Zoom.flatpakref

@smlx
Copy link
Author

smlx commented May 21, 2020

oh, you'll also need this in zoomus.conf

enableWaylandShare=true

@barthalion
Copy link
Member

I think the enableWaylandShare=true being manual action is problematic here as there's no way regular user will know about it. See #143.

@smlx
Copy link
Author

smlx commented May 21, 2020

oh nice I didn't see #143

well I guess that plus this PR will allow fully automated working screensharing in Gnome Wayland 🎉

@dac73
Copy link

dac73 commented Jun 1, 2020

just tested locally by combining #143 and #182
screen sharing works (per monitor, not per app but I think that is how zoom implemented wayland screen sharing). Can you just add changes from #143 so we can finally close this? (#143 is older and has conflict)
Or does this need any more work?
e.g. should we merge zoomus.conf with existing one (if it exists)?

@toMeloos
Copy link

toMeloos commented Jun 2, 2020

Support for @dac73 proposal. Just merged both PR's locally as well and the combination seems to work.

One thing missing though is window sharing. This just enables full-desktop sharing. What else needs to be added to also support specific-window sharing?

@dac73
Copy link

dac73 commented Jun 2, 2020

Window sharing doesn't work on rpm version also, so this would be on Zoom side of things (probably missing correct implementation for wayland).

I think that the only thing left is handling already existing zoomus.conf
I can help with that if needed

@sagarchalise
Copy link

sagarchalise commented Jun 10, 2020

I am facing two issues when trying this branch

  • Others in the meeting say they see blank screen rather than the desktop/windows when I try the screen share.
  • Once the screen sharing is stopped. I cannot select it again
    Screenshot from 2020-06-10 11-14-04

Is anyone else facing this issue ? I am using fedora 32 i.e. flatpak 1.6.3

dac73 added a commit to dac73/us.zoom.Zoom that referenced this pull request Jun 11, 2020
@smlx
Copy link
Author

smlx commented Jun 18, 2020

hi @sagarchalise yes I'm seeing this issue on the latest version of Zoom, so this PR is not longer functional.

@toMeloos
Copy link

I disagree. Could be that the changes to the Flatpak manifest are valid but that all of the remaining issues are within Zoom itself. Then this is still a valid change that we should want. Just because Zoom itself might be broken doesn't mean we shouldn't try to perfect the Flatpak config.

@smlx
Copy link
Author

smlx commented Jun 18, 2020

Looks like gnome doesn't like the screenshot request for some reason. This is what I've got with --log-session-bus:

C629: -> org.gnome.Shell call org.gnome.Shell.Screenshot.Screenshot at /org/gnome/Shell/Screenshot
B146319: <- :1.32 return error org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code26 from C629
C630: -> org.gnome.Shell call org.gnome.Shell.Screenshot.Screenshot at /org/gnome/Shell/Screenshot
B146320: <- :1.32 return error org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code26 from C630
C631: -> org.gnome.Shell call org.gnome.Shell.Screenshot.Screenshot at /org/gnome/Shell/Screenshot
B146321: <- :1.32 return error org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code26 from C631

@luis-agm
Copy link

luis-agm commented Oct 9, 2020

Quick question. Will this work with any wayland environment or is it just targeting Gnome?

@smlx
Copy link
Author

smlx commented Oct 9, 2020

Zoom uses the Gnome screenshot protocol to take the "frames" of the video feed.

So you'll need Gnome, or something else that implements this protocol such as this project which emulates the Gnome protocol on wlroots.

@smlx
Copy link
Author

smlx commented Jul 3, 2021

I finally had a chance to debug this. Turns out this flatpak configuration works fine - it's just a bug in Zoom itself that causes the DBus error responses I mentioned above.

The problem I saw is that recent versions of Zoom (seems to be approximately version 5.6+) use the interface=org.gnome.Shell.Screenshot; member=ScreenshotArea DBus API. Unfortunately if you are using scaling (I'm using 2x) on your desktop Zoom fails to take this into account and sends an invalid width/height value to this API. By sniffing the session bus you can see that other users of this API such as Gnome's screenshot tool take the scaling into account by halving the width/height values.

Screensharing works fine if you downgrade to an old enough version of Zoom that uses the simpler interface=org.gnome.Shell.Screenshot; member=Screenshot DBus API.

flatpak upgrade --commit a270455dbf898c9646c8a1c371737524624dc4935b7fc51456f6f702ab5c0318 us.zoom.Zoom

Editorial/Rant: I can't believe that Zoom actually reworked Linux screencasting support and decided to use yet another Gnome-specific, non-standard API to do it. Not only is this API not interoperable with any other desktop, but it also has no support for cursor capture. So new versions of Zoom cannot capture the pointer as part of the screencast!

@smlx smlx closed this Jul 3, 2021
@smlx
Copy link
Author

smlx commented Jul 3, 2021

The upshot is that screencasting in the latest version of Zoom doesn't seem to work on Gnome if you have a scaled desktop.

However it can work on wlroots desktops like sway because we can intercept the API calls and ignore the bad values. Here is my fork of gnome-dbus-emulation-wlr with such a hacky workaround and I've tested that it works on Sway with the latest Zoom flatpak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screensharing not working

7 participants