How can I replace the gnome-keyring-daemon with a daemon of my own?

I have developped a new D-Bus daemon implementing the Secret Service API ( Secret Service API Draft ) and using Vault/Bitwarden as a backend storage. The idea is to fully integrate this password manager within Linux desktop environments.

As an enthusiastic user for years, I would like to do it with GNOME first. Do you know where and when the gnome keyring daemon is started so that I can launch my own daemon instead? Is it possible to keep the default daemon for everything but the logins?

I did not find a proper documentation for this. I did a chmod -x gnome-keyring-daemon for testing purposes, it works!, but I know this is ugly and not serious for a production usage…

Thank you!

Nobody? :blush:

I’m trying to figure it out, but that is not an easy task!

I’ve identifed so many entities trying to start it…, like:

  • some .desktop files in /etc/xdg/autostart,
  • some service files in /usr/lib/systemd/user/ and /usr/share/dbus-1/services/ (example files?),
  • many occurences of pam_gnome_keyring in /etc/pam.d/*…

At the moment, only the chmod -x completely stops the service… but that is ugly and I would like to keep the daemon for pkcs11.

NB: I’m on debian stable.

There is a old document that may still be useful Projects/GnomeKeyring/RunningDaemon – GNOME Wiki Archive

Thank you the reference.

Basically, I had to remove everything :slight_smile:

# systemd
sudo systemctl --global disable gnome-keyring-daemon.socket
sudo systemctl --global disable gnome-keyring-daemon.service
     systemctl --user   disable gnome-keyring-daemon.socket
     systemctl --user   disable gnome-keyring-daemon.service
# pam
sudo sed -i 's/^[^#].*pam_gnome_keyring.so/# disable gnome-keyring-daemon:\n#    &/' /etc/pam.d/*
# d-bus
sudo mv /usr/share/dbus-1/services/org.freedesktop.secrets.service /usr/share/dbus-1/services/org.freedesktop.secrets.service.disabled
# autostart
mkdir -p ~/.config/autostart
cp /etc/xdg/autostart/gnome-keyring-secrets.desktop ~/.config/autostart
echo "X-GNOME-Autostart.enabled=false" >> ~/.config/autostart/gnome-keyring-secrets.desktop
echo "Hidden=true"                     >> ~/.config/autostart/gnome-keyring-secrets.desktop
1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.