Okular snap package cannot access files outside home directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
okular |
New
|
Undecided
|
Scarlett Gately Moore | ||
okular (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I’m not sure where the correct place is to report issues in snap packages, so I hope this isn’t completely wrong.
I installed okular on Ubuntu 17.10 via snap (“sudo snap install okular”). “snap info okular” gives me the following output:
name: okular
summary: Universal document viewer
publisher: kde
contact: https:/
description: |
Okular is a universal document viewer developed by KDE. Okular works on
multiple platforms, including but not limited to Linux, Windows, Mac OS X,
\*BSD, etc.
Features:
- Supported Formats: PDF, PS, Tiff, CHM, DjVu, Images, DVI, XPS, ODT, Fiction
Book, Comic Book, Plucker, EPub, Fax
- Sidebar with contents, thumbnails, reviews and bookmarks
- Annotations support
snap-id: SfUqQ280Y4bJ0k6
commands:
- okular
tracking: stable
installed: 16.12.3 (3) 7MB -
refreshed: 2017-03-27 12:56:54 +0200 CEST
channels:
stable: 16.12.3 (3) 7MB -
candidate: 17.04.3 (5) 8MB -
beta: 17.04.3 (5) 8MB -
edge: master+782a5fe (27) 5MB -
The okular snap seems to use “strict” confinement and is thus unable to access files outside the user’s home directory even for reading. However, for a “viewer”-type application like okular, this is very problematic:
– When downloading a file (e.g. PDF) in a browser like Firefox and choosing to open the file (instead of saving it somewhere in the home directory), the browser will typically place the file in /tmp/ and then open it using the default viewer for that file type. Since /tmp/ is outside the user’s home directory, okular is unable to open the file.
– When opening documentation which is installed to system directories (e.g. /usr/share/…) along with its corresponding application, okular is likewise unable to open the documentation files for viewing. For example, the “texdoc” program for the TeX typesetting system looks up the documentation for a specified package (typically in PDF format) and runs the default (PDF) viewer to show the documentation. This fails if the okular snap application is set as the default PDF viewer.
– Any files on mounted file systems, such as external storage (USB drives, SD cards, external hard drives…), network shares, etc., cannot be viewed with okular.
Attempting to open any such files results in a dialog with the following error message: “Could not open file://
Changed in kdegraphics: | |
importance: | Unknown → Medium |
Changed in kdegraphics: | |
status: | Unknown → Confirmed |
Changed in okular (Ubuntu): | |
status: | Confirmed → Invalid |
affects: | kdegraphics → okular |
Changed in okular: | |
assignee: | nobody → Scarlett Gately Moore (scarlettmoore) |
I installed okular on Ubuntu 17.10 via snap (“sudo snap install okular”). The okular snap seems to use “strict” confinement and is thus unable to access files outside the user’s home directory even for reading. However, for a “viewer”-type application like okular, this is very problematic:
– When downloading a file (e.g. PDF) in a browser like Firefox and choosing to open the file (instead of saving it somewhere in the home directory), the browser will typically place the file in /tmp/ and then open it using the default viewer for that file type. Since /tmp/ is outside the user’s home directory, okular is unable to open the file.
– When opening documentation which is installed to system directories (e.g. /usr/share/…) along with its corresponding application, okular is likewise unable to open the documentation files for viewing. For example, the “texdoc” program for the TeX typesetting system looks up the documentation for a specified package (typically in PDF format) and runs the default (PDF) viewer to show the documentation. This fails if the okular snap application is set as the default PDF viewer.
– Any files on mounted file systems, such as external storage (USB drives, SD cards, external hard drives…), network shares, etc., cannot be viewed with okular.
Attempting to open any such files results in a dialog with the following error message: “Could not open file:// /path/to/ file”. This does not provide any explanation for the reason of the failure.