Solution for being unable to share screen on Ubuntu 22.04

When I installed Ubuntu 22.04, I wasn't able to share my screen on any call. Initially, I thought that the issue is with my browser. But, later I figured out that the issue is Ubuntu 22.04 itself.

*Note: This issue is there in the initial releases of 22.04. I think this should be resolved soon.

Problem

The issue is that Ubuntu is using Wayland as the default display. Wayland as of now does not support screen sharing. Therefore, you need to change this.

Solution

  1. To check which display Ubuntu is using, type in this command on the terminal:

    echo $XDG_SESSION_TYPE
  2. If the output is Wayland, then your system is using Wayland. You have to change the default display to x11.

  3. Type in this command on the terminal and then, enter your password:

    sudo gedit /etc/gdm3/custom.conf

    *Note: You can use nano, subl or any editor you like.

  4. Uncomment the line:

    WaylandEnable=false
  5. Save the file and reboot.

And, you are done!!

Sources

[Last updated on 09th June, 2022]