How to Install Okular on Ubuntu 22.04

Introduction

Before we discuss how to install okular on ubuntu 22.04,let's first understand-What is Okular?

Okular is a powerful and feature-rich document viewer for Ubuntu that supports various file formats, including PDF, EPUB, and more.

This tutorial will explain how to install Okular on Ubuntu 22.04.

Advantages

  1. Versatile Document Viewing: Okular can handle a wide range of document formats, allowing you to view and navigate PDFs, eBooks, comics, and more within a single application.
  2. Annotation and Markup: Okular provides tools for adding annotations, highlighting text, and making notes on your documents. This feature is useful for reviewing, studying, or collaborating on documents.
  3. Search and Text Extraction: Okular allows you to search for specific text within documents, making it easy to find information quickly. It also supports text extraction, enabling you to copy and paste text from your documents.
  4. Customizable Interface: Okular offers a customizable interface where you can adjust the layout, choose different viewing modes, change themes, and configure keyboard shortcuts, allowing you to personalize your document viewing experience.
  5. Integration with KDE Frameworks: Okular is built on the KDE Frameworks, providing integration with other KDE applications and a consistent user experience within the KDE desktop environment.

Installing Okular on Ubuntu 22.04 via APT

Step 1: Ensuring Your Ubuntu Packages are Updated Before Okular Installation

We must lay the groundwork before we embark on the installation journey by ensuring our Ubuntu packages are up-to-date. This practice not only maintains the overall health of your system but also preempts any potential software conflicts that could occur during the installation process.

You can swiftly accomplish this task using the Terminal, an interface allowing you to interact with the system using text commands. Here is the command you should enter:

sudo apt update && sudo apt upgrade

Step 2: Install Okular on Ubuntu 22.04 via APT Command

Once your system is updated, we’re ready to install Okular. The Ubuntu default APT repository offers a stable and secure version of Okular, which makes it a highly recommended option for installation. While it might not always be as up-to-date as the Flatpak version, the APT repository is known for its robust, tried-and-true packages.

To install Okular from the APT repository, you’ll need to execute the following command in your Terminal:

sudo apt install okular

Upon running this command, your system will reach out to the Ubuntu repositories, fetch the Okular package, and proceed with the installation. Once the process is complete, you will have successfully installed Okular on your Ubuntu system through the APT repository. As we continue, we’ll explore alternate methods of installation, which can come in handy depending on your specific requirements.

Install Okular on Ubuntu 22.04 via Snap

Snapcraft, commonly referred to as ‘Snap’, offers another pathway to install Okular. It’s a universal package manager created by Canonical (the maker of Ubuntu) that simplifies the installation process and ensures you always have the latest version of an application. It should be available on your Ubuntu desktop by default unless it has been previously removed.

Step 1: Enabling Classic Snap Support on Ubuntu for Okular

To kick things off, we need to ensure that Snap can handle ‘classic’ packages. A ‘classic’ Snap has more permissions on the host system than regular Snaps, which allows it to function just like a traditionally packaged application. Not all applications require this, but it’s prudent to enable classic support to have the broadest compatibility.

We’ll create a symbolic link (symlink), essentially a shortcut that points from one location to another in the filesystem. This enables the Snap package manager to find and handle classic Snaps.

To create this symlink, input the following command:

sudo ln -s /var/lib/snapd/snap /snap

Here’s the breakdown for those who may be interested:

  • sudo grants the command administrative privileges, as creating a symlink at the system level requires these permissions.
  • ln -s is the part of the command that creates a symbolic link.
  • /var/lib/snapd/snap is the source directory that houses the Snap core files.
  • /snap is the target directory where the symlink will be created.

Step 2: Install the Snap Core

Once classic support is enabled, installing the Snap core is next. The Snap core provides the foundations for any Snap package to run properly on your system, and it helps avoid any potential issues.

Use the following command to install the Snap core:

sudo snap install core

This command follows the same pattern as before: sudo for administrative privileges, snap install to instruct the system to install a Snap package, and core being the specific package to install.

Step 3: Install Okular on Ubuntu 22.04 via Snap

With the preparations complete, we’re now ready to install Okular using Snap. Thanks to the universality of Snap, this command is as straightforward as they come.

