PF4Public / gentoo-overlay

Personal Gentoo overlay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

www-client/ungoogled-chromium: screencasting not working

arbitrary-dev opened this issue · comments

What were you trying to accomplish?

Screencasting under https://meet.jit.si/

What didn't function as expected?

When I click to share entire screen I get:

[3737:3752:0228/205313.927767:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.freedesktop.Notifications received signal 11
[3737:3749:0228/205314.504179:ERROR:ev_root_ca_metadata.cc(162)] Failed to decode OID: 0
[3737:3737:0228/205319.746063:ERROR:interface_endpoint_client.cc(702)] Message 1 rejected by interface blink.mojom.WidgetHost
[3737:3737:0228/205337.100241:ERROR:screen_capture_portal_interface.cc(48)] Failed to request session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
[3737:3737:0228/205337.100257:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3

If you have some unusual setup in your system please also mention this.

  1. default/linux/amd64/17.1/desktop profile
  2. SwayWM + Wayland

Solution

  1. Emerge gui-libs/xdg-desktop-portal-wlr
  2. Add following lines to the beginning of ~/.config/sway/config:
    # https://wiki.gentoo.org/wiki/PipeWire#Wayland_.2F_Sway_.2F_Window_Managers
    exec gentoo-pipewire-launcher &
    # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist#issues-in-void-linux
    exec dbus-update-activation-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
    

So did it work in the end?

Yes, it seems that screencast USE-flag requires sys-apps/xdg-desktop-portal and appropriate backend as a runtime dependency.

Should it go here?

Or mentioning here should suffice?

if use screencast; then
elog "Screencast is disabled by default at runtime. Either enable it"
elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
elog "to CHROMIUM_FLAGS in /etc/chromium/default."
fi

Though I'm amateur, but I'd propose something like:

screencast? (
	media-video/pipewire:=
	|| (
		sys-apps/xdg-desktop-portal-gnome
		sys-apps/xdg-desktop-portal-gtk
		kde-plasma/xdg-desktop-portal-kde
		gui-libs/xdg-desktop-portal-lxqt
		gui-libs/xdg-desktop-portal-wlr
	)
)

and

if use screencast; then 
	elog "Screencast is disabled by default at runtime. Either enable it" 
	elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer" 
	elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer" 
	elog "to CHROMIUM_FLAGS in /etc/chromium/default."
	elog
	elog "Additional setup may be required for screencasting to work."
	elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
 fi 

Would you like to submit a PR? If not, that's OK, I'll do it mysel later.

Too lazy, sorry :)