"View PDF" not opening PDF, but instead opens the file manager in the PDF directory

As described in the title.
The behaviour of Zotero is the same when both selecting "View PDF" and "Show file".
I am not sure what is wrong here, but for some time, the "View PDF" option really did open the file in the (system wide) designated application - Evince.
This happens with every PDF file in zotero (I did not test all of them, but in a sample of 15 files, they all displayed the same symptoms).
I have tried the steps in the KB (https://www.zotero.org/support/kb/file_handling_issues#pdfs_opening_in_wrong_application_on_gnulinux_systems) and in several forum posts, such as (https://forums.zotero.org/discussion/34136/linux-open-in-external-viewer-in-ff-opens-default-file-manager-rather-than-pdf-tool/).
None of them seemed to help.
I have, however, done what is recommended in the KB, and enabled debugging output, and triggered the error.
The error log is short (23 lines) and the Debug ID is D207062930.
The path string seems to be passed correctly, and I don't see any obvious errors in the log, but I have never debugged Zotero logs before.
Any help is greatly appreciated.
  • which linux distro is this on?
  • Oh, sorry, I forgot to add:
    This is ArchLinux. I'm using Gnome-shell as my main DE, but under Enlightenment the issue still occurrs.
  • Have you tried deleting mimeTypes.rdf (from the top section on that page)?
  • @Dan_Stillman
    Yes, and it did not work for me.
    Would a debug log **after** deleting that file and restarting Zotero be of any use?
  • Not much more we can tell you, unfortunately — file opening on Linux is a disaster, and you'll have to troubleshoot it for your specific system. This doesn't have anything to do with that specific file, so deleting wouldn't make a difference. (It's successfully detected as a PDF.) From the debug output, this is a successful call to launch().
  • @Dan_Stillman

    Humm... is there any way I can debug what happens **after** the launch() call?
    Anyway I can see what program launch() is calling at least?
    I suppose if it is a system setting thing I can quickly get to the bottom of it.
  • No, sorry, that's an internal Mozilla call. But presumably the program being launched is your file manager.
  • (At least, that's one possibility. You can see what happens if you run your file manager from the command line with the file as an argument.)
  • Ok, I guess that will have to do.
    I'll start with that and go from there.
    Thanks for the (extremely quick, I might add) assistance!
  • (And launch() isn't calling any program — it's passing the file to your OS.)
  • Thanks again.
    I'll report back when it's solved.

    Cheers!
  • Ok, so the problem is a bug in gvfs-open (which gets called by "xdg-open", that zotero relies upon) not honouring the mime-types under some corner case circumstances.
    I have reverted to using "enlightenment_open" which seems to successfully work around the problem at least until "gvfs-open" is fixed.
    Thanks for your input!
  • Ok, so I figured out by trial & error what the bug circumstances were - a very old "nautilus.desktop" file rotting in my "~/.local/share/applications" directory was causing this.
    Everything is now normal.
    Once again, thank you for the input. It really helped narrow down the cause.
Sign In or Register to comment.