flatpak – Linux Hint https://linuxhint.com Exploring and Master Linux Ecosystem Mon, 01 Mar 2021 00:18:04 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.2 How to Install Flatpak, Snap and AppImage Apps in Linux https://linuxhint.com/install-flatpak-snap-appimage-apps-linux/ Sun, 14 Feb 2021 04:20:54 +0000 https://linuxhint.com/?p=89863 This article will explain how to install, remove and manage Flatpak, Snap and AppImage packages in Linux. These three packaging formats have been in development for the last few years and they provide distribution agnostic packages that can be installed on all major Linux distributions. A detailed comparison between these packaging formats is available here.

Installing and Managing Flatpak Packages

If you are using Ubuntu, its derivatives or other Linux distributions based on Ubuntu, you can run the following two commands to setup Flatpak packages:

$ sudo apt install flatpak

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

The second command adds the official Flathub repository that can be used to download and install Flatpak apps. It is possible to add other third party repositories by replacing the repository URL in the second command above. However, in general, you should stick to the default repository to avoid installing untested apps that may have security issues.

If you are using any other Linux distribution, follow this quick setup guide that covers installation instructions for over 25 Linux distributions.

Once you have completed Flatpak setup, you can go to the Flathub store to download any app of your choice. For instance, to install the Firefox Flatpak package, you can visit its listing on the Flathub store or search for it using the search bar on the Flathub website. Every listing on the Flathub page includes an installation command at the bottom of the page. You need to run this command in the terminal to install the package. Note that the command is the same for all Linux distributions. For the quoted case, you need to run the following command to install the Firefox flatpak package:

$ flatpak install flathub org.mozilla.firefox

Note that while installing a Flatpak package, you may be asked to install additional packages and dependencies. This is normal as Flatpak packages install necessary packages and libraries as needed.

To remove an installed Flatpak package, you need to run the following command (replace ID of the package):

$ flatpak uninstall org.mozilla.firefox

If you don’t remember the ID of the package, you can get it from the Flathub store listing page. Flatpak will also show you app suggestions if you only supply a partial name or ID. For instance, if you just use “firefox” in the above command, Flatpak will automatically present you with a choice to remove the Firefox package.

To update an installed Flatpak package, you need to run the following command (replace ID of the package):

$ flatpak update org.mozilla.firefox

To list all Flatpak packages installed on your Linux system, use the following command:

$ flatpak list

Many Linux distributions use Flatpak plugin in their software distribution app to facilitate easier installation and automatic updates. For more information on Flatpak usage, run the following two commands:

$ flatpak --help

$ man flatpak

Installing and Managing Snap Packages

Ubuntu, its derivatives and most other Linux distributions based on Ubuntu come with Snap support enabled by default. You can search for snap packages in the GUI software center app as well as install them from the command line. Snap packages can be searched on the Snap Store website as well. Every listing in the snap store shows a command to install the listed app.

To add Snap support to other Linux distributions, you may need to install the “snapd” package first (similar to the Flatpak setup explained above). Follow the snapd setup guide available here for over 25 Linux distributions.

Once you have finished installing snapd, visit any listing on Snap store and run the specified command listed on the page. For instance, to install Android Studio Snap, you will need to run the following command:

$ sudo snap install android-studio --classic

To remove a Snap package, use the following command (replace application name as needed):

$ sudo snap remove android-studio

To list all Snap packages installed on your system, use the following command:

$ snap list

Note that you cannot disable snap updates. They are automatically installed on your system at periodic intervals. You can however, reschedule them or temporarily hold updates. A detailed guide on managing Snap updates is available here.

To learn more about Snap packages, run the following two commands:

$ snap --help

$ man snap

Installing and Managing AppImage Packages

AppImage packages work similar to portable “exe” files you may have used on Windows. All you need to do is download an AppImage file and mark it executable to run the app. To make an AppImage file executable, run a command in the following format:

$ chmod +x file.appimage

Once marked executable, double click on the executable AppImage file to launch the app. To remove an AppImage file, simply delete it from your hard drive storage.

Similar to Flatpak and Snap, an AppImage store is also available. However, unlike Snap and Flatpak, developers who distribute their apps in AppImage format don’t often list them in this centralized store. AppImage files are mostly distributed through source code repositories or from application websites.

In some cases, AppImage files may prompt you to create a launcher that appears in application menus and on desktop as a shortcut. If you have opted to create a launcher, you may want to remove it after deleting an AppImage file. To do so, just visit the location specified below and delete the associated “.desktop” file.

$HOME/.local/share/applications/

Conclusion

Flatpak, Snap and AppImage packages have provided novel ways to distribute applications across all major Linux distributions. They provide better security and make it easier for developers to distribute their apps. These new package formats are the future of Linux application packaging, especially for non-system third party apps.

]]>
Install and Use Flatpak on Linux Mint https://linuxhint.com/flatpak_linux_mint/ Mon, 04 Feb 2019 14:36:22 +0000 https://linuxhint.com/?p=36170 In the case of the Linux world, there are so many things going on at the same time that things can become pretty messy.  For example, let’s take the installation of your favorite software. Whenever you’re willing to install it, you have to make sure that the software comes up as the correct bundle/package that your system accepts and treats as installable software. Many Linux distros come up with different installable package types. For example, Debian, Ubuntu and derivatives use DEB packages whereas Fedora, OpenSUSE, CentOS and RHEL etc. use RPM.

