Show HN: X11 tool to share a screen area in any video meeting

by splitbrainon 10/14/24, 1:11 PMwith 154 comments
by splitbrainon 10/14/24, 1:14 PM

I have a big 49" wide screen monitor and sharing my screen in Google Meet was cumbersome because you can only share a window or the whole screen, but not a screen region.

So I wrote a small tool that uses the xrandr extension to mirror an area to a virtual monitor which then can be shared.

See my blog post for some more details: https://www.splitbrain.org/blog/2024-10/11-introducing_clips...

by OsrsNeedsf2Pon 10/14/24, 2:08 PM

I love how simple this is- Barely 100 lines or C++ (ignoring comments). That's one thing that makes me prefer X11 over Wayland.

by Brajeshwaron 10/14/24, 2:13 PM

Also, I remember a friend showing me in Zoom that you can share not just one but multiple screens/windows—press the SHFT key while clicking the windows you want to share.

by IceDaneon 10/14/24, 5:10 PM

You can literally do this with just xrandr.

xrandr --setmonitor screenshare 2560/1x1440/1+0+0 none

by salviation 10/14/24, 3:53 PM

Do I understand correctly that you could to this with OBS on any platform, including Wayland? I'm reading many comments that make me think either many people don't know about OBS, or I'm overestimating it's abilities.

by alexcrooxon 10/15/24, 8:56 AM

With my 49" I use OBS + Mouse follow script + OBS preview window on laptop screen and share my entire laptop screen. That way I know the window size is suitable for others viewing from their laptops and the preview follows my mouse and you can tweak zoom levels and mouse boundaries on the fly. Also the OBS preview window opens on launch, without opening the main OBS window. So you never have to see/interact with the main OBS window/application again so it really feels standalone which is great.

https://github.com/BlankSourceCode/obs-zoom-to-mouse

by yanchepon 10/15/24, 5:23 AM

When I click share in Jitsi (or whatever) on KDE 6.1 w/ Wayland in Chromium, I get offered to share the 'Entire Screen". After that dialog another one pops up with the options 'Full Workspace', 'New Virtual Output', 'Rectangular Region' and a list of my displays. 'Rectangular Region' allows to share a selected part of the screen, 'New Virtual Output' instantly creates a virtual screen, visible in KDE 'Display Configuration' that may or may not be positioned on top of pre-existing physical displays.

by z991on 10/14/24, 1:54 PM

Wow, this is fantastic! This exact use case, on Linux, is why our company selected Zoom instead of Meet.

Awesome!

by zh3on 10/15/24, 5:43 AM

You can do this with xzoom, which also allows magnification from x1 upwards - is there an advantage I'm missing here?

by 0cf8612b2e1eon 10/14/24, 6:00 PM

Can someone explain why this is still an unmet need within the current video conference platforms? Giant monitors have become increasingly common-especially for the developers who might be working on these tools.

by ameliuson 10/14/24, 2:06 PM

Nice. This is the first time I read about creating a virtual monitor in X.

by benjiweberon 10/14/24, 2:59 PM

This is brilliant. I've wanted this so many times and had to awkwardly switch between window being shared instead.

by TacticalCoderon 10/14/24, 2:44 PM

That s very cool... Speaking of which: any easy way to allow two people, both on X, to both share and interact (keyboard and mouse) with a common X window?

The app that we d like to share and both control is a browser (running on a machine on our LAN) so a browser extension would work too I guess.

by tcsenpaion 10/14/24, 4:47 PM

This is surely useful right now. I wonder what will happens to all the nice X11 tools once Wayland (hopefully soon) will be the golden standard. There are options to enable X11 behaviors in Wayland but I guess that is just a fallback to the insecure implementation.

by alanjames00on 10/14/24, 4:34 PM

I've looking for something like this for quite sometime. It's simple, clean and elegant.

by udev4096on 10/14/24, 3:51 PM

This is only helpful if you are using a desktop environment. What about window managers like i3?

by brazzledazzleon 10/16/24, 6:32 PM

This is so cool. Seeing the word splitbrain definitely gave me a moment of dreaded recollection though, not gonna lie. Not a fun place to be when you're dealing with databases and clusters.

by procparamon 10/14/24, 4:19 PM

I've always wanted something like this, but for i3 workspaces. Something like "share workspace 2." Anyone know how to accomplish this?

by attah_on 10/14/24, 6:36 PM

I was just about to go looking for something like this! I'll look so pro on the meeting tomorrow :)

by shmerlon 10/14/24, 6:33 PM

I'm waiting for ffmpeg to implement pipewire screen grab so it could work on Wayland.

by yazzkuon 10/14/24, 5:04 PM

Can you not use std::condition_variable to avoid the active waiting of the signal?

by snowe2010on 10/14/24, 2:59 PM

Dang. I need this for Mac. I’ve been wishing I had exactly this for years.

by ho_schion 10/14/24, 3:19 PM

Neat. Now I want for Wayland. Don’t use X11 for some years.