Hi there,
I've a question similar to the one a person had for Obsidian forum.obsidian.md/t/problem-opening-zotero-links/11613/11
So I say it in nearly his words:
I am also using Linux (Ubuntu 20.04) and I have a problem. Links to Zotero in format [1] (zotero: //select/items/1_QZBJXD8N) cannot be opened from Joplin (2.6.10). Nothing happens after clicking on it. From a text editor (LibreOffice writer) or a browser, or in terminal (xdg-open) the link works.
I was wondering if Joplin can open other program links at all, but I found out that [less(1)](man:///usr/share/man/man1/less.1.gz) works all right for me.
Could you help me what I need to configure?
PS: all steps from instruction I have done - install translator and chose it in settings
here on archlinux, I can open zotero link from joplin but if I'm not mistaken I had been having some problems with that in the past. For example, Joplin can open web link and it call a web browser when this working correctly and it uses configuration external to it. Have you checked if you can open zotero link in a web browser or in libreoffice for example. You may also look at this message: Problem opening Zotero links - #10 by argentum - Resolved help - Obsidian Forum
which suggest to check the output of:
xdg-mime query default x-scheme-handler/zotero and
xdg-settings get default-url-scheme-handler zotero
Hi manouchk,
thanks for your help.
I get the same outputs as you say. In both cases zotero.desktop.
When I open the link in a web browser or in libreoffice everything works fine.
Today I tried again, and I got an error-message after clicking on the link in Joplin.
But it doesn't help me any further.
Ubuntu had an internal Error:
/usr/libexec/xdg-desktop-protal-gtk
...
It was created via the zotero-script: set_launcher_icon.
Then I did an ln -s ~/opt/Zotero-5.0.96.3_linux-x86_64/Zotero_linux-x86_64/zotero.desktop ~/.local/share/applications/
I'd recommend running desktop-file-validate on it, when I've tried it with the example above, it gives the following:
zotero.desktop: error: value "bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U"" for key "Exec" in group "Desktop Entry" contains a non-escaped character '$' in a quote, but it should be escaped with two backslashes ("\\$")
zotero.desktop: error: value "bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U"" for key "Exec" in group "Desktop Entry" contains a non-escaped character '$' in a quote, but it should be escaped with two backslashes ("\\$")
zotero.desktop: error: value "bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U"" for key "Exec" in group "Desktop Entry" contains a non-escaped character '$' in a quote, but it should be escaped with two backslashes ("\\$")
zotero.desktop: error: file contains multiple keys named "MimeType" in group "Desktop Entry"
The last one means that you can simply do MimeType=x-scheme-handler/zotero;text/plain as a single value.
It's opinions on Exec= is harder to understand without knowing really what set-launcher-icon considered proper, but certainly, this is a strange line.
Well, it would only be zotero -url %U if it's in your $PATH variable, which you'd be able to confirm with whereis zotero. If it doesn't give an answer, it probably isn't.
To remedy that you'd either
Modify the $PATH variable
symlink the binary to somewhere already in $PATH (e.g, /usr/bin)
(and probably the best option here), use a full path in Exec=, probably something similar to Exec=/home/david/opt/Zotero-5.0.96.3_linux-x86_64/Zotero_linux-x86_64/bin/zotero --url %U
(but I can't see your files obviously, so it might be slightly different).
Ok, I did the last thing Exec=/home/david/opt/Zotero-5.0.96.3_linux-x86_64/Zotero_linux-x86_64/zotero -url %U
Now Firefox works again.
But Joplin does still nothing when clicking.
So I've been trying to experiment with it, and I'm pretty confident what's happening here is a result of you using the snap version of Joplin; officially it's unsupported. You could run snap list to see if that's the case.
The snap uses a different backend for opening links than the normal release, and this is causing issues. I'm trying to work out exactly what issues, because I'm noticing some unusual behaviour differences (E.G, when Zotero is installed from the community packaged Deb file, it actually does work fine, weirdly...). It'd take a couple of hours to sus it out, if it's even fixable.
In the interests of getting you up and running as quickly as possible, I'd suggest transfering your Joplin data over to the AppImage version. There's some Linux installation instructions here.
You can go on the help menu and click "open file directory" to get the folder where all your snap stored notes are. Copy this over into ~/.config/joplin-desktop, and the AppImage version would import everything just fine. At that point I'd then just run sudo snap remove joplin-desktop so there's only the one version installed.
Everything works fine on the AppImage release in my testing.
To sum up, it is possible to open zotero-links in the terminal, or in firefox, but it doesn't work in Joplin.
Most program links doesn't work in Joplin: [zotero](zotero://) or [firefox](firefox://) or nearly all other programs doesn't work.
But [manual](man://) or [msteams](msteams://) works.
There must be a reason why some programs open and some not...?
It would be a workaround if I could make a Joplin link that opens Firefox and then automatically pastes the Zotero link, cause from inside Firefox it works.
But the problem is here, that I can't open Firefox from inside Joplin as mentioned above.
I just can open Firefox if I only use a http://www. link, but then I can't paste the zotero://... link.
Thanks a log for your great help.
It sounds quite right, what you are saying.
Indeed, I use the snap version of Joplin.
I'll try your suggestion tomorrow.