Unlock Gnome-Keyring Automatically

I was annoyed with having to type in my keyring password every time I log in to my Wi-Fi (NetworkManager connects to the available Wi-Fi networks automatically at startup).
I found a solution that I am not asked for a password for the default keyring anymore. The solution is pam_keyring, which is a PAM Module.
It will unlock the default keyring with your gdm login password just after your login to the gnome session.

In Gnome 2.20 (included in Ubuntu 7.10) this behavior is implemented by default. It will automatically unlock the keyring after logon. Have a look at the Gnome 2.20 Release Notes.

Note that this will only work if your default keyring has the same password as your gnome session. It will also not work if automatic login is enabled. D'oh!

HowTo

To make a long story short, this is what you have to do on an Ubuntu 7.04 (it may vary on other distros):

  1. apt-get libpam-keyring
  2. Append this to your /etc/pam.d/gdm config file
@include common-pamkeyring

Links

Automatically Unlock Keyring
Reset/Clear Keyring Password
pam_keyring