We can’t grant snaps access to xdg-permission-store, as it is explicitly there to store settings about sandboxed apps access to the system.
It does sound like passing ask=True
in the options dictionary argument of the OpenURI.OpenFile
D-Bus method would achieve what you’re after, which I guess is what you’re trying to do digging into the xdgopenproxy code.
One thing to keep in mind is that nothing the /usr/bin/xdg-open
proxy provided by snapd does is privileged. There’s nothing stopping you from providing your own implementation in its place (in fact, apps using the GLib/GTK API will end up making the D-Bus call directly if they’ve enabled portal support). So if you find the Go code unfamiliar, you could always write something in another language and package that in your snap.