6.0.9-beta.6: zotero://select links not working

edited June 25, 2022
On both Linux and Windows, the following kinds of links clicked in external apps lead to zotero app opening:

- zotero://select/items/HTZ9YYQZ
- zotero://select/library/collections/RI9SMI69

but then zotero does not focus on the items or collections that are supposed to correspond to the links.

I saw an earlier report of a bug where these links did not work for unsynced libraries, but it doesn't work for me even if the library is fully synced.

Does anybody else get this problem? Any ideas what could be the issue?
  • That first one isn't a valid URL. They take the form zotero://select/library/items/[itemKey].

    If you're still having trouble after correcting that, if you're running any third-party plugins, try disabling them.

    Beyond that, we'd want a Debug ID for an attempt that fails, with all plugins disabled.
  • Thanks for the quick reply!

    Yes, unfortunately it's still not working even with the corrected format. Or for collections, where the format seems to have been correct.
    I've disabled plugins and submitted the debug output D1995598352.
  • That includes Zotero startup and syncing. Can you provide a Debug ID for just clicking the link, after all startup activity has stopped?
  • Ok I just tried to do the following: (a) enable the logging, (b) clearing existing log, (c) clicking on the select: links from an external application.

    The following happens:

    (1) zotero comes into focus
    (2) nothing is selected OR logged. "Debug output logging" says that 0 lines are logged, and the log window remains as empty as before.

    This is on Ubuntu. On Windows the same links now open as expected. So this problem must be that the OS somehow doesn't pass Zotero its links correctly?

    I've read https://forums.zotero.org/discussion/78550/getting-zotero-to-work-under-ubuntu-linux-solved, but the solutions posted there don't seem to work on my Ubuntu. Here's what I have so far (re-tested after full reboot):

    In zotero.desktop file: MimeType=x-scheme-handler/zotero

    The mimeapps.list has the following in the [Default Applications] section:

    application/zotero=zotero.desktop
    x-scheme-handler/zotero=zotero.desktop

    Querying for "xdg-settings get default-url-scheme-handler zotero" and
    "xdg-mime query default x-scheme-handler/zotero" both point to zotero.desktop.

  • Ok in case anybody else struggles with this on Ubuntu: for me the problem was solved by establishing a symbolic link for the desktop file:

    ln -s /home/to/Zotero_linux-x86_64/zotero.desktop ~/.local/share/applications/zotero.desktop

    My desktop file contains the following lines:

    Exec=/path/to/Zotero_linux-x86_64/zotero --url %U
    MimeType=x-scheme-handler/zotero;text/plain
  • edited June 29, 2022
    To be clear, the thread you linked to is years old, and the desktop file currently bundled with the Zotero tarball contains a different Exec line and a much more comprehensive MimeType line (but which includes x-scheme-handler/zotero). The installation instructions say to symlink it into ~/.local/share/applications. So I'm a bit unclear why you didn't just use that. As it is, you'd be missing out on various file associations.
  • I have a related issue.
    Zotero does not focus on a selected item if it's not already running.

    The command starts Zotero, but does not navigate me to the item.
    /opt/zotero/zotero -url zotero://select/groups/1234567/items/ABCDEFGH


    If Zotero is already running, it navigates to the item without a problem.

    This forces me to run Zotero in the background to be sure I don't need to click the link two times to open an item from a third-party application.
Sign In or Register to comment.