[Bug 1745999] [NEW] Okular snap package cannot access files outside home directory

Simon May 0c02b95d at opayq.com
Mon Jan 29 14:10:07 UTC 2018


Public bug reported:

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://www.kde.org
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: SfUqQ280Y4bJ0k64qtBKTTXq5ml46tvQ
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:///path/to/file”. This does not
provide any explanation for the reason of the failure.

** Affects: kdegraphics
     Importance: Unknown
         Status: Unknown

** Affects: okular (Ubuntu)
     Importance: Undecided
         Status: New

** Bug watch added: KDE Bug Tracking System #389576
   https://bugs.kde.org/show_bug.cgi?id=389576

** Also affects: kdegraphics via
   https://bugs.kde.org/show_bug.cgi?id=389576
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to okular in Ubuntu.
https://bugs.launchpad.net/bugs/1745999

Title:
  Okular snap package cannot access files outside home directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/kdegraphics/+bug/1745999/+subscriptions




More information about the kubuntu-bugs mailing list