Automatically unlock gnome keyring at boot


I’m using i3 with EndeavorOS (really like the rice by the way) and i halso use visual-studio-code-bin rather than code because i want settings sync and github copilot. Therefore, i had to install gnome-keyring.
I don’t have a password on boot, it goes straight to the OS (this is my home-pc). I want gnome-keyring to be automatically unlocked on boot as well as it bothers me that i have to enter my password once i start vscode. I followed but the keyring is still not enabled on boot.

[buckfae@buckfae-pc ~]$ sudo cat /etc/pam.d/login 

auth       required
auth       requisite
auth       include      system-local-login
auth       optional
account    include      system-local-login
session    include      system-local-login
session    optional auto_start
password   include      system-local-login
[buckfae@buckfae-pc ~]$ cat ~/.bash_profile 
# ~/.bash_profile

[[ -f ~/.bashrc ]] && . ~/.bashrc

# Unlock gnome keyring
if [ -n "$DESKTOP_SESSION" ];then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
[buckfae@buckfae-pc ~]$ 

Thank you in advance!

When using console-based login, edit /etc/pam.d/login

But you will use lightdm and autologin as you describe?
would be the file to edit??

Not sure eat the moment about if this is working passwordless …

And welcome at the forum with such a nice little challenging question :milky_way: :enos_flag:

Welcome to the forum @Buckfae :partying_face::tada:

1 Like

I changed the file /etc/pam.d/lightdm:

[buckfae@buckfae-pc ~]$ sudo cat /etc/pam.d/lightdm
auth        include     system-login
auth        optional
account     include     system-login
password    include     system-login
session     include     system-login
session     optional auto_start

I assume that i had to remove the -?
It still does not work.

I can confirm that i’m using lightdm:

[buckfae@buckfae-pc ~]$ grep '/usr/s\?bin' /etc/systemd/system/display-manager.service

Script origin:

You can also try installing seahorse and set the password for the keyring as blank.

i would bet the issue comes with autologin as it does not unlock your key in this case.

I decided to just remove autologin. Now (after i logged in properly) the keyring is unlocked. Thank you anyway!

1 Like

that’s the issue with this … and seem still the only workaround is to use an empty password for unlocking the key… not really the best option… and having login screen is not that bad :wink:

Yea i guess so. Thank you a lot for your help!

Do you mind sharing your .bashrc or your terminal config in general? Looks really awesome!

this is zsh and I am a simple guy …, I use “oh-my-zsh”
some helping tools installed in addition and sourced:

fortune (and mods you like :wink: )

alias cat=‘bat’ is what makes the cat output showing with line-numbers


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