Files
Panama/config/dot/xdg-desktop-portal/hyprland-portals.conf
T
Gabriel Brown fe74a82a46 Route the Background portal to xdg-desktop-portal-gnome
Nothing served org.freedesktop.impl.portal.Background under Hyprland:
gnome.portal implements it but is UseIn=gnome, same situation the
Secret mapping below already solves for gnome-keyring. Every Flatpak
app's own "run/start on login" toggle goes through this portal, so it
silently failed for all of them -- Bitwarden logged the failure on
every launch.

Verified live rather than assumed: xdg-desktop-portal-gnome starts as
a standalone backend process with no dependency on GNOME Shell or
gnome-session, and after adding the mapping and restarting the portal,
Bitwarden's own autostart request succeeded end to end
(response=Background { background: true, autostart: true }) where it
previously errored with "portal frontend ... was not found".

Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
2026-08-18 22:32:53 -04:00

38 lines
2.3 KiB
Plaintext

# ─────────────────────────────────────────────────────────────────────────────
# Portal backend routing for the Hyprland session
#
# This overrides /usr/share/xdg-desktop-portal/hyprland-portals.conf, which
# ships `default=hyprland;gtk` and no Secret mapping.
#
# Why each line:
# hyprland -> Screenshot, ScreenCast, GlobalShortcuts, InputCapture
# (this is what makes OBS / Sunshine / Zoom screen sharing work)
# gtk -> FileChooser, Settings, Notification, Print, Access
# Settings is load-bearing: xdg-desktop-portal-gtk reads
# gsettings' org.gnome.desktop.interface and serves
# org.freedesktop.appearance, which is how libadwaita apps know
# to be dark.
# Secret -> gnome-keyring. Its own portal file is UseIn=gnome, so under
# XDG_CURRENT_DESKTOP=Hyprland nothing would claim Secret and
# Flatpak apps needing credential storage would fail.
# Background -> xdg-desktop-portal-gnome. It's the only installed backend
# that implements this interface (gnome.portal is UseIn=gnome,
# same problem as Secret above), and it runs as a standalone
# daemon that doesn't need GNOME Shell or gnome-session --
# confirmed live: it starts cleanly under Hyprland and Flatpak
# apps' RequestBackground calls succeed. Without this mapping
# nothing serves org.freedesktop.portal.Background at all, so
# any Flatpak app's own "run/start on login" toggle silently
# fails (Bitwarden logged this on every launch).
#
# xdg-desktop-portal-gnome stays installed and is now used for one interface
# here; it is still the default handler for the GNOME session.
# ─────────────────────────────────────────────────────────────────────────────
[preferred]
default=hyprland;gtk
org.freedesktop.impl.portal.Screenshot=hyprland
org.freedesktop.impl.portal.ScreenCast=hyprland
org.freedesktop.impl.portal.Secret=gnome-keyring
org.freedesktop.impl.portal.Background=gnome