why do zotero://select/item links not work in other software under ubuntu 16.04?

PROBLEM: My workflow involves consulting notes stored in Zotero 5.0.22 while writing in other software (Scrivener, LibreOffice Writer). On Windows 10, I am able to access these notes from those other software by creating hyperlinks to them using their zotero://select item ID: I click on the hyperlink in, say LibreOffice Writer, and Zotero opens and selects the note item in my library. However, I cannot get these hyperlinks to work under Ubuntu 16.04: clicking on them--whether in Scrivener or LibreOffice Writer--produces absolutely no result.

REQUEST: A search through forums and posts on the web suggests that the problem is possibly due to Ubuntu not recognising the zotero:// protocol and therefore not knowing what to do when I click on the hyperlinks. Is this correct? If so, how do I solve the problem? Various posts say I have to register the protocol with the operating system. I have no knowledge of programming, and the how-to's I found were too complicated for me. If non-recognition of the protocol is not the problem, then what is it? I would appreciate any help on this problem, if possible a simple how-to that does not involve complex code-writing.

APPRECIATION: To the great people behind Zotero, thank you so much for the marvelous software; and to the Zotero community, thanks for the great work addressing problems faced by programming-incompetents like me.

Thank you for your help.
  • Registering the protocol with the operating system is the way to go, yes. Unfortunately, as you've discovered, that's a bit of a mess on linux -- I'm not sure we're going to be able to do better that what you find on ask ubuntu or so, I'm afraid.
  • @adamsmith: Thank you for your quick response. Greatly appreciated. At least now I know I am barking up the right tree, so to speak. All I have to do now is sweat blood as I try to understand and do what the various how-to's say: find a way to register the protocol on Ubuntu. There is nothing for it: no programming incompetence goes unpunished in Linux. Again, thanks for your response and the great work you all are doing on Zotero.
  • I found this useful post at: https://forums.zotero.org/discussion/8306. I gave it a try by amending my original zotero.desktop file as instructed. My original file is shown below:

    ===
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=Zotero
    Icon=zotero.png
    Path=/home/osaze/Zotero_linux-x86_64
    Exec=/home/osaze/Zotero_linux-x86_64/zotero-bin -app /home/osaze/Zotero_linux-x86_64/application.ini
    StartupNotify=false
    StartupWMClass=Zotero
    OnlyShowIn=Unity;
    X-UnityGenerated=true
    ====

    The amended file is below:

    ===
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=Zotero
    Icon=zotero.png
    Exec=/opt/zotero/zotero --url %u
    StartupNotify=false
    StartupWMClass=Zotero
    OnlyShowIn=Unity;
    X-UnityGenerated=true
    MimeType=x-scheme-handler/zotero;
    ===

    This solution worked, with two limitations: first, clicking a hyperlink in an external software (LibreOffice or Scrivener) opens Zotero and selects the central library but not the desired item--the hyperlink must be clicked again for the item to be selected (which is a small price to pay); second, now Zotero cannot open PDFs in external viewers (Okular, Acrobat, etc.). In summary, zotero://select/item now works (somewhat) but zotero://open-pdf now does not. Not even on returning to the original zotero.desktop file.

    I would appreciate any help with this.
  • You're saying you can't open PDFs at all or just not using the protocol? And if the former, did that work before?
  • I had no trouble previously with viewing PDF attachments to Zotero items--I double-click on the item or attachment and the PDF opens in Okular. Now (since the changes to the zotero.desktop file), Okular returns a "crashed" error message. The same happens even after I restored the zotero.desktop file to its original contents. However, I have no trouble opening the same PDFs from the Ubuntu file manager: Okular opens the file, without any problem.
  • I just updated Zotero to 5.0.24 (the changelog says 5.0.24 but the About Zotero screen in Ubuntu 16.04 says 5.0.23) and find that the issues I brought up have been fixed: first, clicking on external hyperlinks now not only opens Zotero (or, if already open, gives it focus) but also selects the desired item; second, double-clicking on Zotero items with PDF attachments, on the attachments themselves, or on zotero://open-pdf links in extracted annotations now opens the PDF in Okular without issues. My zotero.desktop file remains as amended previously (described in one of my previous posts) and I have not changed anything else. I surmise therefore that the solutions were due to the Zotero update. My sincere thanks to the Zotero team, and to @adamsmith in particular for engaging on my issues.
  • Ummm...It appears I spoke too soon. Yes, clicking the external hyperlink works as described above but double-clicking on Zotero items with PDF attachments, on the attachments themselves, or on zotero://open-pdf links in extracted annotations still does not open the PDF. Either there is absolutely no response or Okular returns a "crashed" message. However, everything had worked well (as described in my immediate past post) the first and second times I tested the links. Only on restarting Zotero did I lose open-PDF functionality. I do not know what to do anymore. Please help!!! This functionality is as crucial to my workflow as the select-item functionality. Please help.
  • have you tried setting the default PDF reader to evince for testing? Okular crashing would typically be an Okular problem
Sign In or Register to comment.