How to Install Opera Browser on Fedora 40 or 39

Opera Browser is a feature-rich web browser known for its speed, security, and innovative features like a built-in VPN, ad blocker, and social media integration. Available in stable, beta, and developer versions, Opera caters to a wide range of users, from those looking for a reliable everyday browser to those interested in testing the latest cutting-edge features. The browser’s flexibility and support for various platforms make it a popular choice for users who value both performance and functionality.

On Fedora 40 or 39, Opera can be installed using two main methods. The first method involves using Opera’s official RPM repository, which provides the latest stable, beta, and developer builds, ensuring that your browser is always up-to-date with the newest features and security updates directly from Opera. Alternatively, you can install Opera via Flatpak from Flathub, which offers a sandboxed environment but is limited to the latest stable build. This guide will walk you through both installation methods, allowing you to choose the best option based on your preferences and needs.

Method 1: Install Opera Browser via DNF Commands

Update Fedora Before Opera Installation

To start, update your Fedora system. This step ensures that all existing packages are current, reducing the risk of system conflicts. Run the following command in your terminal:

sudo dnf upgrade --refresh

Import Opera Browser RPM Repository

Opera Browser is not available in Fedora’s default repositories. To install it, you must first add Opera’s official repository to your system. Begin by importing the Opera Browser GPG key:

sudo rpm --import https://rpm.opera.com/rpmrepo.key

Then, execute this command to add the Opera RPM repository to your system:

sudo tee /etc/yum.repos.d/opera.repo <<RPMREPO
[opera]
name=Opera packages
type=rpm-md
baseurl=https://rpm.opera.com/rpm
gpgcheck=1
gpgkey=https://rpm.opera.com/rpmrepo.key
enabled=1
RPMREPO

Install Opera Browser via DNF Commands

Now, proceed with installing the Opera Browser. It is advisable to begin with the stable build for a reliable experience. Use this command:

sudo dnf install opera-stable -y

After installation, verify the installed version of Opera Browser:

opera --version

Install Opera Browser Beta or Developer Build (Optional)

Opera offers beta and developer builds for users who prefer early access to new features. Note that you can install the beta or developer build alongside the stable version. Each of these builds has a unique installation ID.

To install the version of your choice, use one of the following commands:

For the beta build:

sudo dnf install opera-beta
opera-beta --version

For the developer build:

sudo dnf install opera-developer
opera-developer --version

Note: Installing beta and developer builds simultaneously is impossible due to their shared installation build ID, which differs from the stable build’s unique ID. Choose the build that best suits your needs for testing and exploring upcoming features.

Method 2: Install Opera Browser via Flatpak with Flathub

Before delving into the installation steps, it’s important to note that using Flatpak with Flathub only allows for installing the stable build of the Opera Browser. If you require the beta or developer builds, refer to the previously discussed method involving Opera’s RPM repository.

Verify and Install Flatpak for Opera Browser

First, check if Flatpak is installed on your Fedora system. Flatpak is a default package manager in Fedora, typically pre-installed. If you’ve removed it or need to confirm its presence, reinstall it with this command:

sudo dnf install flatpak -y

This command reinstalls Flatpak, ensuring it’s available for Opera Browser installation. The -y flag automatically approves the installation, streamlining the process.

Enable Flathub for Opera Browser Installation

With Flatpak installed, the next step is to add Flathub, a key repository for Flatpak applications. Flathub provides access to various applications, including the Opera Browser. Use this command to integrate Flathub into your system:

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

Finalize Opera Browser Installation via Flatpak Command

Now, proceed to install Opera Browser. Utilizing Flatpak for the installation ensures you get the latest stable version of the browser. Run this command:

flatpak install flathub com.opera.Opera

This command retrieves and installs the Opera Browser from Flathub, guaranteeing the most up-to-date stable release.

Troubleshoot Opera Browser Flatpak Installation

A typical error encountered during Flatpak installations from Flathub is:

“error: Unable to load summary from remote flathub: Can’t fetch summary from disabled remote ‘flathub’.”

To fix this issue, re-enable Flathub with:

flatpak remote-modify --enable flathub

This command reactivates Flathub, rectifying the error and facilitating the continuation of the installation.

Launching Opera Browser

CLI Commands to Launch Opera Browser

After successfully installing Opera Browser, you can initiate it through the command line interface (CLI). Depending on the version installed, use one of the following commands:

opera
opera-beta
opera-developer

These commands allow you to quickly start the corresponding version of Opera Browser directly from the terminal.

If you installed Opera Browser using Flatpak, launch it with this command:

flatpak run com.opera.Opera

This command activates the Flatpak-installed Opera Browser, catering to users who prefer the Flatpak installation method.

Opening Opera Browser from the Desktop Environment

