35

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
  • 37,085
  • 25
  • 149
  • 228
iAmGregorJ
  • 459
  • 1
  • 4
  • 6
  • 2
    Up to now, the problem is on the MS Teams side (long story short, they use an old version of electron). If you want this feature, you can upvote this feature request https://microsoftteams.uservoice.com/forums/555103-public/suggestions/41524504-screen-sharing-on-wayland – tigerjack Sep 27 '21 at 11:13
  • I don't know, where the other feature request has gone. But this seems to be currently the must upvoted feature request regarding that issue: https://feedbackportal.microsoft.com/feedback/idea/4eacaa70-272e-ec11-b6e6-00224827bbc2 – Enno Gröper Mar 26 '22 at 15:55

9 Answers9

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
  • 519
  • 2
  • 5
  • 8
    Although this is the best answer, compared to the comments, it's slightly wrong: The issue is both with MS and Electron. As it can be seen in the github repo https://github.com/electron/electron/issues/23063 MS had not build Teams with the flag needed for screen sharing on electron, which by the way the version used by MS is now unsupported, but also Electron only implemented the feature by default in their latest v12 release, so I would expect several issues still. – Arehandoro Apr 20 '21 at 14:14
  • 2
    Yes the issue is MS, the Teams web app in chromium works perfectly with wayland and screen sharing. – Pascal Aug 27 '21 at 09:03
  • @Pascal what version of Chromium works for you? – xhudik Jan 04 '22 at 15:13
  • 3
    I am on Arch Linux and since August every version, currently `Chromium 96.0.4664.110 Arch Linux`, but you need the xdg-desktop-portal running https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing – Pascal Jan 04 '22 at 15:45
  • @Pascal on Debian 11 we are not there yet... – 71GA Oct 03 '22 at 19:54
  • that's maybe correct but as always you can download chromium yourself – Pascal Oct 06 '22 at 09:49
12

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

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
  • 8
    cannot confirm here with UBuntu 20.10 - when trying to share screen, I get the option to chose the entire screen, but it's only black. Or two apps - Chrome or PyCharm, despite I have multiple other windows. – Henning Nov 22 '21 at 13:17
  • Most practical answer! THX. I was going to test XWayland, but using Chrome is an excellent option, specially when the rest of your working environment (except shells) are browser-based. – runlevel0 Dec 23 '21 at 10:52
  • 1
    unfortunately, it doesnt screenshare on Ubuntu 21.10 and Chrome 96.0.46. @Aleksey Rubtsov - what was your setup? (ubuntu, and chrome versions) – xhudik Jan 04 '22 at 15:11
  • 5
    likely I found the problem: in chrome run: `chrome://flags/#enable-webrtc-pipewire-capturer` and set `enable` (kudos: https://techcommunity.microsoft.com/t5/discussions/screen-share-on-linux-build-on-wayland-does-not-work/m-p/2278031 ) – xhudik Jan 04 '22 at 15:28
  • Tried MS Teams web on Ubuntu 22.04 - WORKS. – Ondra Žižka Jul 01 '22 at 09:58
6

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
  • 181
  • 1
  • 5
  • 1
    screensharing using Teams on Chrome only works for certain applications (notably, Chrome itself and Codium) but not the whole screen. – bluppfisk Mar 17 '22 at 10:59
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

Madpoptart
  • 41
  • 1
3

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.

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,206
  • 4
  • 26
  • 39
  • Not sure why this was downvoted, but the answer is correct as of 2021-10. – Bastian Venthur Oct 24 '21 at 18:29
  • 1
    The topic is about enabling screen share on Wayland and not "A WAY" of enabling screen share. This just disable wayland, – Bruno de Oliveira Nov 13 '21 at 07:09
  • I would downvote it (not enough rep.) because: as @BrunodeOliveira said it is NOT answering the question and "A less drastic solution would be to disable Wayland and use xOrg." is highly opinionated. For me it **is the most drastic way**, as I need to separately scale my laptop and my external monitor. – Krisztián Szegi Apr 05 '22 at 08:21
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