1

I installed the latest snap Okular 22.08.2 on Ubuntu 20.04 (x11, gnome). I encountered two problems:

  1. 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/tmp sudo 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.pdf. Nevertheless, going 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?
  2. Although I set the "open in tabs" option and restarted the app, upon clicking on .pdf files, they will be opened into different instances instead of in tabs. EDIT: I have just noticed that if a pdf is opened via right click -> open with another application -> Okular, instead of simply double-clicking, the file is actually opened in a tab of the already opened Okular. How is it possible to code this as default behaviour?

I would appreciate any help. Thank you!

EDIT: requested connections output.

$ snap connections okular
Interface                                          Plug                                         Slot                                                                            Notes
audio-playback                                     okular:audio-playback                        :audio-playback                                                                 -
content[icon-themes]                               okular:icon-themes                           gtk-common-themes:icon-themes                                                   -
content[kde-frameworks-5-98-qt-5-15-6-core20-all]  okular:kde-frameworks-5-98-qt-5-15-6-core20  kde-frameworks-5-98-qt-5-15-6-core20:kde-frameworks-5-98-qt-5-15-6-core20-slot  -
content[sound-themes]                              okular:sound-themes                          gtk-common-themes:sound-themes                                                  -
cups-control                                       okular:cups-control                          -                                                                               -
dbus                                               -                                            okular:session-dbus-interface                                                   -
desktop                                            okular:desktop                               :desktop                                                                        -
desktop-legacy                                     okular:desktop-legacy                        :desktop-legacy                                                                 -
home                                               okular:home                                  :home                                                                           -
network                                            okular:network                               :network                                                                        -
network-bind                                       okular:network-bind                          :network-bind                                                                   -
opengl                                             okular:opengl                                :opengl                                                                         -
removable-media                                    okular:removable-media                       :removable-media                                                                -
wayland                                            okular:wayland                               :wayland                                                                        -
x11                                                okular:x11                                   :x11      
giammi56
  • 110
  • Please edit your question to show the complete output of snap connection okular – user535733 Dec 01 '22 at 13:16
  • It's not a snap connections problem. It's intentional -- snaps are sandboxed by AppArmor, and part of sandboxing means that only directories in specific parts of the tree are allowed. /home is allowed. /tmp is not. If you must use /tmp, then the snap package is not for you. – user535733 Dec 02 '22 at 03:02
  • is there any workaround? Mounting /tmp within the scope of snap is not giving the wanted behaviour. – giammi56 Dec 02 '22 at 09:32
  • I have just noticed that if a pdf is opened via right click -> open with another application -> Okular, instead of simply double-clicking, the file is actually opened in a tab of the already opened Okular. How is it possible to code this as default behaviour? – giammi56 Dec 07 '22 at 08:52

0 Answers0