I tried screen sharing in a video call on my Ubuntu 24.04 computer running the Snap Firefox install, but I could never get it to prompt to share a screen, thus it wouldn’t work. This post shows how I fixed that.
Investigation
My initial web searches came across this Stack Exchange question that recommended that users switch from Wayland to X11. While this did fix the problem, I’m not a fan of just turning off new technologies to get things to work, so I continued investigating.
GNOME and desktop environment integrations usually appear in D-Bus and the awesome packet capturing tool, Wireshark, has the ability to sniff D-Bus messages.
I started capturing packets, then went back to Firefox and tried to share my screen. From there, I was able to see a few interesting packets:
And an error message stating No such interface "org.freedesktop.portal.ScreenCast"
. Searching for that lead me to this comment.
The Fix
Easy enough:
sudo apt install xdg-desktop-portal xdg-desktop-portal-gnome
I installed those packages, then rebooted. VoilĂ ! Firefox is now able to share my screen.
D-Spy is also a useful tool for investigating these issues too. With it, I’m able to see that Screencast is enabled.
To enable it, run:
sudo apt install d-spy