-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
We've got basic file open/save support using snapd master and xdg-desktop-portal 0.11, so I've been looking at improving functionality of the other portals. I'm willing to do some of the work to improve things on both the xdg-desktop-portal and snapd sides, but would appreciate some input on possible solutions.
-
The main one is that no app ID is shown in the auth dialogs for e.g. screenshots or when rate limiting of requests to open URIs happens. This is because the "app ID" we use for snaps does not have a corresponding .desktop file (partly since a single snap package can contain multiple apps).
There should be .desktop files for the individual apps, and it should be possible to match them based on the security label though. I do wonder about communication with xdg-destkop-portal-gtk though: we could pass this .desktop file ID through to it, which would probably fix the dialog but it would no longer represent the security origin.
I also wonder if xdg-desktop-portal-gtk should be displaying the application ID to the user too, since it can't be forged like the human readable name and icon from the desktop file.
-
The notifcations portal also runs into issues with no .desktop file matching the "app ID" used for the snap. This is probably the same as the previous issue, but I need to double-check.
-
The network connectivity portal checks the
.flatpak-info
file to check whether an app has network access before responding. We'd need to contact snapd for that information for snaps.
We can get most of this information from snapd, but communicating with it directly is tricky without adding a new dependency (libsnapd-glib). One option would be to add a command to the "snap" utility that could provide the needed information, and then have xdg-desktop-portal spawn that and read its output. I guess the questions then are:
- what information should the command produce, and in what format?
- what arguments should the command take? Security label alone might be enough, but maybe pass process ID too?