Sunday, September 1, 2024

Adding Flatpak Support to Ubuntu 24.04 LTS: Expanding Your App Horizons

Ubuntu 24.04 LTS is a popular Linux distribution known for its stability and reliability. One of its key features is the use of Snap, a universal software packaging and distribution format developed by Canonical, the makers of Ubuntu. But alongside the popularity of Snap, Flatpak has also emerged as a strong contender. With thousands of applications available on FlatHub and millions of downloads, almost every Linux desktop application offers a Flatpak version alongside its native package format, expanding its reach to a wider user base.

By adding Flatpak support to your Ubuntu 24.04 LTS system, you unlock a broader world of applications, enriching the functionality of your system. This guide will walk you through the simple process of adding Flatpak support and start installing Flatpak apps within minutes. Let’s get started!

Enabling Flatpak on Ubuntu 24.04 LTS

Before we begin, it’s important to remember that both Snap and Flatpak can coexist on your Ubuntu 24.04 system. You can install applications in either format without any issues.

To add Flatpak support, open your Terminal application and execute the following command:

      sudo apt install flatpak

That’s all it takes! With a single command, Flatpak is now installed on your Ubuntu 24.04 system. Simple, right?

Adding the FlatHub Repository

While Flatpak is installed, for a better user experience, we need to add a repository that the flatpak command can use to search, install, update, and manage Flatpak packages. FlatHub is the main repository in the Linux ecosystem, providing thousands of ready-to-install Flatpak applications.

To add FlatHub to your Ubuntu 24.04 system, run the following command:

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

You will be prompted for your password. Once you enter it, FlatHub will be added!

Before proceeding to the next step, it’s recommended to restart your system. This ensures that the icons of the Flatpak applications you install later will appear in the Ubuntu Dash. Restarting is required for the system to reload certain filesystem paths.

Installing Flatpak Apps on Ubuntu 24.04 LTS

There are three ways to install Flatpak applications:

  1. Through the Browser

This is the easiest method:

- Open your web browser and visit flathub.org. 

- Use the search box to find the app you want, for example, Spotify, and press "Enter". 

- On the search results page, click the app you want to install. 

- On the app page, click the downward arrow next to the "Install" button. 

- Copy the "flatpak install…" line from the modal window that appears. 

- Open your Terminal application, paste the copied line, and execute the command.

For example:

      flatpak install flathub com.spotify.Client

Now, open your application list, launch the newly installed Spotify, and enjoy!

You can also run a Flatpak application directly using the command line. The installation instructions usually include a "Run" section that shows how to start the application. For example:

      flatpak run com.spotify.Client

However, launching the application from the graphical application launcher is usually easier and more convenient.

  1. By Downloading a ".flatpakref" File

Another way to install Flatpak applications is by downloading the ".flatpakref" installation file. This file contains the metadata and information required to install a specific application.

To install an app through a ".flatpakref" file:

- Visit flathub.org, search for the desired application, and click the "Install" button. 

- The ".flatpakref" file will be downloaded automatically. 

- Open your Terminal application and run the following command, replacing "com.spotify.Client.flatpakref" with the name of the downloaded ".flatpakref" file

      flatpak install ./Downloads/com.spotify.Client.flatpakref
   
  1. Using Only the Command Line

This last method only uses the command line, making it the fastest option by avoiding convoluted processes like downloading files or copying and pasting commands.

- Open your terminal, type "flatpak search" followed by the name of the application you want to install. 

- Copy the application ID displayed in the "Application ID" column. 

- Run the following command, replacing "com.spotify.Client" with the copied application ID:

      flatpak install com.spotify.Client
    

Basic Flatpak Commands

Flatpak provides a range of commands to help you manage your applications. Here are some key commands:

Searching for Applications:
    
      flatpak search [application-name]
   
Installing Flatpaks:
    
      flatpak install [application-id]
    
Listing Installed Flatpaks:
    
      flatpak list
    
Updating Flatpaks:
    
      flatpak update
    
Running a Flatpak Application:
    
      flatpak run [application-id]
   
Uninstalling a Flatpak:
   
      flatpak uninstall [application-id]
    
Information about a Flatpak:
   
      flatpak info [application-id]

Conclusion

This guide has shown you how to add Flatpak support to your Ubuntu 24.04 LTS system and start installing applications quickly and easily, taking advantage of the various options offered by the Flatpak ecosystem.

Once you’re comfortable with Flatpak, consider installing the Flatseal application. This application provides detailed information about the permissions of your Flatpak applications through a user-friendly graphical interface, enhancing the security of your Linux system.

For further assistance or information, visit the official Flatpak documentation. Thanks for your time! If you have any questions, feel free to leave a comment below.

source: emka.web.id

0 comments:

Post a Comment