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

1

1 Answer 1

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) .

2
  • Thanks! this works. Is there any way to use okular icon? imgur.com/a/iFTMc Jan 29, 2018 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, 2018 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .