Linux: type application/pdf cannot be handled natively
(5)(+0000000): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=1) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE sourceItemID=? AND linkMode NOT IN (?) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY mimeType='application/pdf' DESC, value=? DESC, dateAdded ASC
(5)(+0000000): Binding parameter 1 of type int: 107
(5)(+0000000): Binding parameter 2 of type int: 3
(5)(+0000000): Binding parameter 3 of type string: ""
(3)(+0000003): MIME type application/pdf cannot be handled natively
So the mimetype of my PDF is found properly, but Zotero then informs me that it cannot be handled natively. I'd like to ask what mechanism is used to determine 'native handling' on Linux. As far as I know the closest thing to a standard is xdg-open, but that works fine (uses my selected default).
What happens after the above line is that the URI is passed back to Firefox to open using Firefox's default. Obviously, I have firefox's default set to 'let me choose' because I do want to download PDFs from time to time (and not have them all dumped in the same folder). Previously this used to work but it just recently stopped. This is probably more an issue with my system, but to debug it it'd help if I know exactly what zotero was trying to do to give the above line.
(5)(+0000000): Binding parameter 1 of type int: 107
(5)(+0000000): Binding parameter 2 of type int: 3
(5)(+0000000): Binding parameter 3 of type string: ""
(3)(+0000003): MIME type application/pdf cannot be handled natively
So the mimetype of my PDF is found properly, but Zotero then informs me that it cannot be handled natively. I'd like to ask what mechanism is used to determine 'native handling' on Linux. As far as I know the closest thing to a standard is xdg-open, but that works fine (uses my selected default).
What happens after the above line is that the URI is passed back to Firefox to open using Firefox's default. Obviously, I have firefox's default set to 'let me choose' because I do want to download PDFs from time to time (and not have them all dumped in the same folder). Previously this used to work but it just recently stopped. This is probably more an issue with my system, but to debug it it'd help if I know exactly what zotero was trying to do to give the above line.
this works in general on linux
If a file can't be handled internally, it's just passed to the OS. What happens next on Linux is mostly a mystery and depends on your OS, your window manager, and the current relative humidity, but in addition to the linked page there are various forum threads that detail some things you can check. You shouldn't get a Firefox prompt after that line above unless your OS is set to open files in Firefox.
But make sure you've deleted (or moved) mimeTypes.rdf and restarted Firefox before trying anything else, since corruption there causes various weirdness.
What you're basically saying is that my OS is passing the link back to firefox. I would have thought xdg-open would be the one handling this (esp since defaults.list keeps getting mentioned), but that works with file:/// links (I assume that's what zotero passes out).
mimeTypes.rdf has been removed multiple times as well.
How do I figure out what firefox is calling in my OS (and what, if any, results are returned)?
There's a launch() method in Firefox. We call that. On some systems that might not be supported, in which case Zotero would pass a file:// URL to Firefox, but generally launch() is supported. There's no debug output there in release versions, but I've added a debug line to the trunk to indicate when the file:// fallback is being used.
launch() not supported -- passing file to loadURI()
Sad to hear there's not much more I can do from the zotero end. Will continue to troubleshoot, thanks for your help.
But while it's been a few years since I've looked into it, I didn't think launch() failed on all Linux systems, so I'd be curious whether other Linux users on the trunk (or in the next release) see that line. For what it's worth, here's the documentation for that method:
That page also notes this: For the really curious, there's a 10-year-old Mozilla bug that talks more about the details. (But please don't post to it.)
Normally to circumvent this we compile with as many system-libs as possible, have contacted the maintainer for firefox4 to ask him to change that. Thanks again.
I haven't tried disabling it yet.
Ross