Input the following command to install Okular:

sudo snap install okular

As before, sudo grants administrative privileges, snap install instructs the system to install a Snap package, and okular is the specific package we’re installing.

Once this command completes, you will have successfully installed Okular on your Ubuntu system using the Snapcraft package manager.

Install Okular on Ubuntu 22.04 via Flatpak and Flathub

In this section, we’ll dive into another method of installing Okular: using the Flatpak package manager. Flatpak is a universal package management system for Linux that makes applications available across a variety of Linux distributions. It operates in a sandbox environment, isolating applications from the main system, which enhances system security and stability.

Step 1: Enabling Flathub for Okular on Ubuntu

Our first step in this journey is to enable the Flathub repository. Flathub is a vibrant app store that hosts a multitude of Flatpak applications. It’s like an ever-expanding library, ensuring you have a vast variety of applications, including Okular.

To add the Flathub repository to your Flatpak configuration, execute the following command:

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

In this command:

  • sudo grants administrative privileges needed for adding a repository.
  • flatpak remote-add is the command to add a new repository to Flatpak.
  • --if-not-exists is a safety mechanism that prevents Flatpak from returning an error if Flathub is already added to the configuration.
  • flathub is the name assigned to the repository.
  • https://flathub.org/repo/flathub.flatpakrepo is the URL of the Flathub repository.

Once you’ve run this command, your system is set to fetch and install applications from Flathub.

Step 2: Install Okular on Ubuntu 22.04 via Flatpak

With Flathub at our disposal, we’re all set to install Okular. The Flatpak version of Okular can be fetched directly from the Flathub repository, which ensures you’re getting the latest version of the application.

Enter the following command to install Okular:

flatpak install flathub org.kde.okular -y

In this command:

  • flatpak install instructs the system to install a Flatpak package.
  • flathub points to the repository that the package will be fetched from.
  • org.kde.okular is the specific package we’re installing.
  • -y is an optional parameter that automatically answers ‘yes’ to any prompts, streamlining the install process.

Once the process is complete, you’ll have successfully installed Okular via Flatpak and Flathub.

Launching Okular on Ubuntu 22.04

Congratulations on successfully installing Okular! Now, let’s shift gears and focus on how to launch this versatile document viewer on your Ubuntu Linux system. There are several ways to start using Okular, depending on your preferred method and the package management system used for installation.

Launching Okular from the Terminal on Ubuntu

To begin with, you can launch Okular directly from your Terminal. This method can be handy when you’re already operating within the terminal environment. The command to start Okular is as straightforward as:

okular

Running this command searches for the Okular application within your system and initiates it promptly.

If you installed Okular using Snapcraft, the command to launch Okular is slightly different:

snap run okular

In this command, snap run instructs the Snapcraft system to execute the application following it, in this case, okular.

For those who installed Okular via Flatpak, the command to start Okular takes a different form:

flatpak run org.kde.okular

Here, flatpak run prompts the Flatpak system to execute the specified application, identified by org.kde.okular.

Launching Okular from the Ubuntu Desktop

While running Okular from the Terminal is efficient, it’s not always the most practical or user-friendly method, especially if you frequently interact with a graphical desktop environment.

To launch Okular from your desktop:

  1. Click on ‘Activities’ located at the top-right corner of your desktop.
  2. Select ‘Show Applications’.
  3. Search for ‘Okular’ in the application list.

Tips on Getting Started with Okular on Ubuntu 22.04

Navigating a new application can feel like unraveling a complex puzzle. However, Okular simplifies the process with its user-friendly interface and easy-to-understand features. To further assist you in this journey, here are some valuable tips that will help you get the most out of Okular on Ubuntu Linux.

Harness the Power of Annotations with Okular on Ubuntu

Okular’s annotation tool is a standout feature. You can highlight, underline, and strikethrough text, add inline and margin notes, and even draw on the document. Here’s how to use the annotation feature:

Tools > Review

Then select your preferred annotation tool from the toolbar.

Okular’s navigation features make it easy to skim through lengthy documents. Use the following keyboard shortcuts to enhance your navigation experience:

  • Next Page: Space or Page Down
  • Previous Page: Shift + Space or Page Up
  • First Page: Home
  • Last Page: End

