Okular is a popular open-source document viewer and annotator for Linux, Unix, and Windows platforms. It was first released in 2005 and became a widely-used software for viewing and annotating PDF, Postscript, and other document formats. Okular offers a more user-friendly and customizable experience than similar software, making it an excellent choice for users looking for an efficient document viewer.
The purpose of this article is to provide a comprehensive guide on how to install Okular on Fedora Linux using two methods, the DNF Package Manager or Flatpak with Flathub. Whether you are a new or experienced Linux user, this guide will help you to easily install Okular and start using its powerful features to view and annotate your documents.
Here’s a comparison table between Okular and other popular document viewers:
Feature | Okular | Adobe Acrobat | Foxit Reader | Evince |
---|---|---|---|---|
Document Formats | PDF, Postscript, DjVu, CHM, and more | PDF, Postscript, DjVu | ||
Annotation | Customizable annotations, including text, highlights, underlines, and more | Customizable annotations, including text, highlights, underlines, and more | Customizable annotations, including text, highlights, underlines, and more | Basic annotations, including text and highlights |
Document Comparison | Built-in document comparison feature | Built-in document comparison feature | No built-in document comparison feature | No built-in document comparison feature |
User Interface | User-friendly, customizable interface | Intuitive interface but can be cluttered with menus | Intuitive interface but can be cluttered with menus | Simple but less customizable interface |
Performance | Fast and responsive | Fast and responsive | Fast and responsive | Fast and responsive |
It’s worth noting that this table only includes a few key features and is not meant to compare all the features offered by each software comprehensively. However, it should give you an idea of how Okular compares to other popular document viewers regarding key features and capabilities.
Table of Contents
Step 1: Update Fedora
Before installing any new software, updating your system to the latest version is recommended. You can do this by running the following command in the terminal.
sudo dnf upgrade --refresh
Method 1: Install Okular with DNF
The Fedora default DNF repository is the first method of installing Okular on Fedora Linux. This option is considered stable and secure and is recommended for users who prioritize stability and security over the latest updates. However, it should be noted that the version available through the DNF repository may be outdated compared to the alternative option.
To install Okular using the DNF package manager, run the following command in your terminal.
sudo dnf install okular
An alternative option for installing Okular on Fedora Linux is using Flatpak. Flatpak is a natively installed package manager on Fedora that often contains newer versions of software compared to the Fedora repository. However, it’s important to note that, unlike other Linux distributions, the version of Okular available through the Fedora repository may not necessarily be outdated. In some cases, it may even be the same or only one version behind compared to the version available on CentOS, for example.
Method 2: Install Okular with Flatpak
The second method for installing Okular on Fedora Linux is using the Flatpak package manager. Flatpak comes pre-installed on Fedora unless it has been removed, and it is a popular alternative to Snap. It is widely used across multiple Linux distributions as a third-party package manager for accessing the latest software packages.
First, if you have previously removed the Flatpak package manager, you will need to reinstall it before proceeding with the installation of Okular.
Install Flatpak (Situational)
sudo dnf install flatpak -y
Next, you will need to enable Flatpak by executing the following command in your terminal.
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
It is recommended to reboot your system at this stage. If you skip this step and encounter issues with icons not appearing, rebooting will generate the necessary paths for future use.
reboot
Install Okular with Flatpack and Flathub
Now, you can proceed with the installation of Okular using the Flatpak command.
flatpak install flathub org.kde.okular -y
Fedora Flatpak Troubleshoot with Okular
The error message below is a common issue when installing a Flatpak from Flathub.
"error: Unable to load summary from remote flathub: Can't fetch summary from disabled remote 'flathub,"
The solution to this issue is straightforward. Run the following command to activate Flathub.
sudo flatpak remote-modify --enable flathub
Another potential issue during the installation process is a lack of access to system files. The command below should only be used if you do not have permission to access the necessary files for the installation.
sudo flatpak override org.kde.okular --filesystem=host
It is crucial to remember that this command should only be used as a last resort and only if you are encountering issues with opening files. If it is not necessary, it should not be used by default.
How to Launch Okular
With the software now installed, there are a few ways to launch it. One of the simplest methods is to immediately launch the application by entering the following command in your terminal.
okular
Finally, Flatpak users can launch Okular from the terminal using the following command.
flatpak run org.kde.okular
However, using the terminal may not be the most convenient option, in which case you can also open Okular by using the following path on your desktop.
Activities > Show Applications > Okular
Example:
When you first open Okular, you will be presented with its default landing screen, ready for you to start using the document viewer. Although the default viewer window is minimalistic, the settings menu offers several configuration options that allow you to tailor the appearance and behavior of the application to your preferences.
Example:
Before diving into your work with Okular, it’s a good idea to familiarize yourself with its features and settings. For example, you can adjust the display size, background color, and page layout. You can also configure Okular to automatically fit the page to the window or display two side-by-side pages. Additionally, you can choose to have Okular remember your last viewed page, open documents in full-screen mode, and much more.
Additional Commands & Tips
Update Okular on Fedora
It’s a good idea to regularly check for updates to ensure that you have the latest version of Okular installed on your system. You can check for updates through notifications or a terminal command. If updates don’t appear in notifications, it’s recommended to run one of the following terminal commands to check for updates manually.
Update Okular DNF Method
sudo dnf update --refresh
Update Okular Flatpak Method
flatpak update
Remove (Uninstall) Okular on Fedora
Use one of the following commands to remove Okular, depending on the original installation method.
Okular DNF Remove Method
sudo dnf autoremove okular
Note that running the autoremove command will delete the Okular application and any unused packages or leftover files from previous applications. This is usually safe and helps keep your system from becoming cluttered. It is recommended to run autoremove to maintain the efficiency of your system regularly.
Okular Flatpak Remove Method
flatpak remove --delete-data org.kde.okular
Next, execute the following command for any necessary clean-up tasks, similar to the autoremove command mentioned for the DNF removal example command.
flatpak remove --unused
Conclusion
This article shows you how to install Okular on Fedora Linux using either the DNF Package Manager or Flatpak with Flathub. Both methods are straightforward, making it easy to start using Okular to view and annotate your documents. Whether you are a new or experienced Linux user, this guide should help you to install Okular quickly and easily.
Frequently Asked Questions
What is Okular?
Okular is a popular and powerful document viewer that can view and annotate a wide range of document formats, including PDF, PostScript, DjVu, CHM, and XPS.
What is DNF Package Manager?
DNF (Dandified Yum) is the default package manager for Fedora Linux and is used to install, update, and remove packages from the system.
What is Flatpak with Flathub?
Flatpak is a package manager for Linux that allows you to install and run applications in a sandboxed environment. Flathub is a repository of Flatpak applications that can be easily installed on your system.
Is Okular available in the Fedora Linux default repository?
Yes, Okular is available in the Fedora Linux default repository and can be installed using the DNF Package Manager.
Can Okular be installed on other Linux distributions?
Yes, Okular can be installed on other Linux distributions, but the installation process may be different. You can check the Okular website or the distribution’s package manager for more information.
What are the advantages of using Flatpak to install Okular?
One advantage of using Flatpak to install Okular is that it allows you to run the application in a sandboxed environment, which provides better security and compatibility with different Linux distributions. Additionally, it makes it easy to keep the application up-to-date without affecting the system’s stability.