How can I automatically unlock gnome-keyring at boot?

I will post it if you want, but I’m not using GDM. As for pam.d:

chfn                                   gdm-smartcard-sssd-exclusive
chpasswd                               gdm-smartcard-sssd-or-password
chsh                                   gnome-screensaver
common-account                         login
common-account.pam-old                 newusers
common-auth                            other
common-auth.pam-old                    passwd
common-password                        polkit-1
common-password.pam-old                ppp
common-session                         runuser
common-session-noninteractive          runuser-l
common-session-noninteractive.pam-old  samba
common-session.pam-old                 sddm
cron                                   sddm-autologin
cups                                   sddm-greeter
gdm-autologin                          sshd
gdm-fingerprint                        su
gdm-launch-environment                 sudo
gdm-password                           sudo-i
gdm-smartcard                          su-l
gdm-smartcard-pkcs11-exclusive

About the startup applications, there’s nothing on KDE settings. There’s an autostart section but nothing related to this. If I manually run gnome-session-properties I get the gnome autostart manager, but there’s nothing related there either. In any case, my running daemon has no ssh words in it.

Look in ~/.config/autostart/ directory

 ls ~/.config/autostart/

I’m curious by that statement I can see it sshd

Where do you see ssh there?

/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets

Nothing related to keyring in ~/.config/autostart/ either. Maybe one of my autostart apps is launching it…

BTW, I think I found the reason why the keyring stores dissapear, they don’t dissapear, if I reload the daemon they appear again, but they dissapear (at least for Seahorse GUI) whenever I launch Chrome or Chrome beta.

EDIT

It seems like, after reloading the daemon and getting the keyring back, it doesn’t dissapear anymore, it’s like Chrome is saving something inside the first time and that causes weird stuff.

Also, I found this command somewhere:

eval "$(printf '\n' | gnome-keyring-daemon --replace --unlock --daemonize)"

I still don’t know why/where/who is starting the daemon at boot, but that command replaces it, and creates (if not present) a “login” keyring store and unlocks it. Supposedly the password for this store should be the same as for the login, but it is not. I have no idea which password the store has, but that command, once created the first time, unlocks it.

For now I’m gonna run that command at boot, as it serves my purposes. Probably that same thing could be done from PAM config but, for the time being, I’m gonna leave it like that. Let’s see if the store remains without dissapearing or corrupting…

I am still curious to know who starts the daemon in the first place. We can keep investigating that. I’m also curious to know what password (or not the password itself, but the reason of this) of the automatically created login keyring, as it should be the same login password, AFAIK.

This topic was automatically closed after 30 days. New replies are no longer allowed.