Customize Okular to Suit Your Needs with Okular on Ubuntu

Okular is highly customizable. You can adjust its settings to suit your viewing preferences. For instance, you can change the color scheme, adjust the zoom level, or choose the page layout. Go to:

Settings > Configure Okular

Make Use of Okular’s Versatile File Support with Okular on Ubuntu

One of the key strengths of Okular is its support for multiple file formats. It can handle PDFs, ePub documents, CHM files, and many others. Therefore, don’t hesitate to use Okular as your go-to document viewer, no matter the file type.

Remember the “Save Annotations” Feature with Okular on Ubuntu

Okular allows you to save annotations directly into your PDF file. This makes it easy to share your comments and highlights with others. After making annotations, you can save them by:

File > Save As...

Remember to save your work frequently to avoid losing your annotations.

Managing Okular on Ubuntu 22.04

Being proficient in managing your software is as crucial as knowing how to use it. This section will walk you through the procedures to update and uninstall Okular on Ubuntu Linux, providing necessary insights at each stage. This tutorial will help you keep Okular up-to-date or remove it entirely if it no longer suits your needs.

Update Okular on Ubuntu 22.04

One of the benefits of software updates is getting access to the latest features, improved security, and bug fixes. Ubuntu’s system regularly checks for updates and notifies you about them. However, in certain scenarios, these notifications may not appear. That’s when you need to take the reins and manually check for updates using the Terminal. Here’s how you do it based on the installation method you followed:

APT Update Terminal Command for Okular on Ubuntu

For installations done via the APT package manager, enter the following command in your Terminal:

sudo apt update

This command updates the package list on your Ubuntu system, including Okular.

Flatpak Update Terminal Command for Okular on Ubuntu

For those who have installed Okular using Flatpak, you can update your software with the following command:

flatpak update

This command checks for updates in your Flatpak applications and installs them.

Snap Update Terminal Command for Okular on Ubuntu

If you have used Snap to install Okular, update it using the command below:

sudo snap refresh

This command will update all your Snap applications, including Okular.

Remove Okular from Ubuntu 22.04

There might come a time when you no longer require Okular on your Ubuntu system. Here’s how to uninstall it based on your original installation method:

APT Remove Terminal Command for Okular on Ubuntu

To remove Okular installed via the APT package manager, use the following command:

sudo apt remove okular

Flatpak Remove Terminal Command for Okular on Ubuntu

If Okular was installed using Flatpak, use the following command to remove it:

flatpak remove  --delete-data org.kde.okular -y

Snap Remove Terminal Command for Okular on Ubuntu

For Okular installed via Snap, you can uninstall it using the following command:

sudo snap remove okular

FAQs to Install Okular on Ubuntu 22.04

Can I open and view PDF files with Okular? 

Yes, Okular supports PDF files and is particularly well-suited for viewing and interacting with them.

Is Okular limited to PDF documents, or can it handle other file formats? 

Okular can handle various file formats, including EPUB, DjVu, CHM, XPS, and more.

Can I highlight and annotate text in Okular? 

Yes, Okular provides tools for highlighting text, adding comments and notes, and drawing shapes on your documents.

Does Okular support searching within documents? 

Yes, Okular allows you to search for specific text within documents, helping you quickly locate information.

Can I extract text from documents in Okular? 

Yes, Okular supports text extraction, allowing you to copy and paste text from your documents into other applications.

Can I adjust the interface of Okular to suit my preferences? 

Yes, Okular offers customization options such as changing the layout, selecting different viewing modes, and configuring keyboard shortcuts.

Does Okular integrate well with other KDE applications on Ubuntu? 

Yes, as Okular is built on the KDE Frameworks, it integrates seamlessly with other KDE applications, providing a consistent experience within the KDE environment.

Can I sync Okular settings and annotations across different devices? 

Okular does not have built-in synchronization functionality. However, you can manually transfer your settings and annotations by copying the appropriate configuration files.

Conclusion

We’ve seen the various requirements for proper installation and usage and its features. We’ve covered the step-by-step tutorial to installing Okular on Ubuntu 22.04.

If you have any queries, feel free to ask them in comments section, and we would be happy to respond to them......