2

Whenever I try opening a PDF file in a mounted usb drive using Okular, it gives me this error: Could not open file:///media/walkeknow/F8A2-34D9/example.pdf

Okular error dialog

I have installed okular using sudo snap install okular because the apt-get method does not render the in-app icons for some reason on my system.

which okular command gives: /snap/bin/okular

The files open using Ubuntu's default Document Viewer evince. However I prefer using Okular. Is there any fix to this?

Kewal Shah
  • 1,044
  • 2
  • 13
  • 35

2 Answers2

2

Snap problem

Okular does not support removable media while installed as Snap. You should remove it

snap remove okular

In other words it does not support snap connect okular:removable-media plug.

Okular from APT (deb-package)

Installation

Then install deb-packaged version instead with

sudo apt-get install okular

Set-up look and feel

To get normal look and feel you need to install Breeze KDE theme with

sudo apt-get install breeze qt5ct

and select it from qt5ct with

QT_QPA_PLATFORMTHEME=qt5ct qt5ct

then switch to Icon Theme tab and select Breeze here and hit Save:

qt5ct

To make changes permanent add this line to your ~/.profile with

echo "export QT_QPA_PLATFORMTHEME=qt5ct" >> ~/.profile 

then reboot and use Okular with files from anywhere:

Okular on Ubuntu 18.04 LTS with GNOME

Note: I tested the method above on Ubuntu 18.04 LTS with GNOME Shell and MATE.

N0rbert
  • 99,918
1
  1. Goto ubuntu's software manager.
  2. Goto Installed.
  3. Locate Okular and press it.
  4. Change the permissions to "read/write files on removable device".