File gnome-keyring-check-session.patch of Package gnome-keyring
--- pam/gkr-pam-module.c~ 2008-02-14 08:07:21.000000000 +1100
+++ pam/gkr-pam-module.c 2008-08-02 11:32:50.000000000 +1000
@@ -788,6 +788,11 @@ pam_sm_authenticate (pam_handle_t *ph, i
/* Should we start the daemon? */
if (args & ARG_AUTO_START) {
+ const char *wm = getenv ("WINDOWMANAGER");
+ /* we don't start the keyring if we're not starting a gnome-session */
+ if (!wm || strncmp (wm, "/usr/bin/gnome", 14))
+ return PAM_SUCCESS;
+
ret = start_daemon_if_necessary (ph, pwd, password, &started_daemon);
if (ret != PAM_SUCCESS)
return ret;
@@ -855,6 +860,10 @@ pam_sm_open_session (pam_handle_t *ph, i
/* Should we start the daemon? */
if (args & ARG_AUTO_START) {
+ const char *wm = getenv ("WINDOWMANAGER");
+ /* we don't start the keyring if we're not starting a gnome-session */
+ if (!wm || strncmp (wm, "/usr/bin/gnome", 14))
+ return PAM_SUCCESS;
ret = start_daemon_if_necessary (ph, pwd, password, &started_daemon);
if (ret != PAM_SUCCESS)
return ret;