State of Okular in Ubuntu 17.10?
Solution 1
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.
Solution 2
My current status:
-
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).
Error messages on the terminal: Still unsolved, although the issue of running out of inotify watches seems to have disappeared?
Inconsistent UI theme (e. g. scroll bars): Still unsolved.
Solution 3
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:
Related videos on Youtube
Socob
Updated on September 18, 2022Comments
-
Socob almost 2 years
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: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.
-
ravery over 6 yearsOkular, is neither gnome nor Qt. It is KDE and plasma. And I belive it requires the KDE oxygen theme.
-
Socob over 6 years@ravery Well, isn’t KDE built on Qt (just like GNOME is on GTK)? I’ve tried installing the packages
oxygen-icon-theme
andoxygen5-icon-theme
, with no effect. -
ravery over 6 yearsmaybe it is Qt on plasma; but anyway, are you using Wayland (default) or Xorg. I don't think KDE plays well with Wayland yet.
-
N0rbert over 6 yearsYou can try to play with
qtconfig-qt4
. -
gsxruk over 6 yearsCould you update the question to include the method you used to install it?
-
Socob over 6 years@ravery I don’t see a difference no matter whether I use the Wayland or the X.org session
-
Socob over 6 years@gsxruk Done: Installed via
apt install okular
.
-
-
Socob over 6 yearsThanks, 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”.
-
rdrey about 6 yearsYeah, promising and pretty, but snap's Okular just crashed when I tried to save an annotated PDF
-
Timur Fayzrakhmanov about 5 yearsLinux Mint, works perfect now!
-
Socob over 4 yearsIn more recent versions of Ubuntu, this is what fixes the icons (which are still broken by default, two years later!) for me.