Qubes-video-companion unable to share dom0's screen

So I’m fiddling with qubes-video-companion.

After I installed qubes-video-companion-dom0 in dom0 and qubes-video-companion-sender,qubes-video-companion-receiver in fedora 38 template qube, I’m able to share app qube’s screen, and to receive webcam’s video stream in an app qube.

However I’m not able to share dom0’s screen. If I type qubes-video-companion screenshare in an app qube, then select dom0 as the sender, there are no messages indicating successful screensharing. Instead, after a long waiting, there will be error messages, as below:

Traceback (most recent call last):
  File "/usr/share/qubes-video-companion/receiver/receiver.py", line 82, in <module>
    main(sys.argv)
  File "/usr/share/qubes-video-companion/receiver/receiver.py", line 17, in main
    width, height, fps = read_video_parameters()
                         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/qubes-video-companion/receiver/receiver.py", line 63, in read_video_parameters
    raise RuntimeError("wrong number of bytes read")
RuntimeError: wrong number of bytes read

The logs are the same as when selecting an app qube which doesn’t have qubes-video-companion-sender and qubes-video-companion-receiver as the sender. But /usr/share/qubes-video-companion/sender/screenshare.py does exist in dom0.

The README.md in qubes-video-companion repository claims that screensharing dom0 is supported, so I don’t think I’m going too far.

A secure confirmation dialog will appear asking where the screen to share is to be sourced from. Select any qube as the target screen, this could be a regular unprivileged qube such as personal or a DisposableVM, or the ultimately trusted dom0 (caution is advised to avoid information disclosure). Afterwards, confirm the operation by clicking OK.

1 Like

I found interesting dom0 logs:

dom0 qvc.ScreenShare+-disp6823[12773]: Traceback (most recent call last):
dom0 qvc.ScreenShare+-disp6823[12773]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 81, in <module>
dom0 qvc.ScreenShare+-disp6823[12773]:     screenshare = ScreenShare()
dom0 qvc.ScreenShare+-disp6823[12773]:                   ^^^^^^^^^^^^^
dom0 qvc.ScreenShare+-disp6823[12773]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 24, in __init__
dom0 qvc.ScreenShare+-disp6823[12773]:     self.main(self)
dom0 qvc.ScreenShare+-disp6823[12773]:   File "/usr/share/qubes-video-companion/sender/service.py", line 157, in main
dom0 qvc.ScreenShare+-disp6823[12773]:     self.start_service(target_domain, remote_domain)
dom0 qvc.ScreenShare+-disp6823[12773]:   File "/usr/share/qubes-video-companion/sender/service.py", line 51, in start_service
dom0 qvc.ScreenShare+-disp6823[12773]:     Notify.Notification.new(app, msg, icon).show()
dom0 qvc.ScreenShare+-disp6823[12773]: gi.repository.GLib.GError: g-io-error-quark:  Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached (24)

BTW I’m running Qubes R4.2 (fc37 dom0) and KDE.

And commenting out Notify.Notification.new(app, msg, icon).show() fixed this for me.

2 Likes

@Demi Do you think this is a general problem that should be fixed?

1 Like

fedora-38 based AppVM requesting screenshare from dom0:

[user@test ~]$ qubes-video-companion screenshare
Receiving video stream at 1287x965 30 FPS...

dom0 journalctl:

Sep 21 17:47:45 dom0 qrexec-policy-daemon[1605]: qrexec: qubes.GetDate+: test -> @default: allowed to dom0
Sep 21 17:47:51 dom0 qrexec-policy-daemon[1605]: qrexec: qubes.WindowIconUpdater+: test -> @adminvm: allowed to dom0
Sep 21 17:48:03 dom0 qrexec-policy-daemon[1605]: qrexec: qvc.ScreenShare+: test -> @default: allowed to dom0
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]: /usr/share/qubes-video-companion/sender/screenshare.py:38: DeprecationWarning: Gdk.Screen.width is deprecated
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   "crop_r": screen.width() - monitor.x - monitor.width,
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]: /usr/share/qubes-video-companion/sender/screenshare.py:39: DeprecationWarning: Gdk.Screen.height is deprecated
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   "crop_b": screen.height() - monitor.y - monitor.height,
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]: /usr/share/qubes-video-companion/sender/screenshare.py:38: DeprecationWarning: Gdk.Screen.width is deprecated
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   "crop_r": screen.width() - monitor.x - monitor.width,
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]: /usr/share/qubes-video-companion/sender/screenshare.py:39: DeprecationWarning: Gdk.Screen.height is deprecated
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   "crop_b": screen.height() - monitor.y - monitor.height,
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]: Traceback (most recent call last):
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 81, in <module>
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:     screenshare = ScreenShare()
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 24, in __init__
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:     self.main(self)
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   File "/usr/share/qubes-video-companion/sender/service.py", line 158, in main
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:     self.start_transmission()
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:   File "/usr/share/qubes-video-companion/sender/service.py", line 128, in start_transmission
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]:     element = self._element = Gst.parse_launchv(
Sep 21 17:48:04 dom0 qvc.ScreenShare+-test[15589]: gi.repository.GLib.Error: gst_parse_error: could not link videocrop0 to capsfilter0 (3)
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]: Traceback (most recent call last):
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 81, in <module>
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:     screenshare = ScreenShare()
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   File "/usr/share/qubes-video-companion/sender/screenshare.py", line 24, in __init__
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:     self.main(self)
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   File "/usr/share/qubes-video-companion/sender/service.py", line 158, in main
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:     self.start_transmission()
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:   File "/usr/share/qubes-video-companion/sender/service.py", line 128, in start_transmission
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]:     element = self._element = Gst.parse_launchv(
Sep 21 17:48:04 dom0 qrexec-policy-daemon[15587]: gi.repository.GLib.Error: gst_parse_error: could not link videocrop0 to capsfilter0 (3)

This looks different then what @augsch reported.

1 Like

Yep, found #7991.

1 Like

Hi, it isnt exactly clear to me how you solved this. Im having the same issue with fedora-39

1 Like

I guess you need to edit /usr/share/qubes-video-companion/sender/service.py file and comment out or remove Notify.Notification.new(app, msg, icon).show() line there.

3 Likes

it worked!

1 Like