Tuesday, February 27, 2007

firefox evince and acroread using mozplugger

The problem: Have both acroread (Adobe acrobat reader for linux), and evince (a pdf reader for linux) installed, but by default have documents open in firefox tabs in evince and not acroread.

The reason both need to be installed is because acroread allows you to fill in and print interactive pdfs, but evince is much more lightweight and scrolls much better. Evince overall leaves my system more responsive when using it.

By default with acroread installed, it becomes the default for opening PDFs in firefox while using mozplugger. In order to have evince be the default PDF reader in firefox you need to modify mozplugger's settings which are stored in:

/etc/mozpluggerrc

Open this and find the section:

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file

Now find the line that reads:

ACROREAD()

Now you will need to move that line below the line similar to:

repeat noisy swallow(evince) fill: evince "$file"


So you should end up with:


application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
repeat noisy swallow(evince) fill: evince "$file"
ACROREAD()

Now close all firefox windows and start it again.

No comments: