10

With Ubuntu 17.10, Okular (installed through the Ubuntu repositories, i. e. apt install okular) seems to work a lot worse than in previous versions. This is both on Wayland and on the X session. Here is a screenshot: Okular window

For example: As you can see, only the item “Contents” in the left sidebar has an icon. The other ones (“Thumbnails”, “Reviews”, “Bookmarks”) should have icons as well (see e. g. this screenshot).

Moreover, when I open Okular from the Terminal, I get a bunch of output:

inotify_add_watch("/home/user/.config/ibus/bus/9f77c45ee0ec4b6a89aaaa7669ff56c1-unix-0") failed: "No space left on device"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/16/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/22/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/24/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/32/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/48/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/64/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/128/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/16/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/22/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/24/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/32/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/48/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/64/"
Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/128/"

The messages about the icon theme might be related to the missing icons. The first line apparently means that the limit of inotify watches has been reached – why is that happening?

Lastly, the UI theme looks nothing like other applications in Ubuntu (I guess this is a problem with Qt applications in general?) – look at the scroll bars, for example. I suppose this has to do with the move back to GNOME? It used to be much better in Ubuntu versions before 17.10.

Is there any way to fix/work around these issues?


As another data point, there is the question “Okular instances do not group under single icon in desktop dock on Ubuntu 17.10”, but that already has a solution in the link.

7
  • 1
    Okular, is neither gnome nor Qt. It is KDE and plasma. And I belive it requires the KDE oxygen theme.
    – ravery
    Commented Jan 25, 2018 at 0:07
  • @ravery Well, isn’t KDE built on Qt (just like GNOME is on GTK)? I’ve tried installing the packages oxygen-icon-theme and oxygen5-icon-theme, with no effect.
    – Socob
    Commented Jan 25, 2018 at 0:33
  • maybe it is Qt on plasma; but anyway, are you using Wayland (default) or Xorg. I don't think KDE plays well with Wayland yet.
    – ravery
    Commented Jan 25, 2018 at 0:42
  • You can try to play with qtconfig-qt4.
    – N0rbert
    Commented Jan 25, 2018 at 9:52
  • Could you update the question to include the method you used to install it?
    – gsxruk
    Commented Jan 25, 2018 at 16:02

4 Answers 4

5

Install qt5ct:

sudo apt install qt5ct

Run:

qt5ct --platformtheme qt5ct

and set the icon-theme to breeze. (You may do other modifications as you wish)

Set the appropriate evironment variable:

sudo nano /etc/environment

and add this line:

QT_QPA_PLATFORMTHEME="qt5ct"

Reboot.

If this doesn't work continue with the following: Then copy the okular .desktop file to your home folder:

cp /usr/share/applications/org.kde.okular.desktop ~/.local/share/applications

Modify the copied .desktop file by changing the line:

Exec=okular %U

to

Exec=okular --platformtheme qt5ct %U

Open the ~/.local/share/applications folder in Files and run Okular. It will ask you to trust the application the first time.

Done.

2
  • Linux Mint, works perfect now! Commented Jun 8, 2019 at 16:45
  • In more recent versions of Ubuntu, this is what fixes the icons (which are still broken by default, two years later!) for me.
    – Socob
    Commented Feb 6, 2020 at 15:45
3

My current status:

  1. Missing icons: I found a solution to this in a comment on Launchpad bug #1698656 (“navigation panel icons missing on standard install of 17.04”):

    As a workaround, what worked for me was:

    $ sudo apt install systemsettings kde-config-gtk-style kde-config-gtk-style-preview oxygen-icon-theme

    • systemsettings for the app systemsettings5;

    • kde-config-gtk-style enables the Appearance module in systemsettings5;

    • kde-config-gtk-style-preview allows previewing the themes without restarting the GTK applications;

    • oxygen-icon-theme is an alternative theme to use in KDE applications.

    Then, run systemsettings5, click on Application Style, select Oxygen as a Fallback theme, click on Apply.

    I used “Breeze” instead of “Oxygen” as a fallback theme, though (because I like it more).

  2. Error messages on the terminal: Still unsolved, although the issue of running out of inotify watches seems to have disappeared?

  3. Inconsistent UI theme (e. g. scroll bars): Still unsolved.

1

Using a fresh install of Ubuntu 17.10, I also tried installing using sudo apt install okular and received the same issue as you have reported.

However, it does appear to work if it is installed as a snap.

Remove the currently installed okular:

sudo apt remove okular

Install as a snap:

sudo snap install okular

Trying to run okular from the terminal then gives the following:

You need to connect this snap to the kde-frameworks-5 snap.

You can do this with those commands: snap install kde-frameworks-5
snap connect okular:kde-frameworks-5-plug
kde-frameworks-5:kde-frameworks-5-slot

Connect okular to the kde frameworks snap:

sudo snap install kde-frameworks-5
sudo snap connect okular:kde-frameworks-5-plug kde-frameworks-5:kde-frameworks-5-slot

Running okular then gives the following:

enter image description here

2
  • 2
    Thanks, but the current version of the Okular snap has a host of other problems, like being unable to access files outside the user’s home directory or any printers. Also, there were still some icons missing in “Settings → Configure Okular”.
    – Socob
    Commented Feb 12, 2018 at 10:19
  • Yeah, promising and pretty, but snap's Okular just crashed when I tried to save an annotated PDF
    – rdrey
    Commented May 24, 2018 at 20:25
0

For me, installing the frameworkintegration package (mentioned in this post) fixed it.

sudo apt install frameworkintegration
0

You must log in to answer this question.

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