Archive for the 'TechPages' Category

How to unlock gnome keyring automatically

NetworkManager is a great tool I have used to the wireless networks. It uses gnome keyring to securely store the passwords to your network connections. But the thing that bugged me the most was that on every reboot it popped up a window to put a password to unlock the default gnome keyring. I just hated to put in the password to unlock the keyring after putting the password to login to my account.

There were some guides which told how to get around the problem, but none of them worked for me. Except this one. But I did not like this approach as it involved storing your password in clear text and I’m not a fan of doing so.

So after some hit and trial I figured out that the solution wasn’t that complex , it was just that the guides I was following were outdated or they missed a seemingly unimportant but crucial step. So I am putting together the steps I followed for this just in case I forget. (These steps are Fedora specific)

This works only if your keyring password is same as your login password. If you have already set your default keyring password you may reset it by deleting the keyrings directory which would prompt you to enter a new password for keyring :

rm -rf  ~/.gnome2/keyrings

First of all install the pam_gnome_keyring package :

sudo yum install -y pam_gnome_keyring

Then edit the login manager file :

for GDM

sudo vi /etc/pam.d/gdm

for KDM

sudo vi /etc/pam.d/kdm

Add the following lines

auth       optional    pam_gnome_keyring.so try_first_pass
session    optional    pam_gnome_keyring.so auto_start

The order in which these lines are inserted is important. So here is a working copy of the file:

#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_env.so
auth       substack    system-auth
auth       optional    pam_gnome_keyring.so try_first_pass
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    required    pam_loginuid.so
session    optional    pam_console.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
session    optional    pam_gnome_keyring.so auto_start
session    include     system-auth

Save the file and reboot.

gfxboot on Fedora

One of the features of openSUSE that I liked a lot was the graphical boot menu it gives instead of the vanilla GRUB splash screen. I tried looking for guides online, found quite detailed guide for Ubuntu, but nothing substantial for Fedora. I tried to install gfxboot on my Fedora system many times,using some forum posts, and ended up having no graphical boot menu at the best to unbootable hard disk at the worst. Now I have finally figured out a way to install it on my  Fedora  system. (I tried on Fedora 12 32-bit). Here is how i did it :

I strongly recommend backing up your existing ‘/boot/grub’ directory and keeping a bootable rescue disk handy before you do this.

1 First of all we need a few packages from openSUSE distribution. For that goto 1:

http://download.opensuse.org/distribution/11.2/repo/oss/suse/i586/

and download the following packages2:

gfxboot-4.1.39-1.1.1.i586.rpm
gfxboot-branding-openSUSE-4.1.39-1.1.1.i586.rpm
grub-0.97-162.2.i586.rpm
master-boot-code-1.14-71.2.i586.rpm

2 Install2 perl-HTML-Parser package :

sudo yum install perl-HTML-Parser

3 Install the openSUSE packages downloaded except grub3:

sudo rpm -ivh master-boot-code-1.14-71.2.i586.rpm
sudo rpm -ivh gfxboot-4.1.39-1.1.1.i586.rpm
sudo rpm -ivh gfxboot-branding-openSUSE-4.1.39-1.1.1.i586.rpm

4 Uninstall the GRUB installed by Fedora :

sudo rpm -e grub

or

 yum remove grub

5 Install the openSUSE GRUB package3 :

sudo rpm -ivh grub-0.97-162.2.i586.rpm

6 Install GRUB on the boot sector of the hard disk :

sudo grub-install /dev/sda

or

grub
root (hd0,X)4
setup (hd0)4
quit

7 Edit the grub.conf file to display graphical menu:

sudo vi /etc/grub.conf

Comment the lines starting with hiddenmenu and splashimage and add the following line before the title line

gfxmenu (hd0,X)/message4

8 Save grub.conf and restart the computer to enjoy your new graphical boot screen. This will show the default openSUSE graphical boot screen. You can get more attractive graphical boot screens here . ____________________________________________________________________________________________

1 This is for 32-bit version only. For goto http://download.opensuse.org/distribution/11.2/repo/oss/suse/x86_64/ . Also at the time of writing this 11.2 was the latest release update the release if you want newer/older version.

2 If you get rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed error then you must be using Fedora release earlier that 12. You need to update your rpm using <code>yum update rpm</code>  first.

3 The package names are for release 11.2 32-bit version. The packages for 64-bit (release 11.2) are grub-0.97-162.2.x86_64.rpm , gfxboot-4.1.39-1.1.1.x86_64.rpm , gfxboot-branding-openSUSE-4.1.39-1.1.1.x86_64.rpm

4 Assuming Linux is installed on the first hard disk 0 is used in (hd0,X). Replace 0 with the appropriate number for your system. Also replace X with the partition number for the boot partition. If boot partition exists on the root(/) partition replace gfxmenu (hd0,X)/message with gfxmenu (hd0,X)/boot/message and X here is the partition number for the root partition