xdg-desktop-portal icon indicating copy to clipboard operation
xdg-desktop-portal copied to clipboard

screencast: Add a way to remember (or programmatically assign) granted permissions

Open marcodiiga opened this issue 5 years ago • 4 comments

AFAIK there's currently no way of granting sources and devices permissions without user intervention (by prompt of a UI dialog when start is invoked).

A remember granted permissions option might be a viable solution. Bonus points if the permissions could be granted programmatically to allow streaming server applications to adjust permissions automatically (IaC deployments on cloud machines for instance) and be immediately ready to start.

marcodiiga avatar May 17 '19 13:05 marcodiiga

I tend to think that for cloud or similar 'headless' use cases, you probably want different portal implementations, since interaction is never the right thing there, while we very much want interaction for desktop use cases.

matthiasclasen avatar May 17 '19 13:05 matthiasclasen

The beta branch of the Steam client now uses xdg-desktop-portal and Pipewire to capture a Wayland screen for Steam Remote Play streaming (which you could think of as being a bit like VNC, but game-optimized) and would benefit from a way to remember the granted permissions.

At the moment, it asks for permission on every startup (ValveSoftware/steam-for-linux#8098) but that's clearly not the intended UX. Asking for permission every time you initiate streaming is not really ideal either, because part of the purpose of Remote Play is to be able to use a thin client (laptop, phone, Steam Link, smart-TV) to stream games from a gaming PC that might be in a different room. It would be better if Steam could ask for permission the first time you use the feature, with a "remember this" checkbox.

When Steam is run as a non-sandboxed (system) app, in principle it could do all the Pipewire setup itself, but that would mean duplicating desktop-specific code from the desktop-specific portal backends like xdg-desktop-portal-gnome and -kde.

When Steam is run as a Flatpak app, it has no choice but to use the portal.

smcv avatar Sep 24 '21 10:09 smcv

If I understand correctly #638 should solve this, although applications need to be updated to support it instead of the dialog just having a "remember" checkbox. OBS for one uses this already thanks to obsproject/obs-studio#5559, and the GNOME portal implementation has support for it too. At the moment neither the KDE or wlroots portals support this yet, issues have been filed for both (bug 445875 on the KDE Bugzilla and emersion/xdg-desktop-portal-wlr#170 respectively)

X-m7 avatar Mar 12 '22 23:03 X-m7

Seems like the fix for KDE is already merged: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/79

major-mayer avatar May 31 '22 21:05 major-mayer

Yes, as far as I can see, https://github.com/flatpak/xdg-desktop-portal/pull/638 implements what is being requested here.

GeorgesStavracas avatar Dec 12 '22 21:12 GeorgesStavracas