GNOME Keyring on COSMIC

Thanks for your efforts on getting the COSMIC Desktop at this early stage working on Fedora. I have a question regarding the integration of the GNOME Keyring with the desktop. By default, the GNOME keyring is shipped along with COSMIC and in theory it should start automatically when logging in.

The relevant files are under /etc/xdg/autostart (gnome-keyring-*.desktop) which systemd translates to systemd units. The issue there is, that it does not start as the conditions are not met. More specifically the following parts in these default files are the issue:

...
Comment=GNOME Keyring: SSH Agent
Exec=/usr/bin/gnome-keyring-daemon --start --components=ssh
OnlyShowIn=GNOME;Unity;MATE;
...

This is from the one for ssh. But its the same for all keyring components.
Shouldn’t it be OnlyShowIn=GNOME;Unity;MATE;COSMIC;? In my testing this fixed it and the integration works flawlessly :slight_smile:

Where do I report this? Bugzilla

Cheers,
Sebastian

I think you should report it upstream to Cosmic, and/or to the Cosmic maintainers in Fedora- looks like that is the Rust SIG, you could find them on Matrix chat.fedoraproject.org

For anyone running into this:

cosmic-session has been adapted to start the components if gnome-keyring-daemon is running. See Start GNOME Keyring as part of session by sebastian-xyz · Pull Request #141 · pop-os/cosmic-session · GitHub

A bit of help please, trying to apply the changes mentioned in the PR to my running Fedora 42 with COSMIC but no luck
What I am missing?

Are you using the flatpak version? Then the path to the argv.json might be different

Using the RPM version not the flatpak

“password-store”: “gnome-libsecret”,

sudo dnf list | grep ^code
Updating and loading repositories:
Repositories loaded.
code.x86_64 1.103.2-1755709837.el8 @commandline

Strange. For me it works.

Have you checked that the daemon itself is running? systemctl –user status gnome-keyring-daemon or systemctl –user is-activ gnome-keyring-daemon

Does this help: Update keyring in start-cosmic by ligenix · Pull Request #142 · pop-os/cosmic-session · GitHub

Indeed strange. Matter a fact yesterday I created a fresh Fedora 42 virtual machine and installed COSMIC from ~COSMIC Epoch

Checking `ls /run/user/$(id -u)/keyring` without modifying anything only control was listed.

What you pointed out about /etc/xdg/autostart/gnome-keyring* needing to include COSMIC in the OnlyShowIn made the change to include ssh and pkcs11.

The default service state is disabled for gnome-keyring-daemon.service, then I enabled and started, but not helping, vscode continues complaining that the OS keyring couldn’t be identified.

Also, in the PR142 you referenced, Update keyring in start-cosmic by ligenix · Pull Request #142 · pop-os/cosmic-session · GitHub indeed SSH_AUTH_SOCK env variable is missing, which also was causing me problems when doing remote SSH with vscode and the git credentials.

Ended up applying it as workaround in start-cosmic to set the SSH_AUTH_SOCK env.

Did you also set OnlyShowIn for secrets as this the one you need but you only mentioned pkcs11 and ssh🙂

Correct, `OnlyShowIn` was also updated for secrets. Reviewed again, still no luck.

Can you check whether the keyring is unaocked? If it is I’m out of ideas🥴