Pages
Developer Documentation
On this page

Portal pre-authorization

Interactive permission prompts are useful, but sometimes access to resources has to be authorized without one.

For this, xdg-desktop-portal-sonicde has a permission table named kde-authorized in the standard xdg-desktop-portal permission store. An entry in this table bypasses the interactive prompt. To authorize a well-known application, pass its app_id to the set command:

flatpak permission-set kde-authorized remote-desktop org.example.remotedesktop yes

To authorize a host application without an app_id, use an empty one:

flatpak permission-set kde-authorized remote-desktop "" yes

The app_id usually comes from Flatpak or Snap metadata. For host applications, it comes from the Registry or the systemd unit name:

  • Applications can set their own app_id in the XDG portal Registry.
  • Applications started by the desktop are set up correctly.
  • Manually created units should follow the systemd desktop environment conventions, naming the unit app-org.example.appname.service.
  • If the name can't be determined, the empty app_id is used.

Supported types

  • remote-desktop

Caveats

  • Host applications can impersonate any app_id.
  • The empty app_id may match too broadly. It's better to have the application provide one, by following those conventions or by registering directly with the Registry.

Adapted for SonicDE from develop.kde.org/docs/administration/portal-permissions/ by Blagovest Petrov, Carl Schwan, Harald Sitter, Kristen McWilliam, Nicolas Fella, Thiago Sueto, Yvan Masson, shenleban tongying, licensed under CC BY-SA 4.0.

Edit this page on GitHub

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.