For users who primarily interact with Fedora Linux through its graphical interface, Opera Browser can be accessed without using the terminal. Follow this path:

  • Navigate to Activities
  • Select Show Applications
  • Click on Opera Browser {version}

Managing Opera Browser on Fedora

Update Opera Browser

DNF Method to Update Opera Browser

To keep Opera Browser up-to-date on Fedora Linux, utilize the DNF package manager. This method refreshes your entire system, including Opera Browser, if installed via DNF. Execute the following command:

sudo dnf upgrade --refresh

This command checks for updates across all repositories, including Opera, ensuring your browser stays current with the latest features and security updates.

Flatpak Method to Update Opera Browser

If you installed Opera Browser via Flatpak, use this command to check for updates:

flatpak update

This command updates all packages managed by Flatpak, including Opera Browser, ensuring you have the latest version available.

Remove (Uninstall) Opera Browser

DNF Method to Remove Opera Browser

To uninstall Opera Browser installed through DNF, use the appropriate command based on the version you have:

sudo dnf remove opera-stable
sudo dnf remove opera-beta
sudo dnf remove opera-developer

If you’re not planning to reinstall Opera via its RPM repository, it’s recommended to remove the repository as well:

sudo dnf config-manager --set-disable rpm.opera.com_rpm

This step ensures the Opera repository is no longer referenced in your system’s package manager.

Flatpak Method to Remove Opera Browser

The removal process is straightforward for users who installed Opera Browser using Flatpak. Run this command:

flatpak uninstall com.opera.Opera

This command uninstalls Opera Browser, which Flatpak manages, and removes it from your Fedora Linux system.

Solve Opera Changing Language Issue

You can skip this section if you’re using Opera Browser in English. It addresses issues encountered when using Opera with multiple languages on Linux, where default settings may not function correctly.

Setting the Language in Opera

Users who prefer a language other than English might encounter issues with language switching in Opera on Fedora Linux. To resolve this, set your preferred language in the browser and modify the application’s launch command. Note that merely changing the browser’s language settings may not be sufficient; modifying the launch file is often necessary.

Modifying the Launch Command for Language Support

To adjust Opera’s language settings, modify the browser’s launch command. This involves editing the application file located at /usr/share/applications/opera.desktop. Use the following command as a template, replacing {LANGUAGE CODE} with your desired language code (e.g., de for German, es for Spanish, ja for Japanese):

sudo sed -i 's/Exec=opera %U/Exec=opera --lang={LANGUAGE CODE} %U/g' /usr/share/applications/opera.desktop

This command alters the Opera stable version’s launch command to include the specified language code. For users of Opera Beta or Developer versions, adjust the path in the command to /usr/share/applications/opera-beta.desktop or /usr/share/applications/opera-developer.desktop, respectively.

Installing Language Packs

If switching languages proves challenging, especially for users who installed the English version, installing the necessary language packs might be required. Install your desired language pack using the following command:

sudo dnf install langpacks-<locale_code>

A comprehensive list of language packs is available on the Fedora Wiki page under “I18N/Language Support Using Dnf.

Ready-to-Use Commands for Popular Languages

Here are commands for changing Opera’s language to some of the most commonly used languages for convenience. Remember, these are for the stable version of Opera.

Note: Modify the file path for the beta or developer versions as explained earlier:

German:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=de %U/g' /usr/share/applications/opera.desktop

French:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=fr %U/g' /usr/share/applications/opera.desktop

Italian:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=it %U/g' /usr/share/applications/opera.desktop

Japanese:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=ja %U/g' /usr/share/applications/opera.desktop

Korean:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=ko %U/g' /usr/share/applications/opera.desktop

Spanish:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=es %U/g' /usr/share/applications/opera.desktop

Portuguese:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=pt %U/g' /usr/share/applications/opera.desktop

Polish:

sudo sed -i 's/Exec=opera %U/Exec=opera --lang=pl %U/g' /usr/share/applications/opera.desktop

Conclusion

Installing Opera Browser on Fedora via the official RPM repository offers you the flexibility to choose between stable, beta, and developer builds, ensuring that your browser is always current with the latest updates. For those who prefer a more isolated environment, the Flatpak method from Flathub provides a secure installation, albeit limited to the stable build. Regular updates through these methods will keep your Opera Browser installation optimized and secure, providing a high-quality browsing experience on Fedora.

Useful Links

Here are some valuable links related to using Opera:

  • Opera Official Website: Visit the official Opera website for information about the browser, its features, and download options.
  • Opera Browser Window Help: Explore detailed guides on navigating and using the browser window in Opera.
  • Opera Customization Help: Learn how to customize Opera to suit your preferences with this comprehensive guide.
  • Opera FAQ: Find answers to frequently asked questions about using Opera.

Leave a Comment