42

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...

andrew.46
  • 39,359

10 Answers10

21

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.

Ferdi
  • 527
12

As an alternative option, you can run the Teams web app on Chrome or Edge Beta, which allow sharing on Wayland.

7

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:

  • Navigate to https://teams.microsoft.com/ in Chrome.
  • Open the Chrome menu (top right).
    • More tools.
      • Create shortcut...
        • Rename to what you want
        • Check Open as window
        • Click Create
  • Right click on the new shortcut on your desktop and select Allow Launching
  • Now you'll have a high resolution icon on your desktop which opens Teams using an up to date Chrome (with screen sharing working) in a separate window.

enter image description here

gregers
  • 201
  • 2
  • 5
4

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:

Distributor ID: Pop, Description: Pop!_OS 21.04, Release: 21.04, Codename: hirsute

Based on

Ubuntu 21.04

Kernel 5.11.0-7620-generic

4

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.

1

The Chrome flags changes didn't work for me (Ubuntu 22.04 + Wayland).

I fixed it by reinstalling PipeWire:

sudo apt remove pipewire
sudo apt install pipewire pipewire-pulse pipewire-media-session

Actually, I had many problems because I first installed and uninstalled WirePlumber, which ruined my sound devices detection.

For example, after the remove/install of PipeWire + WirePlumber and restarting Ubuntu, the GUI didn't start, so I had to reinstall it. (i.e. sudo apt-get install --reinstall ubuntu-desktop)

Also, I have to fix my sound devices detection issue:

sudo touch /usr/share/pipewire/media-session.d/with-pulseaudio
systemctl --user restart pipewire-session-manager
sotirov
  • 4,379
DexBG
  • 111
0

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:

sudo sed 's/^.*WaylandEnable.*$/WaylandEnable=false/' -i /etc/gdm3/custom.conf.

For other distributions, like OpenSUSE, the command is:

sudo sed 's/^.*WaylandEnable.*$/WaylandEnable=false/' -i /etc/gdm/custom.conf.

Reboot system or restart display manager.

gman
  • 2,324
0

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.

0

You can change to xORG simply from the start window session of Ubuntu. Select your profile and rigth bottom click on the icon and change ubuntu for ubuntu xorg.

Bye!

0

Another alternative is to use a virtual camera compatible with wayland.

OBS Project (https://obsproject.com) is a multi plateform app allowing to do that (and much more) easily.

You can follow detailled steps on zoom support site.

Please note for virtual camera to works on ms team (desktop) app, you must set output resolution to 720p (1280x720) as mentioned here : https://jb.rainsberger.ca/permalink/microsoft-teams-obs-virtual-camera-linux

OBS is a quick and powerfull solution here...

dadaxr
  • 1