Monday, July 23, 2007

Making Firefox associate .pdf files automatically

For a long time, I kept wondering how Firefox was able to provide a sensible default application to open a downloaded pdf file, which was present in other distros but not in Gentoo Linux. I knew it was in my configuration setup, I just never knew where.

Before, whenever I download a .pdf file, I'm always given this dialog box:

I was never able to find the configuration panel to setup the default application within Firefox, which was why I was living with this annoying handicap for a long time until I read about file associations into the mailcap file. Here's the entry that I've added into my ~/.mailcap
application/pdf;/usr/bin/gv %s
By adding just that line associates the .pdf file format to gv:


Post a comment