Linux - choose program to open PDF files from zotero
Problem statement: PDFs always open in evince
Hello, just to clarify, I have already read http://forums.zotero.org/discussion/4972/change-default-pdf-application-under-ubuntu-810firefox-30/ and http://forums.zotero.org/discussion/2241/open-pdfs-in-acrobat-reader-externally/
That means I have set both firefox (tested by browsing to a pdf using the internal file browser) and OS settings to open using acroread instead of evince. However, double-clicking on the pdf in zotero still uses evince. The about:config option for using native doesn't work. The debug log shows that zotero cannot find a handler within firefox for application/pdf.
I'm using the latest Gnome, in Arch Linux. Any suggestions?
Hello, just to clarify, I have already read http://forums.zotero.org/discussion/4972/change-default-pdf-application-under-ubuntu-810firefox-30/ and http://forums.zotero.org/discussion/2241/open-pdfs-in-acrobat-reader-externally/
That means I have set both firefox (tested by browsing to a pdf using the internal file browser) and OS settings to open using acroread instead of evince. However, double-clicking on the pdf in zotero still uses evince. The about:config option for using native doesn't work. The debug log shows that zotero cannot find a handler within firefox for application/pdf.
I'm using the latest Gnome, in Arch Linux. Any suggestions?
I know this works for the majority of users, else there'd be much more complaints. However, I can just report things as I see them. Please advise if there's anything I can do to help track down the cause of this.
If you don't believe me, you can review the code yourself, but I wrote it, so you'd probably save yourself time if you did.
"to make pdf open using a specific application when you double click it in the FF download manager, edit /usr/share/applications/mimeinfo.cache , search for: application/pdf= . Put the name of *application*.desktop of the desired application right after = .
So to use okular, it should look like this:
application/pdf=kde4-okularApplication_pdf.desktop
Notice the extra kde4- , this is necessary because okularApplication_pdf.desktop is in the subfolder kde4 in /usr/share/applications.
Replace okularApplication_pdf.desktop with whatever name of the .desktop file of the app you want. If it's in the same folder as mimeinfo.cache, i.e. /usr/share/applications then use the name of the .desktop folder, if it's in a subfolder then prefix it with kde4- , or kde- , whatever. See if this works.
mimeinfo.cache is a dynamic file and will be changed automatically when you install/uninstall a programme (this explains what happened when you uninstalled gimp). Of course you can keep a local copy of this file maintaining your own associations across reinstalls), you need to put this copy in ~/.local/share/applications , also a copy of /usr/share/applications/defaults.list "
In your case, you'd want to put something like application/pdf=AdobeReader.desktop in both the mimeinfo.cache and defaults.list.
I'll investigate some more, then I'll consider submitting a bug on Ubuntu's launchpad.
application/pdf=evince.desktop
to
application/pdf=acroread.desktop
BTW it seems that Nautilus 'open with' configuration has nothing to do with this!
Your solution works for me (Ubuntu 9.04, Gnome).
[Default Applications]
application/pdf=kde-okularApplication_pdf.desktop
As this is probably an annoyance for a lot of Zotero users, I've added the solution to the wiki: http://www.zotero.org/support/troubleshooting_file_handlers
I'm running Ubuntu 10.10 and okularApplication_pdf.desktop is located in
/usr/share/applications/kde4
The entry in ~/.local/share/applications/defaults.list
should therefore be:
application/pdf=kde4-okularApplication_pdf.desktop
This should be noted in the kb page...
I want to set evince as default application to open pdf fulltext in zotero.
Edit /usr/share/applications/mimeinfo.cache , ~/.local/share/applications/mimeinfo.cache , and /etc/gnome/defauts.list , search 'application/pdf= ....' , change it to 'application/pdf=evince.desktop'.
I am also using OpenSUSE.
From that thread:
"There is a file called: /usr/share/applications/defaults.list
with a line:
application/pdf=gimp.desktop
just change to
application/pdf=kde4-okular.desktop"