Home » Guides » Steps To Install Zathura On Linux: CentOS, Debian Ubuntu, Gentoo, Manjaro, Fedora, Arch Linux, etc. 

Steps To Install Zathura On Linux: CentOS, Debian Ubuntu, Gentoo, Manjaro, Fedora, Arch Linux, etc. 

Zathura is a customizable and minimalist document viewer that works on most Linux distributions. The app is based on the Girara user interface and hosts several document libraries. As an open-source project, the app is completely free to use and is developed by the PWMT community as a streamlined reading and document-viewing tool. It has a keyboard-centric interface and several features to help users make the most out of it. The following guide helps readers install Zathura on Linux and its various distributions. There are several methods available, and all you need to do is follow the instructions provided below to install Zathura without much hassle. 

What Is Zathura?

As discussed above, Zathura is a lightweight document viewer that supports PDFs, DjVu, PostScript, and Comic Book Archive formats. It is a popular choice for those who love a minimalistic approach to document viewing and reaching. Also, the interface doesn’t support mouse-operation. The app is without bloatware, allowing users to focus on the task at hand. Furthermore, users can customize the app using a simple text file, to suit their specific needs. 

Although Zathura is primarily focused on Linux systems, you can compile it on any UNIX-based system. Furthermore, being lightweight, you don’t have to worry about hardware issues as it is perfectly capable of running on even older systems.

Zathura
Zathura

Features Of Zathura

Given below are a few features of Zathura:

Multiple File Formats Supported

The software supports multiple document formats such as PDF, PostScript, DjVu, etc. This makes it much more versatile than a basic PDF viewer. Furthermore, with custom plugins, you can customize Zathura to only view one type of file format. 

Mouse-free Interface

You don’t have to use the mouse to view documents with Zathura. Those who prefer a keyboard-only interface will love the software. You can map actions such as scrolling or zooming to different keystrokes. Furthermore, you can use the keyboard to open or close documents, follow links, search the document and so much more. 

SyncTeX Supported

SyncTex is a new synchronization TeXnology. It is a new feature of Zathura that allows you to synchronize inputs and outputs. This is basically navigating from the source document to the typeset material. Furthermore, this feature is supported in both directions on Zathura. 

Bookmarks

You can use bookmarks on Zathura with ease. You can store these bookmarks on your device and manage them later. 

Automatic Document Reloading

When the file you are viewing changes, the document viewer automatically reloads to reflect those changes. 

Dependencies

Zathura primarily requires two core external libraries, that are Girara (the user interface library) and GTK+ (a widget toolkit). Other than these two, you will require additional dependencies based on the file formats you want the app to support and also the plugins.

Thus, you might require the following dependencies:

  • GTK3 version 3.24 or up
  • GLIB v.2.72 or up
  • Girara v. 0.4.3 
  • Libmagic 
  • JSON-Glib
  • Sqlite3 database backend
  • Libsynctex from TeXLive 
  • Libseccomp for sandbox support
  • MESON(>= 0.61)
  • GETTEXT
  • PKGCONF
  • Librvsg-bin
  • Sphinx
  • Doxygen
  • Breathe for HTML documentation
  • Sphinx_rtd_theme also for HTML documentation

Supported Distributions

Although you can run Zathura on almost any UNIX-based system, it is officially supported for the following distros:

  • Arch Linux
  • Debian
  • Fedora
  • Gentoo
  • Ubuntu
  • openSUSE
  • OpenBSD
  • MacPorts
  • Source Mage

Installing Zathura On Linux

You can install Zathura on most Linux distributions by following any of the methods mentioned below:

Method 1. Compile Zathura From Source

The most reliable method is to compile Zathura from Source, however, this is something recommended for developers and advanced users. Here’s how you do it:

Step 1. Start by installing the various dependencies required:

sudo apt install libgtk-3-dev libglib2.0-dev libcairo2-dev libgirara-dev libpoppler-glib-dev

Step 2. Before compiling Zathura, you have to install/compile Girara, so, clone the Girara repo from GitHub:

git clone https://github.com/pwmt/girara.git

