Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DavidVentura
Copy link

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.

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, but it works.
@fduncanh
Copy link
Contributor

fduncanh commented Feb 3, 2021

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

@D3SOX
Copy link

D3SOX commented Feb 3, 2021

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
Copy link
Author

renamed to UxPlay

@Peter111160
Copy link

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 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
Copy link
Author

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
Copy link
Contributor

fduncanh commented Mar 8, 2021 via email

@Peter111160
Copy link

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 referenced this pull request in FDH2/UxPlay Aug 1, 2021
…en-sharing software #31

(added fix from  PR #3 from https://github.com/DavidVentura/UxPlay)

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.

---------------------------
changes from PR #31:
use the UxPlay server-name as the widow name.
fduncanh added a commit to FDH2/UxPlay that referenced this pull request Aug 1, 2021
…een-sharing software antimof#31

(should have been part of previous commi)
@fduncanh
Copy link
Contributor

fduncanh commented Aug 5, 2021

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

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.

4 participants