Skip to content

Arch package depends on xdg-desktop-portal-gnome which silently breaks screencasting out of the box #3798

Description

@cetin-m

Description

The niri Arch Linux package declares xdg-desktop-portal-gnome as a dependency. When both xdg-desktop-portal-gnome and xdg-desktop-portal-wlr are installed without a portals.conf, the gnome portal wins the D-Bus arbitration and xdg-desktop-portal-wlr is never activated — breaking all screen sharing silently out of the box.

This means a fresh Arch install of niri ships in a broken screencasting state with no warning, caused by niri's own dependency pulling in the conflicting portal backend.

Steps to Reproduce

  1. Install niri on Arch Linux (pulls in xdg-desktop-portal-gnome as a dependency)
  2. Install xdg-desktop-portal-wlr (as recommended in the wiki for screencasting)
  3. Try to share screen in any browser-based app (Teams, Meet, etc.) or OBS
  4. Only the browser window appears — no native picker, no other windows/outputs

Verify the problem:

systemctl --user status xdg-desktop-portal-wlr
# Shows: inactive (dead)

Root Cause

xdg-desktop-portal-gnome is listed as a required dependency of the niri Arch package. When both portal backends are installed without an explicit portals.conf, gnome takes precedence. Since xdg-desktop-portal-gnome does not speak the wlr-screencopy protocol that Niri implements, screen capture fails.

Workaround

Create ~/.config/xdg-desktop-portal/portals.conf:

[preferred]
default=wlr
org.freedesktop.impl.portal.ScreenCast=wlr
org.freedesktop.impl.portal.Screenshot=wlr

Then restart the portal stack:

systemctl --user restart xdg-desktop-portal xdg-desktop-portal-wlr

Suggested Fix

Either:

Option A — Ship a default niri-portals.conf (or instruct users to create portals.conf) as part of the Arch package or the wiki setup guide, explicitly routing ScreenCast to wlr.

Option B — Replace the xdg-desktop-portal-gnome dependency with xdg-desktop-portal-wlr in the Arch package, since -wlr is the correct backend for Niri.

Notes

System Information

  • niri version: niri 25.x (Arch Linux)
  • Distro: Arch Linux
  • Affected backends: xdg-desktop-portal-wlr (inactive when -gnome is also present without portals.conf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    not niriOther non-niri issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions