You are not logged in.

#1 2011-06-26 16:41:23

Touba
Member
Registered: 2009-11-03
Posts: 19

Auto-unlock default keyring at startup without using a login manager?

Hello, I'm a Gnome user, but I don't use GDM, SLiM or any other manager; instead I'm logging in using /bin/login along with a startx command automatically so that I can start up right in the graphical desktop.

Now Chromium stores the passwords in Gnome Keyring, where I store the network configuration settings for NetworkManager too, and I'm seeing an "unlock default keyring" dialog every time I start up; is there a way to unlock it automatically at startup without using a login manager?

Offline

#2 2011-06-26 17:13:53

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Auto-unlock default keyring at startup without using a login manager?

Try this: http://superuser.com/questions/141036/u … -without-x

Note that the keyring password must be the same as your log in password for the keyring to be automatically unlocked during log in.

Last edited by foutrelis (2011-06-26 17:16:23)

Offline

#3 2011-06-26 19:37:08

Touba
Member
Registered: 2009-11-03
Posts: 19

Re: Auto-unlock default keyring at startup without using a login manager?

Thank you for the pointer foutrelis! Although it didn't work as I expected.

Thing is, after reading the official PAM page in the Gnome Keyring site [1] looking for more information I learned that it will only work if you're logging typing your password. Right now I'm logging in using an autologin script along with agetty (like the official install images):

Related line in inittab:

c1:2345:respawn:/sbin/agetty -8 -s -n -l /usr/bin/autologin 38400 tty1 linux

/usr/bin/autologin:

#!/bin/bash
/bin/login -f username

And then starting the X11 server via the bash configuration file:

# Start X if running in runlevel 5:
if [[ -z $DISPLAY && $(tty) = /dev/tty1 && `runlevel | cut -c3` = 5 ]]; then
   startx &> /dev/null
fi

Since I'm forcing the login with the -f option when calling /bin/login I'm not typing the password, so the keyring doesn't get unlocked; while logging in interactively typing the password does unlock the keyring. That would defeat the purpose of going straight to the graphical desktop, and as far as I know you can't fed /bin/login a password in a script for example... So I think it might be unsolvable what I'm pursuing.

[1]: http://live.gnome.org/GnomeKeyring/Pam

Offline

Board footer

Powered by FluxBB