Skip to content
  • Hi, is there a way how to modify this just to share a single window? thx!

    I tried to change the type in screen_cast_call(portal.SelectSources ... according to documentation to 2 but without an effect

  • Hi, is there a way how to modify this just to share a single window? thx!

    I tried to change the type in screen_cast_call(portal.SelectSources ... according to documentation to 2 but without an effect

    See https://github.com/flatpak/xdg-desktop-portal-gtk/issues/204

  • method(*(args + (options, )), a=b)

    You don't need that clutter. Python is perfectly happy with

    method(*args, options, a=b)

  • Christian Rauch @christian-rauch ·

    Is this script still supposed to work? The Remote desktop and screen casting in Wayland page says

    it should pop up a window with the content of the compositor in real time

    but nothing happens (no window opens) after I select the "Unknown Display" and the "Keyboard" on Fedora 33.

    Also, if I do not select "Keyboard" I will get dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Failed: Invalid call call.

  • Works here on F33. Make sure you have xdg-desktop-portal-1.8.0-1.fc33.x86_64 and xdg-desktop-portal-gtk-1.8.0-1.fc33.x86_64.

  • Christian Rauch @christian-rauch ·

    It turns out that the xvimagesink is not working in a virtual machine (I was testing Fedora 33 in a VirtualBox).

    To show the video stream in a virtual machine, the xvimagesink should be replaced with the autovideosink.

  • Hi,

    [Problem solved, I let it here in case someone has the same issue]

    Thanks for this script that did already help me a bit to diagnostic my issue.

    It is not linked to your script as I can't share my screen with other applications too, so don't feel obliged to answer at all. But in case you have an idea of what I can do, it will help me a lot !

    I recently migrated from an older version of fedora (already using wayland) to fedora 33.

    Before the migration I was able to share my screen in firefox, no I can't any-more, it's stay blocked after I accept to share the screen.

    So I have tried your script, and the result is a bit the same. It asks me witch screen I want to share, and after I accept it stays blocked, I can't see a window with a mirror of the screen, and produce the following output.

    python3 xdp-remote-deskto.py 
    /data/Downloads/xdp-remote-deskto.py:13: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
      GObject.threads_init()
    session /org/freedesktop/portal/desktop/session/1_249/u1 created
    devices selected
    sources selected
    streams:
    stream 57
    ERROR:dbus.connection:Exception in handler for D-Bus signal:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/site-packages/dbus/connection.py", line 232, in maybe_handle_message
        self._handler(*args, **kwargs)
      File "/data/Downloads/xdp-remote-deskto.py", line 95, in on_start_response
        play_pipewire_stream(node_id)
      File "/data/Downloads/xdp-remote-deskto.py", line 78, in play_pipewire_stream
        fd_object = portal.OpenPipeWireRemote(session, empty_dict,
      File "/usr/lib64/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
        return self._connection.call_blocking(self._named_service,
      File "/usr/lib64/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
        reply_message = self.send_message_with_reply_and_block(
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

    The shared screen orange icon is displayed and stay visible even after I interrupt the share screen. I can click on it and ask to stop the sharing to make it disappear.

    I did have mutter-3.38.1-1.fc33.x86_64, pipewire-0.3.14-2.fc33.x86_64, xdg-desktop-portal{,-gtk}-1.8.0-1.fc33.x86_64.

    That's where I am, with no good idea of what to do next. Maybe It can be linked to dbus configuration in /etc/dbus-1/system.d ?

    Thanks again.

    [edit]

    using systemctl --user status pipewire.service command, I got the following trace.

    nov. 06 22:40:04 ludop.hq.usharesoft.com pipewire[3116]: [E][000005012.481653][module-access.c:102 check_flatpak()] failed to open "/proc/2052/root": Permission denied
    nov. 06 22:40:04 ludop.hq.usharesoft.com pipewire[3116]: [W][000005012.481676][module-access.c:196 context_check_access()] access 0x55ac53a1dae0: client 0x55ac53ba1170 sandbox check failed: Permission denied

    If found this lead : https://bugzilla.redhat.com/show_bug.cgi?id=1894437

    I will try to downgrade my pipewire package and let you know.

    I had to reboot after downgrading the pipewire but it worked.

    So the fix for me was to run : sudo dnf downgrade pipewire to downgrade from the version 0.3.14 to the version 0.3.13.

    Sorry to have polluted this snippet comments.

    [/edit]

  • Dmitry @reagentoo ·
    $ python3 xdp-remote-deskto.py 
    xdp-remote-deskto.py:13: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
      GObject.threads_init()
    session /org/freedesktop/portal/desktop/session/1_142/u1 created
    devices selected
    sources selected
    streams:
    stream 63
    ERROR:dbus.connection:Exception in handler for D-Bus signal:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 232, in maybe_handle_message
        self._handler(*args, **kwargs)
      File "xdp-remote-deskto.py", line 95, in on_start_response
        play_pipewire_stream(node_id)
      File "xdp-remote-deskto.py", line 81, in play_pipewire_stream
        pipeline = Gst.parse_launch('pipewiresrc fd=%d path=%u ! videoconvert ! xvimagesink'%(fd, node_id))
    gi.repository.GLib.GError: gst_parse_error: no element "pipewiresrc" (1)
  • @reagentoo, you need to install libgstpipewire.so. In fedora this is part of the pipewire-gstreamer package; in other distributions I don't know.

  • Dmitry @reagentoo ·

    @jadahl, I've rebuilt pipewire on Gentoo with +gstreamer USE: media-video/pipewire-0.3.21 USE="X* ffmpeg gstreamer* pulseaudio vulkan -bluetooth -debug -doc -jack -systemd -test"

    But now I've got:

        pipeline = Gst.parse_launch('pipewiresrc fd=%d path=%u ! videoconvert ! xvimagesink'%(fd, node_id))
    gi.repository.GLib.GError: gst_parse_error: no element "xvimagesink" (1)
  • Try changing xvimagesink to autoimagesink, or install whatever package contains gstxvimagesink.so.

  • Dmitry @reagentoo ·

    Ok, I've reinstalled media-libs/gst-plugins-base with USE X and now it shows this:

    https://i.imgur.com/A3gHrud.png

    Actually I see same picture when I share my screen in firefox/webrtc. Perhaps this is due to the 4k display or fractional scaling.

  • Looks like a stride issue; could you open a bug report on https://gitlab.gnome.org/GNOME/issues/new and include that screenshot, as well as software versions and hardware details?

  • Dmitry @reagentoo ·
  • In the realm of Android apps, it's crucial to explore safely. When considering mods, like the "remini mod apk," exercise caution. Downloading from reputable sources minimizes risks, ensuring a secure and enhanced user experience. Prioritize your device's security while delving into the exciting realm of modifications.

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment