LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-Oct-2009, 06:29 AM
Senior Member
 
Join Date: Feb 2008
Location: England, UK
Posts: 242
mikewillis 1-9 reputation points
Default Firefox 3.5 and default applications

An FYI type post for anyone who's seen changes with file handling with Firefox 3.5

In the last couple of days SLED 11 for Firefox 3.5. Which on the whole is a Good Thing. However I quickly discovered that PDF files were no longer being being handled correctly.

I have Acrobat Reader installed on machine but have them set up to have PDFs open in Evince by default, both when double clicked in Nautilus and when encountered whilst browsing in Firefox. It loads so much faster than Acrobat Reader and I've never much cared for the embedding of PDFs in a browser window.

I have this in the global Firefox config
Code:
defaultPref("plugin.disable_full_page_plugin_for_types", "application/pdf");
(One of the things which actually does work when set as a default but that's another story.) With Firefox 3.0 this meant that when Firefox encountered a PDF it ignored the Acrobat Reader plugin, looked at the system default to see what to do with a PDF and hence launched evince. With Firefox 3.5 I found it ignored the Acrobat Reader plugin but didn't know what to do with PDFs instead.

Having confirmed that PDF handling still worked as expected on a machine not yet updated to Firefox 3.5, I ran 3.0 and 3.5 under strace and looked at the output. I found that whilst 3.0 looked at /etc/mime.types and then at /usr/share/applications/defaults.list 3.5 doesn't look at /usr/share/applications/defaults.list. Since what to do with a PDF is defined in /usr/share/applications/defaults.list, on my machine there's a line that reads

Code:
me@mine:~> grep ^application/pdf /usr/share/applications/defaults.list
application/pdf=evince.desktop
that Firefox 3.5 doesn't read it is presumably the reason it doesn't know what to launch when it encounters the PDF. I noticed that Firefox 3.5 looks at /etc/mailcap, which Firefox 3.0 doesn't. By default /etc/mailcap doesn't contain info on what to do with PDFs, so I added a line:

Code:
me@mine:~> grep ^application/pdf /etc/mailcap
application/pdf;/usr/bin/evince "%s"
and Firefox 3.5 now knows to launch evince to display PDFs. (It also means alpine knows what to do with PDFs now, something I had neglected to pay attention to previously. (alpine's sadly not included with SLED 11 but it's available via the openSUSE Build Service.))


I've no idea why Firefox 3.5 looks at /etc/mailcap but not at /usr/share/applications/defaults.list, if anyone has knows it would be interesting to know.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 11:14 AM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2