Fixing Slack black screen sharing on Wayland
For decades, Xorg has been the graphical server in the Linux world. But its own developers have been working for years in a replacement, Wayland.
Finally, Ubuntu 22.04 uses Wayland by default. But some programs are still not properly handling screen sharing on it, like Slack: when presenting, other users will see only a blank black screen.
Fortunatelly, there is a way to fix this, starting Slack with the --enable-features=WebRTCPipeWireCapturer
param.
Make it permanent
Instead of always launch Slack using the terminal, let’s change the desktop shortcut.
But there is one additional problem: when Slack got updated, apt
will overwrite our changes.
We’ll prevent that using dpkg-divert
: using it, we can tell to apt
to update another file and keep our changes.
So, open a terminal and run the below command to create the divert and rename the original file:
sudo dpkg-divert --add --rename --divert /usr/share/applications/slack.desktop.bak /usr/share/applications/slack.desktop
Now let’s create a copy of the file to the original path and make our changes:
cd /usr/share/applications
sudo cp slack.desktop.bak slack.desktop
Using sudo
, edit /usr/share/applications/slack.desktop
file and change the Exec
to be like this:
Exec=/usr/bin/slack --enable-features=WebRTCPipeWireCapturer %U
Save and exit.
Update the desktop database:
sudo update-desktop-database
Done! Now the Slack screen sharing will work fine on Wayland and apt
will not overwrite our changes!
Bonus
I’ve noticed that Slack produces a lot of useless entries in /var/log/syslog
. If you want to avoid any info
log level, add the -s
param to the Exec
line like this:
Exec=/usr/bin/slack --enable-features=WebRTCPipeWireCapturer -s %U
-
MySQL8: poor performance after upgrade
-
My experience leading an Open Source project
-
Samsung Anynet+ switching input modes when TV is turned on
-
Automated UI testing with Cypress and Shippable
-
Using ActionMailer with Localhost
-
Super Nintendo history
-
Using Wiimote as wireless mouse on Ubuntu
-
Updating Webkit on Ubuntu
-
Git Timesheet
-
Creating a Gmail filter for GitHub
-
Retro journey with Sega Master System
-
Configuring a Wiimote as a classic gamepad
-
Ubuntu 16.04 on Dell Precision M3800
-
Upgrading BIOS with Ubuntu
-
How to Disable wifi on Arris TG862 modem
-
Ubuntu 14.04 on Dell Precision M3800
-
Installing a Slack client on Ubuntu
-
Installing RVM on Ubuntu
-
Xbox360 gamepad on Ubuntu
-
English (US) International Keyboard on Ubuntu
-
Disable Wifi from Motorola SVG 1202 modem
-
Installing a Campfire client on Ubuntu (Snakefire)
-
How to Install Photoshop Elements 10 on Ubuntu
-
Recording Video throw the Web
-
Java Multimedia Player
-
Migrating from MySQL to Oracle
-
How to Write a Spell Checker
-
First Post