Bug 429791

Summary: okular can only open files in user directory
Product: [KDE Neon] neon Reporter: Jonas <jonas743>
Component: SnapsAssignee: Scarlett Moore <sgmoore>
Status: RESOLVED FIXED    
Severity: normal CC: giammi56, neon-bugs-null, sgmoore
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jonas 2020-11-29 04:49:25 UTC
SUMMARY

Using kubuntu 20.04. 

I installed the okular snap since it's a newer version than the deb. However, it can't open files outside my home directory, e.g. files in /usr/share/doc. Specifically I get the error message 

`Could not open file:///usr/share/doc...` 

in a dialogue window when trying to do `okular /absolute/path`, and 

`Could not open file:///var/lib/snapd/void/filename.pdf` 

when doing `okular relative/path`.



`snap info okular` gave me a url that sent me to this form, so I hope it's the right place to report the bug.
Comment 1 giammi56 2022-12-01 12:47:41 UTC
Still happening in Okular 22.08.2 on Ubuntu 20.04 (x11, gnome).
In particular I am tying to open a .pdf attachment from thunderbird with Okular (snap). Following this guide, I created a tmp folder in my home (location accessible by Okular) and mounted the /tmp folder there:mkdir /home/you/tmpsudo mount --bind /tmp /home/you/tmp/When double-clicking on the attachment, a read-only file is correctly created in /tmp/pid-xxxxx/attachment.pdf, Okular the default application opens, but I get an error message:Could not open file:///tmp/pid-xxxxx/attachment.pdfNevertheless, going to to the folder /tmp/pid-xxxxx/, I am able to open the created file by simply double-clicking on it. Is it a snap connections problem?
Comment 2 Scarlett Moore 2023-11-11 10:05:25 UTC
Okular now has access to /usr/share/docs Please update to latest in snap store 23.08.3