XDG portals
Set up screen sharing, clipboard, keyring, and file pickers using XDG portals.
Screen Sharing
To enable screen sharing (OBS, Discord, WebRTC), you need xdg-desktop-portal-wlr.
Install Dependencies
pipewire, pipewire-pulse, xdg-desktop-portal-wlr
Update Autostart
Add this to your autostart.sh or exec-once config to ensure dbus knows about the environment.
Environment Variables:
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wlrootsPortal Service:
The portal service line is not necessary. It only avoids situations where the service may not start automatically.
# The path may be /usr/lib/ or /usr/libexec/ depending on distribution
/usr/lib/xdg-desktop-portal-wlrAfter configuration, restart your computer once to apply all changes properly.
Known Issues
-
Window screen sharing issue:
https://github.com/DreamMaoMao/mangowc/pull/184 -
Screen recording lag or stuttering:
https://github.com/emersion/xdg-desktop-portal-wlr/issues/351
Clipboard Manager
Use cliphist to manage clipboard history.
Dependencies: wl-clipboard, cliphist, wl-clip-persist
Autostart Config:
# Keep clipboard content after app closes
wl-clip-persist --clipboard regular --reconnect-tries 0 &
# Watch clipboard and store history
wl-paste --type text --watch cliphist store &GNOME Keyring
If you need to store passwords or secrets (e.g., for VS Code or Minecraft launchers), install gnome-keyring.
Configuration:
Create ~/.config/xdg-desktop-portal/portals.conf:
[preferred]
default=gtk
org.freedesktop.impl.portal.Secret=gnome-keyringFile Picker (File Selector)
- Dependencies
xdg-desktop-portal,xdg-desktop-portal-gtk - Reboot your computer once to apply.