Keeping that in mind, a number of software packages that targets the Linux platform offer source codes directly instead of providing individual binaries for each platform. That being said, building from source and installing software can become pretty troublesome in lots of cases. In fact, you may end up with a number of errors and dependency problems. That’s why installing software directly from source can be troublesome for the users.

What to do in such a situation? Well, there are a few projects that are ongoing on the Linux that offers a universal platform – installing, managing and uninstalling software as you like on all the Linux distros. No need to worry about dependencies or others.

Flatpak for Linux

Flatpak is one of the many finest Linux frameworks that offers tremendously valuable service. With all the different Linux distros preferring their own package management and installable file type, grabbing the right software can be a difficult choice for Linux users. Moreover, it also makes the work of a developer much harder as all the different distros have to be covered.

Flatpak is an effort in removing the tyranny of such messes. With one universal platform, both the software developers and the users can benefit. For example, the developer only has to maintain the software in one place without worrying about cross-distro compatibility. Users can also directly install software from one place, on all the supported Linux distros.

For the users, Flatpak automatically keeps all the installed packages up-to-date. In the case of developers, there’s no need to change the code at all for forward-compatibility.

Flatpak on Linux Mint

If you’re new to Linux, then Linux Mint is one of the best places to start. Even for professional usage, Linux Mint offers great value. It’s a mid-weight Linux distro that comes up with some of the coolest desktop environments (Cinnamon, Xfce, and MATE) for Linux.

As a popular distro, Linux Mint also offers support for Flatpak.

Now, in the case of all the “universal” app management systems, it’s necessary to have the client-side software configured. The client-side ensures that the system is ready to accept and enjoy universal packages.

Fire up a terminal and make sure that your system is already up-to-date.

sudo apt update && sudo apt upgrade -y

Install the Flatpak core –

sudo apt install flatpak

Verify the installation of Flatpak –

flatpak

Flatpak usage

Installing a package

The most basic usage of Flatpak is installing a “flatpak” universal package or uninstalling it. Note that you can get the universal “flatpak” packages directly from a developer or from the Flathub. Flathub is the place where all the official Flatpak apps are available.

For example, let’s install Slack from Flathub.

Click on “Install”. This will download a “flatpakref” file on your system.

Now, run the following command for installing the “flatpakref” –

flatpak install --from com.slack.Slack.flatpakref

You’ll be prompted to allow some actions. Most of them should be “y” (yes) unless you’re sure that you don’t need it.

List installed flatpaks

Flatpak allows you to list all the installed software directly. Just run the following command –

flatpak list

Uninstall a package

Need to uninstall software? Let the flatpak tool handle all by itself!

sudo flatpak uninstall <package_name>

Repairing flatpaks

In cases, you may end up with a corrupted installation of a package. Don’t worry; Flatpak allows you to check for any error and fix it accordingly (if needed).

sudo flatpak repair

All the available options are available on the man page of Flatpak.

man flatpak

Enjoy!

]]>
Build, Distribute & Run Sandboxed apps on Linux with Flatpak https://linuxhint.com/sandboxed-linux-flatpak/ https://linuxhint.com/sandboxed-linux-flatpak/#respond Fri, 24 Feb 2017 19:06:14 +0000 https://linuxhint-com.zk153f8d-liquidwebsites.com/?p=18259 Flatpak is the next generation technology for building and installing desktop applications. It is a system for building, distributing as well as running sandboxed desktop applications on Linux. Furthermore, the app relies on a project called bubblewrap for the lowlevel sandboxing.

Key Features

For Users

  • The list of applications is growing all the time and includes Spotify, Skype as well as Telegram.
  • New releases of applications appear sooner.
  • Unlike package managers, it can safely update applications on the fly.
  • Simultaneously install multiple versions of the same application.
  • The sandboxing technology prevents exploits as well as hinders malicious applications.

flatpak

For Developers

  • Create one app bundle as well as distribute it to the entire Linux desktop market.
  • Develop as well as test your application in an environment that’s identical to the one users have.
  • The build tools are simple and easy to use, and in addition comes with a full set of documentation.
  • The built-in runtimes provide stable sets of dependencies that can be used by applications.
  • Dependencies that aren’t in a runtime can be bundled as part of an application.
  • Runtimes are forward compatible, irrespective of distribution changes. In addition, the applications run on new Linux distribution versions as they are released.

How to install Flatpak on Ubuntu 17.04, Ubuntu 16.10

sudo add-apt-repository ppa:alexlarsson/flatpak

sudo apt-get update && sudo apt-get install flatpak

How to remove app from Ubuntu

sudo apt-get remove flatpak

Install Telegram using Flatpak

flatpak install --from https://jgrulich.fedorapeople.org/telegram/telegram.flatpakref
  • Run application
flatpak run org.telegram.TelegramDesktopDevel
  • Remove application
flatpak uninstall org.telegram.TelegramDesktopDevel

flatpak

To build as well as package an app, see documentation

]]>
https://linuxhint.com/sandboxed-linux-flatpak/feed/ 0