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

splitbrain | 346 points

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...

splitbrain | 2 months ago

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

OsrsNeedsf2P | 2 months ago

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.

Brajeshwar | 2 months ago

You can literally do this with just xrandr.

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

IceDane | 2 months ago

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.

salviati | 2 months ago

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

alexcroox | 2 months ago

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.

yanchep | 2 months ago

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

Awesome!

z991 | 2 months ago

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

zh3 | 2 months ago

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.

0cf8612b2e1e | 2 months ago

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

amelius | 2 months ago

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

benjiweber | 2 months ago

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.

TacticalCoder | 2 months ago

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.

tcsenpai | 2 months ago

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

alanjames00 | 2 months ago

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

udev4096 | 2 months ago

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.

brazzledazzle | 2 months ago

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

procparam | 2 months ago

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

attah_ | 2 months ago

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

shmerl | 2 months ago

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

yazzku | 2 months ago

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

snowe2010 | 2 months ago

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

ho_schi | 2 months ago

[flagged]

TZubiri | 2 months ago