Skip to content

Instantly share code, notes, and snippets.

@kylebrandt
Last active June 27, 2023 15:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebrandt/237368095cd9803536ac26529340a60f to your computer and use it in GitHub Desktop.
Save kylebrandt/237368095cd9803536ac26529340a60f to your computer and use it in GitHub Desktop.
i3 Hangout / Meet VLC screensharing workaround mutli-monitor

Share an area of your screen by using vlc screen capture, and then sharing the vlc capture window

Make sure the VLC window floats

In i3 config:

for_window [window_role="vlc-video"] floating enable move down 100px;

We float it so the tiling window manager doesn't resize the window and mess up the scale. We also move the window placement down at launch so it easy to drag somewhere mostly offscreen.

VLC Command

These arguments for me offsets one monitor to share center monitor

# cvlc is for command line vlc
cvlc \       
    --no-video-deco \
    --no-embedded-video \
    --screen-fps=4 \
    --screen-left=2560 \
    --screen-width=2560 \
    --screen-height=1600 \
    screen://

References / notes

  • can use xprop to find i3 window_role like for_window selectors
  • https://unix.stackexchange.com/questions/152435/sharing-your-desktop-with-google-hangouts-dual-monitor-and-gnome-shell
  • For the screenshare to be updated by hangouts/meet, the VLC video window needs to be on a displayed virtual i3 desktop. However, the vlc video window can be dragged to it is mostly off screen and will still share correctly.
  • I had to apt-get install vlc-plugin-access-extra
  • You want to start the capture window on the screen you are not sharing so you don't get incepted. If you do incept yourself you can hit your i3 run-command keyboard shortcut and killall vlc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment