I've googled until my fingers bled, but unfortunately all I end up finding is either posts by Microsoft saying "Teams works on Linux" and posts in help forums that just end up telling people to use xorg instead of Wayland.
But Wayland is going default, and screen sharing isn't working atm (Ubuntu 20.10 here, using the "official" Teams package) unless we use xorg. Using Wayland doesn't even show the option to share one's screen in Teams.
Has there been any news concerning 21.04 and screen sharing?
Alternative: is there anything I can do in 20.10 using Wayland to get screen sharing to work in Teams?
I'm sure there's a lot of us that have the same question, now that working from home has become the new norm...
The problem does not lie with Ubuntu nor Linux.
Teams is an app built on the electron framework, so basically it is one package consisting of html5 with javascript running on chromium. This makes it possible to use it on any platform that can run chromium.
Problem is, wayland support for chromium is incomplete and buggy. Therefore on wayland it is forced to use xwayland. This further reduces the possibilities of things like screensharing.
In short, for now use Xorg if you have to make full use of electron based apps like Teams.
Wayland will eventually work as soon as chromium has full support of it and all electron apps have been upgraded to use that version of chromium.
As an alternative option, you can run the Teams web app on Chrome or Edge Beta, which allow sharing on Wayland.
I'm on 21.04 with Wayland, and screen sharing works well in the latest version of Google Chrome (v92.0.4515.159).
Here's a trick if you want to have Teams in a separate window and with a desktop shortcut:
The only way I could get Wayland and Teams working with screen sharing was to install the beta version of Edge:
https://www.microsoftedgeinsider.com/en-us/download?platform=linux-deb
Login to teams and install it as a desktop app.
Not the best solution but gives the appearance of a desktop app with the ability to share my screen plus I didn't have to modify any chrome settings.
I am currently running:
Based on
A less drastic solution would be to disable Wayland and use xOrg.
Asuming GDM3 is your default display manager, edit the /etc/gdm3/custom.conf to disable Wayland.
You can use the following command:
For other distributions, like OpenSUSE, the command is:
Reboot system or restart display manager.
If on Pop! OS 21.04 (probably works for normal Ubuntu): go on the shop, download ungoogled chromium, go on the Teams website.
It won't work at first (you'll have to add 6 websites, as indicated by a link on the Teams error page https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop#resolution, to the list of websites for which cookies are enabled). Once added, log out/reload the main MS Teams page. Video and audio should work.
I am on ubuntu 22.04.1 LTS with Wayland enabled. By using Google Chrome with WebRTC pipewire support enabled, I could share my screens and windows in Teams webapp without much troubles.
To enable WebRTC Pipewire support, open chrome://flags/ in chrome and search for WebRTC, enable the "WebRTC Pipewire Support" and relauch the application.
I am using Google chrome version v104.0.5112.79 and now Teams app in a seperate window through a desktop shortcut, one suggested by user greger above. And with this trick, overall it gives a similar feeling, atleast to some extent just like in Windows.