Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero does not recognise default PDF viewer #15

Closed
Ethunxxx opened this issue Oct 27, 2018 · 14 comments
Closed

Zotero does not recognise default PDF viewer #15

Ethunxxx opened this issue Oct 27, 2018 · 14 comments

Comments

@Ethunxxx
Copy link

In the preferences I set that Zotero should use the system's default PDF viewer to open PDFs. However, every time I open a PDF, Zotero asks which viewer to use.
Is there a way to fix this?

@Ethunxxx Ethunxxx changed the title Zotero does not recognise dafault PDF viewer Zotero does not recognise default PDF viewer Oct 27, 2018
@amtlib-dot-dll
Copy link
Collaborator

I am also waiting a way to fix this 🤷‍♀️

@felipehw
Copy link
Collaborator

Same here!

@rvlobato
Copy link

Always asking for pdf viewer.

@pimou
Copy link

pimou commented Feb 15, 2019

Same here ! very annoying....

@pimou
Copy link

pimou commented Feb 15, 2019

And all is ok with stock Zotero... Everything is fine using the tarball.

@qwertyuser1983
Copy link

qwertyuser1983 commented Mar 1, 2019

Waiting for solution for this problem. :)

In my case, even the prompt did not show. This the terminal output when loading the pdf. :(

** (zotero:6): WARNING **: 13:58:46.797: Cannot launch default application: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.portal.OpenURI' on object at path /org/freedesktop/portal/desktop
Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.portal.OpenURI' on object at path /org/freedesktop/portal/desktop
Possibly unhandled rejection:

/usr/bin/xdg-open returned exit status 4

Error: /usr/bin/xdg-open returned exit status 4
Zotero.Utilities.Internal.exec</<.observe@chrome://zotero/content/xpcom/utilities_internal.js:516:22

@PorcelainMouse
Copy link

In addition, or perhaps not, Zotero cannot even find the default PDF viewer in the filesystem, so you cannot select it using the option alternative to the "system default."

You can select /usr/bin/xdg-open, but even this does not work. Regardless of the setting for the viewer in Zotero, Zotero always asks which PDF viewer to use.

Does anyone even know why this happens? Is it some type of sandboxing that appends to flatpak applications? It must be, right?

@juanlufont
Copy link

Waiting for solution for this problem. :)

In my case, even the prompt did not show. This the terminal output when loading the pdf. :(

** (zotero:6): WARNING **: 13:58:46.797: Cannot launch default application: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.portal.OpenURI' on object at path /org/freedesktop/portal/desktop
Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.portal.OpenURI' on object at path /org/freedesktop/portal/desktop
Possibly unhandled rejection:
/usr/bin/xdg-open returned exit status 4
Error: /usr/bin/xdg-open returned exit status 4
Zotero.Utilities.Internal.exec</<.observe@chrome://zotero/content/xpcom/utilities_internal.js:516:22

I was getting the same error on Debian Testing (Buster) when using the flatpak package for Zotero.

In my case I was missing some of the xdg-destop-portal binaries required to integrate the flatpack app with the rest of my system. I managed to fix the problem just installing the following packages and restarting my graphical session:

  • xdg-desktop-portal-gtk
  • flatpack-xdg-utils

@allefeld
Copy link

allefeld commented Oct 23, 2019

I have the same problem as @qwertyuser1983, but @juanlufont's solution does not fix it.

@juanlufont, you did install the Debian packages, right? Not some flatpak packages?

Since this issue has been open for almost a year, I'm wondering whether developers even look at this. Not even a comment...

@allefeld
Copy link

I found another workaround: Start Zotero with

flatpak run --filesystem=host org.zotero.Zotero

This allows "Open pdfs using" / "Custom..." to browse the entire file system, so one can select the appropriate binary.

@N1X3L
Copy link

N1X3L commented Dec 4, 2019

I found another workaround: Start Zotero with

flatpak run --filesystem=host org.zotero.Zotero

This allows "Open pdfs using" / "Custom..." to browse the entire file system, so one can select the appropriate binary.

This workaround does not seem to be viable in Solus, but I appreciate you posting it.

@mihaic
Copy link

mihaic commented Mar 26, 2020

This behavior comes from xdg-desktop-portal, which is responsible for asking how to open the PDF. Starting in version 1.5.3, it will remember your choice after asking 3 times. See the corresponding issue and PR:
flatpak/xdg-desktop-portal#302
flatpak/xdg-desktop-portal#406

I think this issue should be closed.

@felipehw
Copy link
Collaborator

Maybe, we could wait this fix arrive in any major distribution to see if it really works in a real environment with Zotero?

@rvlobato
Copy link

rvlobato commented Mar 26, 2020

I can confirm that it is working in Arch Linux, with xdg-desktop-portal 1.6.0-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests