Mount TrueCrypt volume on login in Ubuntu

authentication, truecrypt, ubuntu

Solution

I can't really remember where I found this solution, but it was working for me on Ubuntu Karmic with gdm. You have to edit the `/etc/gdm/Init` file and add the following:

if !(echo `mount` | grep -q "/home/your_username type")
then
        truecrypt /dev/sdaxxx /home/your_username
fi

Unfortunately it doesn't work in the new Precious Penguin Ubuntu release, since it doesn't come with the gmd package. Does anybody know how to init truecrypt for this Ubuntu release?

Problem

Is it possible to automount a TrueCrypt volume when logging in to Ubuntu 8.04? It's already storing the wireless network keys using the Seahorse password manager. Could TrueCrypt be made to fetch its volume password from the same keyring? Currently this would seem like the most convenient way to store my source code on the USB stick I carry around to boot from.

Original source