Sway + screencast (screen share) via Telegram

Hello.

I’ve got everything set up as I’d like it to be. Really nice Linux distribution and looks like I’m going to switch to it for my main system.

What I’d like to know is how to get screen casting (screen sharing) working on Sway (Wayland) while using Telegram? Can someone please help me with this? I’m a bit new to Arch Linux.

okay, so I got it work.

Here’s how I did it:

  1. open up a terminal
  2. run: pacman -S xdg-desktop-portal-wlr slurp bemenu
  3. run: mkdir -p ~/.config/xdg-desktop-portal/
  4. run: nano ~/.config/xdg-desktop-portal/portals.conf
  5. add the following:
    [preferred]
    default=wlr
    org.freedesktop.impl.portal.ScreenCast=wlr
    org.freedesktop.impl.portal.Screenshot=wlr
    org.freedesktop.impl.portal.Inhibit=none
  6. CTRL+S to save, and then exit with CTRL+X
  7. run: mkdir ~/.config/environment.d/
  8. run: nano ~/.config/environment.d/xdg-desktop-portal.conf
  9. add the following:
    XDG_CURRENT_DESKTOP=sway
  10. CTRL+S to save, and then exit with CTRL+X
  11. run: nano ~/.config/sway/config
  12. add the following to the end:
    exec /usr/lib/xdg-desktop-portal -r
  13. CTRL+S to save, and then exit with CTRL+X
  14. Reboot and screencasting should now work while using the Sway window manager.