James Stephens

February 10, 2006

Configuring Mozilla/Firefox To Open PDF Files In A Separate Window Under Linux

Filed under: Linux — James Stephens @ 4:20 pm

The default behaviour of Mozilla/Firefox is to open PDF files within the browser. This post details how to change that behaviour so that they open in a separate application window.

The procedure is as follows:

  1. First quit any running Mozilla/Firefox applications.
  2. Remove the mozilla-acroread-plugin (as root) if it is installed:
    rpm -e mozilla-acroread-plugin

  3. If it doesn’t already exist, copy the system plugger configuration to your local .mozilla directory:
    cp /etc/mozpluggerrc ~/.mozilla/

  4. Edit your ~/.mozilla/mozpluggerrc file and comment out the lines pertaining to PDF files e.g.
    #ifdef([NO_ACROREAD],[
    #application/pdf: pdf: PDF file
    #application/x-pdf: pdf: PDF file
    #text/pdf: pdf: PDF file
    #text/x-pdf: pdf: PDF file
    #  repeat swallow(documentShell) fill: acroread -geometry \
        +9000+9000 +useFrontEndProgram "$file"
    #  repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
    #  repeat noisy swallow(gv) fill: gv -safer -quiet -antialias \
        -geometry +9000+9000 "$file"
    #])
    
  5. Remove these two files:
    rm ~/.mozilla/appreg
    rm ~/.mozilla/pluginreg.dat

  6. Launch Mozilla and try to open a PDF file. You should see a window such as:

    Mozilla PDF File Launch Options

    Ensure that /usr/bin/acroread is the default application and that “Always perform this action …” is selected.

  7. PDF files should now open in a separate window.

If you’d also like to open postscript files in a separate window please see this post.

1 Comment »

  1. How we can do it on same window?

    Thanks in advance!

    Regards,
    Probir.

    Comment by Probir — September 9, 2006 @ 10:49 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress

of StatCounter Code -->