Okular is a versatile and feature-rich document viewer developed by KDE, supporting a wide range of file formats including PDF, EPUB, DjVu, and more. It’s designed to provide an efficient and user-friendly experience for viewing and managing documents, with features like annotations, text extraction, and support for embedded multimedia content. Okular is particularly well-suited for users who require a powerful tool for reading and interacting with various types of documents, whether for professional or personal use.
On Fedora 40 or 39, you can install Okular using the DNF package manager through Fedora’s AppStream, ensuring a stable version that integrates seamlessly with the system. Alternatively, for users who prefer a more isolated environment or access to potentially newer features, Okular can also be installed via Flatpak using the Flathub repository. This guide will walk you through both installation methods, ensuring you can easily set up Okular on your Fedora system.
Method 1: Install Okular via Fedora Appstream
Refresh Fedora Packages Before Installation
To ensure your Fedora system is up-to-date before installing Okular, execute the following command in the terminal. This step is crucial as it updates all your system packages, ensuring compatibility and security.
sudo dnf upgrade --refresh
Install Okular via DNF Command
Okular can be installed on Fedora Linux using the DNF package manager, which accesses Fedora’s default repository. This method is highly recommended for those who value stability and security. However, while this method provides a stable version of Okular, it may not always offer the most recent version.
Run this command in your terminal to install Okular:
sudo dnf install okular
Following this, we will explore an alternative method to install Okular using Flatpak, providing access to potentially newer versions of the application.
Method 2: Install Okular via Flatpak and Flathub
Use Flatpak, a popular package manager for Linux distributions, to install Okular on Fedora Linux as an alternative method. Generally, Fedora comes with Flatpak pre-installed. However, you might need to reinstall it if you’ve removed it earlier. This approach is excellent for getting the latest versions of software that the default repositories might not provide.
Verify If Flatpak is Installed
Check if Flatpak has already been installed on your system before moving forward. Use this command to install it if it’s not present:
sudo dnf install flatpak -y
Enable Flathub for Okular Installation
Flathub is a repository for Flatpak applications. To install Okular from Flathub, first enable it using the following command:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Install Okular via Flatpak Command
With Flathub enabled, you can install Okular by executing this command:
flatpak install flathub org.kde.okular -y
Fedora Flatpak Troubleshoot with Okular
If you encounter the error “error: Unable to load summary from remote flathub: Can’t fetch summary from disabled remote ‘flathub,'” the solution is simple.
"error: Unable to load summary from remote flathub: Can't fetch summary from disabled remote 'flathub,"
This issue arises when the Flathub repository is not active. Reactivate it using the command below:
sudo flatpak remote-modify --enable flathub
Launching Okular
CLI Commands to Launch Okular
Users comfortable with the terminal can immediately launch Okular with a simple command. This method is direct and efficient for frequent command-line users.
Launch Okular using this command:
okular
For installations via Flatpak, use the following command to start Okular:
flatpak run org.kde.okular
GUI Method to Launch Okular
Users who prefer a graphical approach can easily access Okular through the desktop environment. This method is intuitive and aligns with the standard workflow of most desktop users.
To open Okular, navigate as follows:
Activities > Show Applications > Okular
Managing Okular
Update Okular on Fedora
Keeping Okular updated is crucial for accessing the latest features and security patches. While Fedora often notifies you of available updates, manual checks are an excellent practice to ensure your version of Okular is current.
DNF Update Command For Okular
To update Okular installed via DNF, use this command:
sudo dnf update --refresh
It refreshes the repository data and applies available updates.
Flatpak Update Command For Okular
For installations done via Flatpak, execute this command to check for and apply updates:
flatpak update
Remove Okular From Fedora
Depending on how Okular was installed, use the corresponding command to remove it from your Fedora system.
DNF Remove Command For Okular
To uninstall Okular that was installed using DNF, this command will remove the software:
sudo dnf remove okular
Flatpak Remove Command For Okular
For Okular installations via Flatpak, use this command:
flatpak remove --delete-data org.kde.okular
It also deletes associated data for a clean uninstall.
Conclusion
Installing Okular on Fedora, whether through the DNF package manager and Fedora’s AppStream or via Flatpak with Flathub, provides you with a robust document viewer capable of handling a variety of file formats. The DNF method offers seamless integration with your system, while the Flatpak option provides added flexibility and isolation. Regular updates through your chosen installation method will ensure you continue to benefit from Okular’s latest features and improvements. With Okular installed, you’re well-equipped to efficiently manage and interact with your documents on Fedora.