Zathura document viewer using mupdf backend and embedded in tabbed. wmctrl is used to control the zathura window - to open it maximized by default and to bring it into focus when new tab is added from command line.
zathura-tabbed 1.pdf 2.pdf 3.epub ...
Download sources for mupdf, girara, zathura, zathura-pdf-mupdf, tabbed
make XCFLAGS=-fPIC release
make PREFIX=/opt/zathura install
make PREFIX=/opt/zathura install-headers
I have a patch for zathura-0.3.3 that enables multiple files to be opened inside tabbed using zathura-embedded 1.pdf 2.pdf ...
. Without the patch, only the first pdf opens in tabbed and the rest are opened in separate windows. Apply the patch: patch <zathura>/zathura/main.c main.diff
env PKG_CONFIG_PATH=/opt/zathura/lib/pkgconfig make PREFIX=/opt/zathura WITH_SQLITE=0 WITH_MAGIC=0 LDFLAGS="-Wl,-rpath='\$\$ORIGIN/../lib'" install
The rpath setting is so that the zathura
executable can find libgirara-gtk3.so
at runtime. If the dollar escapes in the command get messed up somehow, you can fix rpath in the executable by running:
patchelf --set-rpath '$ORIGIN/../lib' /opt/zathura/bin/zathura
- edit config.mk: prepend to INC
-I<mupdf>/include
, prepend to LIB-L<mupdf>/build/release
. (replace<mupdf>
with path to mupdf folder). Since mupdf libraries were built statically, rpath setting is not needed. - You might need to install a few system libraries and dev files like libopenjp2 and libssl (for libcrypto)
env PKG_CONFIG_PATH=/opt/zathura/lib/pkgconfig make
- Copy
pdf.so
to/opt/zathura/lib/zathura/pdf.so
make prefix=/opt/zathura install
cp zathura-tabbed /opt/zathura/bin/
mkdir ~/.config/zathura
cp zathurarc ~/.config/zathura/
cp zathura.desktop ~/.local/share/applications/
xdg-mime default zathura.desktop application/pdf application/oxps application/epub+zip
sudo apt-get install wmctrl
Add /opt/zathura/bin
to path at login (In ~/.profile
for example)
- Xubuntu 15.04
- mupdf-1.7a
- girara-0.2.4
- zathura-0.3.3
- zathura-pdf-mupdf-0.2.8
- tabbed (git commit 55dc32b27b73c121cab18009bf087e95ef3d9c18)