The issue with Ubuntu 22.04 is using a display feature called wayland. Wayland is not supporting to screen share by default(Untill now, atleast!). In previous ubuntu version we had xorg for display feature.
To check which display feature your ubuntu is using, please enter this command
echo $XDG_SESSION_TYPE
If the above command outputs, wayland, your system is using wayland.
We have to disable wayland and enable xorg (x11). To do this,
Please go to this file
sudo nano /etc/gdm3/custom.conf
Uncomment this line.
WaylandEnable=false
Reboot your system.
Voila! You can share your screen. You can confirm this by re-entering this command.
For Slack in-app screen recording and screen sharing:
Quit Slack app.
In the terminal:
slack --enable-features=WebRTCPipeWireCapturer
Make it persist across reboots:
If that works, you can add the flag to the slack.desktop file Exec line. Should look something like: Exec=/usr/bin/slack --enable-features=WebRTCPipeWireCapturer %U
Tested on Ubuntu 22.04LTS and:
$ slack --version
4.27.156
$ echo $XDG_SESSION_TYPE
wayland
$ dpkg -l | grep -i pipewire
ii libpipewire-0.3-0:amd64 0.3.48-1ubuntu1 amd64 libraries for the PipeWire multimedia server
ii libpipewire-0.3-common 0.3.48-1ubuntu1 all libraries for the PipeWire multimedia server - common files
ii libpipewire-0.3-modules:amd64 0.3.48-1ubuntu1 amd64 libraries for the PipeWire multimedia server - modules
ii libspa-0.2-modules:amd64 0.3.48-1ubuntu1 amd64 libraries for the PipeWire multimedia server Simple Plugin API - modules
ii pipewire:amd64 0.3.48-1ubuntu1 amd64 audio and video processing engine multimedia server
ii pipewire-bin 0.3.48-1ubuntu1 amd64 PipeWire multimedia server - programs
ii pipewire-media-session 0.4.1-2ubuntu1 amd64 example session manager for PipeWire
The issue with Ubuntu 22.04 is using a display feature called wayland. Wayland is not supporting to screen share by default(Untill now, atleast!). In previous ubuntu version we had xorg for display feature.
To check which display feature your ubuntu is using, please enter this command
If the above command outputs, wayland, your system is using wayland.
We have to disable wayland and enable xorg (x11). To do this,
Please go to this file
Uncomment this line.
Reboot your system.
Voila! You can share your screen. You can confirm this by re-entering this command.
Now it should display x11.
Enjoy!
Only works for web browser
Go to
chrome://flags/#enable-webrtc-pipewire-capturer
using the address bar of your browser.Click the drop down menu, and click Enabled.
Finally Restart the browser
This will enable the browser to prompt screenshare access
Since Wayland is not supporting screen share by default, there is already an experimental way with chrome browser.
First you need to export the metadata API from the pipewire media sessions.
At chrome experimental features enable the WebRTC PipeWire support
Restart the browser and now you can share your screen.
I tried the
global.context.unsafe_mode=true
solution, but Google Meet was still showing black screens, so didn't test it any further.What worked for me was switching to X11/Xorg, which I did by
For Slack in-app screen recording and screen sharing:
Source: https://github.com/flathub/com.slack.Slack/issues/101#issuecomment-808430530
As mentioned this is a Security Feature of Wayland. You can either use XOrg or disable the save mode of Wayland by doing:
Alt
+F2
lg
and press enterglobal.context.unsafe_mode=true
and enterThis will work till you reboot/log out. I wrote a small Gnome Extension which does can disable the safe mode on demand. See https://github.com/julianpollmann/zoom-wayland-gnome-extension
Now the screen sharing in Wayland is available with the zoom client for Ubuntu.
https://support.zoom.us/hc/en-us/articles/205759689#:~:text=Resolved%20an%20issue%20regarding%20sharing%20content%20on%20Gnome%2041%20with%20Wayland%C2%A0
Check the release notes in
5.11.0 (3540)
release.Just install