I like the speed of MuPDF
and the ui of Zathura
Luckily there is a mupdf-backend for Zathura.
Unfortunately it is not in the repositories and building following the instructions failed on an error:
Makefile:25: *** "The minimum required version of zathura is 0.2.0".
While the version that I have installed is zathura 0.3.5
How do I install the plugin in Ubuntu (16.04)?
This is the version of your zathura pdf viewer; the error message is for the development files for zathura plugins, which you can get by installing the package
zathura-dev
.Here's a procedure to compile the plugin on Ubuntu 16.04 and 18.04.
First, you need to compile
libmupdf-dev
version 1.11.Clone the repo of the project:
Enter its root directory:
Checkout the branch tagged
1.11-rc1
:Update the third party libraries:
Install some necessary dependencies:
Compile
libmupdf-dev
:Install
checkinstall
to install the files as a deb package:Use it to install the files under the package
libmupdf-dev
:Now you can compile the zathura plugin. Get out of the
mupdf/
directory and clone the repo ofzathura-pdf-mupdf
:Enter its root directory:
Checkout the branch 0.3.1:
Install some necessary dependencies:
Finally, compile and install:
It seems that you can't easily go beyond the versions 1.11 and 0.3.1 for
libmupdf-dev
andzathura-pdf-mupdf
, on Ubuntu 16.04. But on Ubuntu 18.04, you can go a little higher if you want:Which gives:
If you want to remove the plugin, run:
It will remove the
/usr/lib/zathura/pdf.so
fromzathura-pdf-poppler
, so reinstall the latter:Once the plugin is installed, you may need to make zathura the default program to open a pdf (and an epub); so run:
If the compilation of
libmupdf-dev
fails because of a missing file, try to find the package to which it belongs with$ apt-file search <file>
, or readdocs/building.html
, header “Compiling on Linux” (if the file doesn't exist, temporarily switch to master$ git checkout master
).And maybe try to apply some debian patches before compiling:
Apply the ones you consider the most useful, by running this command while in the directory of the targeted file:
The
-b
option passed to$ patch
creates a backup of a file before patching it. The backup file bears the extension.orig
.If you want to reverse the effect of a patch, use the
-R
option.And use
--dry-run
to simulate a patching.The plugin is still not included in Debian repos and so I decided to package it myself.
I've uploaded
zathura-pdf-mupdf
package to Launchpad PPA ppa:spvkgn/zathura-mupdf, it contains packages for 16.04, 16.10, 17.04 and 17.10 Ubuntu series. The plugin compiled against library from latestMuPDF
1.11 version.Please feel free to let me know if any issues with this package occurs.
A dirty and hacky way is to use the Arch binary.
Download and extract the binary
/usr/lib/zathura/pdf.so
from the package and copy it to e.g./usr/lib/zathura/pdf.so
on your Ubuntu machine. Better rename your existing pdf.so (poppler) to pdf.bu so it won't conflict.The plugin is recognized:
Till now I haven't seem much stability issues. Zathura is much faster then before, especially in rendering (huge images) and searching.
Be aware, in general it is not recommended to
install
software this way. It is a binary from a different distribution, it will not be updated nor patched automatically. Use it at your own risk.Advantage is that the
zathura-pdf-mupdf-0.3.0
plugin also supports theepub
format.Hopefully the plugin will be included in the Ubuntu repositories in the near future.