Step 3. Now, locate the directory with Girara:

cd girara

Step 4. Compile the build:

git checkout --track -b develop origin/develop
mkdir build
meson build
cd build

Step 5. Use Ninja to install the build:

ninja
ninja install

Step 6. After compiling Girara, you need to get Zathura:

git clone https://github.com/pwmt/zathura.git

Step 7. Now locate the directory you downloaded Zathura to:

cd zathura

Step 8. Now, build Zathura

git checkout --track -b develop origin/develop
mkdir build
meson build
cd build

Step 9. Install the build

ninja
ninja install

Step 10. Lastly, you need to install various Zathura Plugins that are required to support the various file formats:

Step 10.1- For PDF plugin

git clone https://git.pwmt.org/pwmt/zathura-pdf-poppler.git
cd zathura-pdf-poppler
make
sudo make install

Step 10.2- DjVu plugin

git clone https://git.pwmt.org/pwmt/zathura-djvu.git
cd zathura-djvu
make
sudo make install

Step 10.3- PostScript plugin

git clone https://git.pwmt.org/pwmt/zathura-ps.git
cd zathura-ps
make
sudo make install

Method 2. Use The Tar Package To Install Zathura

You can get the .tar file from the website and use it to install Zathura:

Step 1. Get the file from the official Zathura website.

tar xfv zathura-<version>.tar.xz

Step 2. Locate the download directory:

cd zathura-<version>

Step 3. Build the app:

mkdir build
meson build
cd build

Step 4. Install Zathura

ninja
ninja install

Method 3. Install Zathura On Linux Using Native Package Managers

Zathura is available on most distributions. You can use the package managers on these distros to install Zathura:

Debian/Ubuntu

sudo apt update
sudo apt install zathura zathura-pdf-poppler zathura-djvu zathura-ps

Note: The above command will install Zathura along with the various plugins required for it to work.

Fedora

sudo dnf update
sudo dnf install zathura zathura-pdf-poppler zathura-djvu zathura-ps

Arch Linux and Manjaro

sudo pacman -Syu
sudo pacman -S zathura zathura-pdf-mupdf zathura-djvu zathura-ps

OpenSUSE 

sudo zypper refresh
sudo zypper install zathura zathura-pdf-poppler zathura-djvu zathura-ps

Void Linux

Step 1. First, install XBPS:

sudo xbps-install -S

Step 2. Then, use XBPS to install Zathura and the required plugins:

sudo xbps-install zathura zathura-pdf-mupdf zathura-djvu zathura-ps

Homebrew

Step 1. First, install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2. Lastly, install Zathura via Homebrew

brew install zathura

Gentoo

Step 1. Sync the Portage tree:

sudo emerge --sync

Step 2. Now, install Zathura:

sudo emerge app-text/zathura app-text/zathura-pdf-poppler app-text/zathura-djvu app-text/zathura-ps

OpenBSD

doas pkg_add zathura zathura-pdf-poppler zathura-djvu zathura-ps

Note: You can always use “Ports” to compile Zathura on OpenBSD

Step 1. First, update the ports tree:

cd /usr/ports
doas make update

Step 2. Now, build Zathura using ports:

cd /usr/ports/textproc/zathura
doas make install

Source Mage

Zathura is available as a “spell” in Source Mage. So you can directly “cast” it:

sorcery update
cast zathura
cast zathura-pdf-poppler
cast zathura-djvu
cast zathura-ps

Method 4. Install Zathura On Linux via Flatpak

Step 1. Start by installing Flatpak:

Debian/Ubuntu

sudo apt install flatpak

Fedora

sudo dnf install flatpak

Arch Linux

sudo pacman -S flatpak

Step 2. Then, add the Flathub repository:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Step 3. Finally, install Zathura using Flatpak:

flatpak install flathub org.pwmt.zathura

Method 5. Using Snap To Install Zathura

Step 1. Similarly, install Snap:

sudo apt install snapd

Step 2. Finally, Install Zathura via Snap:

sudo snap install zathura
Gilbert John Avatar