antimof / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.28k stars 177 forks source link

Set _NET_WM_NAME so that the window can be shared on screen-sharing software #31

Open DavidVentura opened 3 years ago

DavidVentura commented 3 years ago

Gstreamer does not set the _NET_WM_NAME property on the window it creates when using autovideosink (or ximagesink/xvimagesink for that matter).

A lot of tools (like Zoom) filter based on this field being non-null, so the window can't be shared.

This horrible hack finds the first open window that matches our application name and proceeds to set _NET_WM_NAME on it.

It is very ugly, and I do not know what I am doing, but it works. Feel free to use this to write something that makes more sense.

fduncanh commented 3 years ago

I tested your code and confirm it works nicely on Zoom! Thanks! (I edited "NEW NAME" in video_renderer_gstreamer.c to "UxPlay")

D3SOX commented 3 years ago

I tested it and in Discord it worked without this. Nevertheless I backported it to my AUR package in this commit As @fduncanh already mentioned: Can you replace NEW NAME with UxPlay?

Sadly this project seems kinda dead so if someone wants to actively maintain a fork I may switch to it.

DavidVentura commented 3 years ago

renamed to UxPlay

Peter111160 commented 3 years ago

The solution would be very useful not only for Zoom users but also for BBB users. Unfortunately, I'm not a developer. I tried to compile the code from DavidVentura, but with no visible success. The window is already noname. Maybe I forget something important? Excuse for probably very boring question: I changed the two files mentioned here: https://github.com/antimof/UxPlay/pull/31/commits/7c80c93cccf6534a0824c1d5783fc036812a76cb and run cmake, make. It compiles and working fine. But still no window name ... Seems to be, there is a step missing? Would be happy, if someone could help!

DavidVentura commented 3 years ago

To verify if the window is your problem, you can set a name manually: xdotool selectwindow set_window --name "ux" (and selecting the window by clicking).

my patch does that (and it's also upstreamed). i guess you just have some cache? either delete your repo and clone+build again or do some type of make clean

fduncanh commented 3 years ago

I can confirm that this patch works great.

with it, Zoom finds the window.

On Mar 8, 2021, at 10:26 AM, Peter111160 notifications@github.com wrote:

The solution would be very useful not only for Zoom users but also for BBB users. Unfortunately, I'm not a developer. I tried to compile the code from DavidVentura, but with no visible success. The window is already noname. Maybe I forget something important? Excuse for probably very boring question: I changed the two files mentioned here: 7c80c93 https://github.com/antimof/UxPlay/commit/7c80c93cccf6534a0824c1d5783fc036812a76cb and run cmake, make. It compiles and working fine. But still no window name ... Seems to be, there is a step missing? Would be happy, if someone could help!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antimof/UxPlay/pull/31#issuecomment-792830176, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKXYDOV6DLBWUCGGL7ODWDTCTUBFANCNFSM4WNVENJQ.

Peter111160 commented 3 years ago

xdotool selectwindow set_window --name "ux" this works great, thanks so much :-) it's does the trick, that's enough for me in the moment. I have to go deeper into github functionality later, might be a good idea anyway. Thanks!!

fduncanh commented 2 years ago

see the implementation as an cmake option in PR #58, which is a full update of UxPlay