1

I've installed okular from snap

snap list
Name              Version  Rev   Developer  Notes
core              16-2.30  3887  canonical  core
kde-frameworks-5  5.37.0   13    kde        -
okular            16.12.3  3     kde        -

when enter command okular in shell

okular
The program 'okular' is currently not installed. You can install it by typing:
sudo apt install okular

It also doesn't appear in the application list. the only way to launch okular is from software center.

enter image description here

2

You should be able to launch Okular by the following command

snap run okular

If you want to add it to the applications list, you may create a .desktop file in ~/.local/share/applications/ (say okular-snap.desktop) with the following content and save it

[Desktop Entry]
Comment=Okular document reader
Terminal=false
Name=Okular
Exec=/snap/bin/okular
Type=Application
Icon=okular
NoDisplay=false

You may find an already existing .desktop launcher for the application in the /var/lib/snapd/desktop/applications/ directory. In that case just copy it to ~/.local/share/applications/.

If the correct icon is not appearing:
You may set any image (preferably PNG or SVG) as the icon for the application. To do that change the Icon= line and point towards your preferred image. For example if you want use the MyIcon.png image located in your Desktop folder, change the line to

Icon=/home/YOUR_USER_NAME/Desktop/MyIcon.png

(Replace YOUR_USER_NAME by you actual username) .

  • Thanks! this works. Is there any way to use okular icon? imgur.com/a/iFTMc – Md Tahsin Rahman Jan 29 '18 at 10:42
  • 1
    @TahsinRahman See the edit I made to the answer. Download an icon for Okular and make the change to the .desktop file. – pomsky Jan 29 '18 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.