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

Hard-coded /usr, /etc, etc. paths in Zotero #10355

Closed
Warbo opened this Issue Oct 12, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@Warbo

Warbo commented Oct 12, 2015

Zotero (nix-shell -p zotero) seems to have a few issues, at least in my Xmonad-based system (not sure if it works in KDE, Gnome, etc.)

Problems include:

  • All attempts at importing seem to fail with "The selected file is not in a supported format" (eg. for BibTeX and PDF, from files and from the clipboard)
  • Choosing "Export item", the "Format" drop-down box is empty (ie. doesn't provide any options)
  • Many buttons/actions in Zotero try to open a browser, but they fail (with a message like ** (zotero:2956): WARNING **: Could not launch default application for URI: Operation not supported

At least some of these seem to be caused by hard-coded paths. For example, in about:config (Tools->Preferences->Advanced->open about:config) the following options have hard-coded values which don't exist in NixOS:

  • helpers.global_mime_types_file = /etc/mime.types
  • extensions.zotero.fallbackLauncher.unix = /usr/bin/xdg-open

Setting the latter to a real xdg-open path (eg. /run/current-system/sw/bin/xdg-open) makes opening a browser work.

@Warbo

This comment has been minimized.

Show comment
Hide comment
@Warbo

Warbo Oct 15, 2015

Additionally, Zotero uses (at least) the "pdftext" and "pdfinfo" commands. It provides an action in Tools -> Preferences -> Search to download pre-build binaries of these tools, but they fail with a "No such file or directory" error (presumably due to assuming a dynamic library path which doesn't exist on NixOS).

I tried swapping out these downloaded binaries for symlinks into /nix/store. The pdftext tool seems to work, but pdfinfo just prints a usage message (presumably because it's being called with an extra argument, rather than just the PDF)

Warbo commented Oct 15, 2015

Additionally, Zotero uses (at least) the "pdftext" and "pdfinfo" commands. It provides an action in Tools -> Preferences -> Search to download pre-build binaries of these tools, but they fail with a "No such file or directory" error (presumably due to assuming a dynamic library path which doesn't exist on NixOS).

I tried swapping out these downloaded binaries for symlinks into /nix/store. The pdftext tool seems to work, but pdfinfo just prints a usage message (presumably because it's being called with an extra argument, rather than just the PDF)

@Warbo

This comment has been minimized.

Show comment
Hide comment
@Warbo

Warbo Oct 15, 2015

Replacing the pdfinfo binary (pdfinfo-Linux-i686) with the following shell script seems to work:

#!/usr/bin/env bash
pdfinfo "$1" > "$2"

Warbo commented Oct 15, 2015

Replacing the pdfinfo binary (pdfinfo-Linux-i686) with the following shell script seems to work:

#!/usr/bin/env bash
pdfinfo "$1" > "$2"
@devhell

This comment has been minimized.

Show comment
Hide comment
@devhell

devhell Oct 19, 2015

Contributor

Not the most elegant or ideal solution. Just FYI.

Contributor

devhell commented Oct 19, 2015

Not the most elegant or ideal solution. Just FYI.

@Profpatsch

This comment has been minimized.

Show comment
Hide comment
@Profpatsch

Profpatsch Jul 23, 2016

Member

(triage) is that still an issue?

Member

Profpatsch commented Jul 23, 2016

(triage) is that still an issue?

@c0bw3b c0bw3b referenced this issue Nov 15, 2017

Merged

zotero: 4.0.29 -> 5.0.25 #31699

4 of 8 tasks complete
@c0bw3b

This comment has been minimized.

Show comment
Hide comment
@c0bw3b

c0bw3b Nov 20, 2017

Contributor

@Warbo PR #31699 might have solved this issue by running Zotero inside an FHS env.

Contributor

c0bw3b commented Nov 20, 2017

@Warbo PR #31699 might have solved this issue by running Zotero inside an FHS env.

@devhell

This comment has been minimized.

Show comment
Hide comment
@devhell

devhell Nov 21, 2017

Contributor

@c0bw3b, @Warbo; Indeed it seems solved, I successfully installed those tools from within Zotero without an issue. The only thing I haven't been able to work out yet is how to make Zotero find Libreoffice so the Libreoffice plugin works. Not a big deal for me as I use LaTeX for all my writing, but I'm sure others do use LO.

Contributor

devhell commented Nov 21, 2017

@c0bw3b, @Warbo; Indeed it seems solved, I successfully installed those tools from within Zotero without an issue. The only thing I haven't been able to work out yet is how to make Zotero find Libreoffice so the Libreoffice plugin works. Not a big deal for me as I use LaTeX for all my writing, but I'm sure others do use LO.

@Profpatsch Profpatsch closed this Nov 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment