Closed jokeyrhyme closed 10 months ago
As a curiosity, how do applications behave if gnome-keyring
is missing? Will it just be the same as before?
As a curiosity, how do applications behave if
gnome-keyring
is missing? Will it just be the same as before?
I just tested with org.freedesktop.impl.portal.Secret=foo;
and I observe the previous behaviour (applications almost instantly receive errors rather than expected results from the Secret portal)
My understanding is that the flow is something like this:
xdg-desktop-portal
to use the "gnome-portal" backend for the Secret portalxdg-desktop-portal
looks for /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal (the *.portal file with "gnome-portal" as the base name)xdg-desktop-portal
to send the Secret request to the D-Bus service with ID "org.freedesktop.secrets"gnome-keyring-daemon
gnome-keyring-daemon
connects to the D-Bus session and asks to receive messages addressed to "org.freedesktop.secrets"So, really, all I've manually tested so far is that a missing file at step 2 causes the Secret portal request to fail, and that getting all the way to step 4 or 7 causes the Secret portal request to succeed
In theory, other failures could happen at steps 3, 5, and 6 depending on missing registrations/files and/or bad values in files, but I've not tested those cases
Interestingly, KDE's Secret implementation (not yet merged) follows the GNOME pattern here, with the portal implementation hosted within the keychain service and not mediated through xdg-desktop-portal-kde: https://invent.kde.org/frameworks/kwallet/-/merge_requests/67
Perhaps once that is merged, we could raise a future PR to set org.freedesktop.impl.portal.Secret=gnome-keyring;kwalletd;
, if it was expected that COSMIC users would prefer to rely on KDE's implementation and not have GNOME's lying around
Although, I'm guessing eventually COSMIC might have it's own implementation that doesn't rely on GNOME or KDE
Nice to see that PR, we are currently lacking a bunch of protocols, so I wanted to add this file anyway.
I noticed that I couldn't run apps like Fractal ( https://flathub.org/apps/org.gnome.Fractal ) in COSMIC, because there's no COSMIC implementation of the Secret portal ( https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Secret.html ) and the built-in implementation in
gnome-keyring
specifically only suggests toxdg-desktop-portal
that it should be used in GNOME ( https://gitlab.gnome.org/GNOME/gnome-keyring/-/blob/master/daemon/gnome-keyring.portal )Without a recommended per-desktop portal configuration file,
xdg-desktop-portal
can only rely on thoseUseIn=
fields to figure out which implementations to use for which portalsThe
UseIn=
field in *.portal files is deprecated in favour of per-desktop portal configuration files: https://flatpak.github.io/xdg-desktop-portal/docs/backends.html (although we probably shouldn't remove theUseIn=
field for now)This PR adds such a per-desktop- portal configuration file, and specifically asks
xdg-desktop-portal
to rely ongnome-keyring
's implementation of the Secret portal, and my testing shows that Fractal now works as expectedI'm happy to change this to a different Secret portal implementation as necessary, but I'm not currently sure what the plan is for keyrings under COSMIC