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_idin 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_idis used.
Supported types
remote-desktop
Caveats
- Host applications can impersonate any
app_id. - The empty
app_idmay match too broadly. It's better to have the application provide one, by following those conventions or by registering directly with the Registry.