clipscreenでXephyr画面をZoomアプリで共有(失敗)

オンライン勉強会などで画面共有する場合 Xephyr でメインと別の X server を起動してその画面を共有したりしています.
入れ子になった X の中でフルスクリーンにしたり,アプリケーションを切り替えたりしています.
しかし,小江戸らぐやオープンソースカンファレンスなどで利用しているビデオミーティングアプリの Zoom 🏛️ では画面共有時に Xephyr が出てきません.Chromium や Firefox や Electron アプリでは一覧に出てきて Xephyr の画面共有もうまく行きます.
仕方がないので Zoom での画面共有時は「画面の一部分」を使っています.

今回画面の指定領域を仮想ディスプレイとして利用できる clipscreen でかんたんに画面共有ができないか試してみました.

$ sudo apt install libx11-dev xserver-xorg-dev xorg-dev libcairo2-dev g++ (1)
$ git clone https://github.com/splitbrain/clipscreen (2)
$ cd clipscreen
$ make (3)
$ ./clipscreen (4)
Usage: ./clipscreen <width>x<height>+<x>+<y> (e.g. 800x600+100+100)
  1. 必要なライブラリを導入

  2. source を clone

  3. build

  4. usage

実行時には共有したい解像度と座標を指定する必要があります.手動だと面倒です.xdotool で調べることにします.
Xephyr を起動した状態で xdotool で解像度と座標を調べます.

$ xdotool search --onlyvisible Xephyr getwindowgeometry
Defaulting to search window name, class, and classname
Window 73400321
  Position: 851,168 (screen: 0)
  Geometry: 839x522

この例だと,screen0 の 851,168 の座標に 839×522 の解像度のウィンドウがあるようです.
これを clipscreen に渡して仮想ディスプレイを作ります.

$ ./clipscreen 839x522+851+168
Added virtual monitor
Press Ctrl-C to exit

clipscreen shareframe

少し座標がずれますが毎回同じズレなので後で調整すれば良さそう.とりあえずウェブブラウザでは問題なく仮想ディスプレイが共有できました.
しかし,Zoom アプリでは出てきません…….Xephyr を Zoom で共有するにはやはり部分共有を使うしかなさそうです.

clipscreen zoom01
clipscreen zoom02

関連スライド


環境

$ git log -1 | grep -e commit -e Date:
commit 788c1458886b7484d72e1cd512ec5b3a01c90190
Date:   Wed Oct 16 09:40:21 2024 +0200
$ dpkg-query -W xorg xserver-xephyr
xorg    1:7.7+23.1
xserver-xephyr  2:21.1.13-3
$ lsb_release -dr
Description:    Debian GNU/Linux trixie/sid
Release:        n/a
$ arch
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)