Zoom on Linux with BSPWM
Remote work was the norm during the COVID-19 pandemic, that’s when Zoom became the standard for professional video calls. At the time, other solutions weren’t as efficient or polished. Zoom dealt with network lag better and could to handle large groups of participants in a single call.
One thing I particularly liked about Zoom was its Linux client. So much so that I have regularly updated the Zoom Void Linux package for a couple of years now. I have also been a subscriber, paying a yearly subscription to talk with my family and friends back in France.
The Desktop app declines🔗
Unfortunately, over the past 6 months, I had numerous issues with the Linux client. First, my audio started cutting off, making it unusable. I had to use my phone to attend my work meetings. I debugged the issue and fixed it by switching the audio backend from ALSA to PulseAudio.
Last week I tried to share my screen and it was blank on the other side: nobody could see my screen, it was all black. I spent hours debugging this; I concluded it was probably a bug in the Linux client, since sharing my screen from Firefox worked.
I had to fix this, and I was tired of the constant breakage of the desktop app. After a quick online search, I found out that Zoom had a web app. I tried it and it worked well enough for me. I was able to share my screen, there was just one issue with my window manager.
BSPWM and Firefox’s screen sharing indicator🔗
Things worked well except Firefox’s screen sharing indicator. I use BSPWM as my X11 window manager. When I screen share, Firefox creates a window for its sharing indicator. The indicator is a way to cancel screen sharing in case the web application doesn’t provide a way to do it. The problem is that BSPWM made this screen sharing widget a tiled window taking half the screen, when it is supposed to be a special borderless window floating on top.
I thought the problem would be trivial to fix, but it took me several hours to figure it out. Initially, I just wanted to hide the sharing indicator, and there’s an option in Firefox to do that:
- Go to
about:config
- Search for
privacy.webrtc.hideGlobalIndicator
and set it to true - Restart Firefox to get the option to take effect
However, I realized that misbehaving apps might grab the screen and force me to restart Firefox to cancel the screen capture. So I looked for an alternative solution using BSPWM’s rules.
bspc rule -a ...
lets you define rules about how to handle each window. I used xprop
to determine the window class and title, and I added the following rules to my bspwmrc
:
bspc rule -a 'Firefox:*:Firefox — Sharing Indicator' desktop='^3' state=floating
bspc rule -a 'Firefox' desktop='^3' state=tiled
I reloaded bspwm’s configuration, but it didn’t work. I misunderstood how the rules worked. I assumed rules were executed in order, that only the first matching rule was applied, and that bspwm ignored subsequent rules.
I found this great explanation from emanuele6 on the issue tracker. It turns out all rules are evaluated in order, and that subsequent rules could overwrite what the previous ones did. Therefore my first rule for the sharing indicator was getting overwritten by the next one. Based on this, I added the following to my bspwmrc:
bspc rule -a 'Firefox' desktop='^3' state=floating
bspc rule -a 'Firefox:Navigator' state=tiled
bspc rule -a 'Firefox:Library' state=tiled
Now the sharing indicator is floating window, and could ditch the Zoom desktop app for good.