Okular does not open PDF's when stored/filed through Zotero

I am very new to Linux / Ubuntu and have been playing around with it for the past week. I have come across a problem I can't seem to fix. If I want to open a PDF with Okular, which has been stored / filed through Zotero, I get the following message: Could not open file:///home/ingrid/snap/zotero-snap/common/Zotero/storage/GI4FVK9I/Vranken - 2020 - Rooted Hauntology Lab Attempts at vegetal curatio.pdf The only program that can open the files seems to be pdf viewer, but this does not have the functionality I need. Thank you for helping me out!!
  • @extraymond, the maintainer of the third-party Snap package you're using, may be able to answer that. This problem would be specific to the Snap.
  • @dstillermann Thanks for forwarding.

    @ingridvranken I'll take a look at other pdf viewers, I'm mostly using pdf viewer(evince if I'm not mistaken) . Can you try open the file from the file manager and see if okular is capable of opening the file from there? Thanks for your report.
  • @ingridvranken

    Hi! The issue you are having is snap specific, so the following will only be relevant if you wish to use the snap version. I'm happy to help while you are trying the snap version and see if that fits your usage.

    ---

    Is okular installed as a snap or it's the deb/rpm version? This should happen only with the snap version of okular. Reasons below. Bit long but promise it will worth the time. And I'll show you how can we work with this.

    If you are using the snap version of okular, first let's make the problem more precisely: not being able to view the file inside ~/snap/zotero-snap/common from okular(snap).

    When a snap author created a snap, to be able to request permission to interact with anything in it's host, it will need to access it via the snap interface. The okular snap, like most desktop snaps, are granted permission of home interface. The home interface allowed interacting with files under home directory with some exception, not .hidden folder, and definitely not to the ~/snap folder, which contains data from other snap. This is so that snap's are all isolated to each other therefore comply to sandboxing mechanism.

    As for why the pdf-viewer(evince) can view the file, the answer should be simple, because it's installed as a non-snap app, so it's not respecting the sandboxing rule of snap. If you install okular as a deb/rpm, it will not respect snap's sandboxing too.

    In the end, you have some choice to make. You can either:
    1. set the default zotero folder to something like /home/username/Zotero or other regular home directories. Therefore all snaps that have access to the home interface will be able to see it.
    2. use a non-snap version of pdf viewer if you wish to isolate your zotero folder from other snaps under ~/snap/zotero-snap/common.

    Hope this helps.

  • Hi! Thank you for your comments! My apologies, I found the answer on the Ubuntu forum, it was indeed snap related. For anyone experiencing the same, this was the solution:
    https://askubuntu.com/questions/1114346/suddenly-okular-will-not-open-any-more/1114357#1114357


  • Glad you figure it out.

    Just want to make sure that anyone interested in the situation found the above material useful. Snap confinement has many differences than traditional software packaging.
  • Yes it is super useful to actually understand how things work. Thank you for having taken the time to explain it!
Sign In or Register to comment.