Benefit of Flatpak?

If Snap is already incorporated in Ubuntu and Ubuntu official flavors why use Flakpak.

What advantage does Flatpak offer over Snap.

I use Snap and have no complaints with the default Snaps.

Thanks in advance.

2 Likes

Moderator Note:

Flatpak vs Snap is a common cause of tedious argument.

Reminder that the Ubuntu Code of Conduct says…

  • Discussion should be positive.
  • Different opinions should be respected.
  • Folks should be held accountable for their words.

So leave those flamethrowers firmly turned off before typing a thoughtful, factual, helpful reply to an honest question.

2 Likes

The main benefits of using Flatpak are that they run software with it’s dependencies inside a container which has limited access to system files and settings depending on the permissions set within Flatseal. It is also supported across different distrobutions which do have it setup by default.

https://flathub.org/setup/Ubuntu

Aren’t Snaps similar.

Snaps also have it’s dependencies inside a container with limited access to system files and settings.

Snap is also supported across different distributions although may have to be installed.

1 Like

I am confused as to which way to install software. It is after the fact, and I think I have possibly installed software 6 different ways now, and nobody here seems to want to support any of them, nor talk about how I might have arrived at this point. I thought I was just doing what instructions told me to do, and it was all working for the most part until now. Most recently, I went to check one, and it said the version of Gnome I was on is not supported any longer. Yet, the version of Gnome I am on is allegedly the one that came with the system. Fortunately I was able to uninstall that particular “flatpak” (whatever that is), and the problem went away for now.

It seems there are different groups of people who like different ways to install things, and nobody seems to come to any sort of agreement or conclusive/inclusive way of dealing with this stuff. So far, I have found the following:

  1. flatpak
  2. debian
  3. snap
  4. pip
  5. unzip and install
  6. use Wine to install with Windows

All of these seemed convincing enough at the time to do it that way, and I thought they were all compatible and OK to do. Did I do something wrong here, by following the advice of someone offering software that should run on Ubuntu Linux?

Perhaps this post from Alan Pope will help you understand better:
https://discourse.ubuntu.com/t/which-is-your-favorite-application-installation-method/64109/4

Here is what I have learned from my experience and can pass on.

  1. only install from the official Ubuntu repositories
  2. most default snaps work just fine
  3. there is nothing wrong with playing around and learning about different package install methods or different package managers. Just be aware of the risks for breakage.

My top recommendation is if you want to test new software packages do it in a virtual machine or on a test machine first.

If something goes wrong you can just delete and start over.

5 Likes

Agreed never had any issues using the official Ubuntu repositories.

That has been my experience with default Snaps.

Actually Snaps have improved in the latest releases.

2 Likes

I thought all of these methods ARE “official”. Are they not?

OK. Shouldn’t they?
Most all of the programs I installed SEEM to work just fine. The only issue I’ve seen recently is a botched driver install, trying to get a WiFi driver working. All other methods of installation seemed to work OK

1 Like

I don’t recall ANY OF THEM saying there is a “risk for breakage”.

Oddly enough, I have not seen this suggested in ANY of the methods of installation. Are they that confident in themselves?

That said, do you have instructions on how to do this?

WiFi drivers can sometimes be problematic depending on the WiFi adapter.

Certain WiFi adapters just don’t work well with Linux.

Blame the hardware manufactures for not providing Linux drivers for their hardware.

1 Like

That is a whole other post. See my trials and tribulations in:

I ended up sending back 2 different adapters, and getting one of the recommended ones. Still not using the full 300Mb/s speed that Charter/Spectrum offers, but it is closer to 100 than to 30, which it was previously.

I’m supposed to get up to 300Mbs up and down doesn’t mean I do.

A lot depends on time of day / night I’m on how many other folks on the same node I’m connected to.

I’ve never seen any WiFi running at much above 108 Mbs leastwise not the ones in my house.

Have you had your internet service provider come out and check the speed might be some equipment that needs to be updated or changed out.

1 Like

Ubuntu builds the whole distribution out of Debian packages since day one, so this is obviously the main packaging format for the distribution…

In 2014 we released the first snap packages which were developed as a new package format for sandboxed applications you can update independently from the host distribution… They were originally developed as a successor of the then used “click” packages we had designed for the Ubuntu Phone, though with the focus on allowing you to ship non desktop apps too (click packages were pretty much identical to what flatpak became later)… In 2015 you could buy the first Dell IoT gateways pre-installed with UbuntuCore (the completely snap based OS)

So snap packages were and are developed very closely tied into Ubuntu and the ecosystem is completely supported by Canonical…

So the above are the two “native” package formats used in Ubuntu with the best integration into the system…

Flatpak is a format mainly developed by RedHat to deliver desktop-only applications, to me as Ubuntu developer it always felt like RedHat’s reaction to the existing snap package format to avoid having to contribute to snap packages… Flatpak was first announced in 2016 …

While snap as well as flatpak offer sandboxed applications, the locking down of the sandbox is mandatory in snaps and optional in flatpak, so you will oftentimes find flatpak packages that are not actually locked down and you as end-user will have to take care for the security by using a tool called flatseal…

Flatpak is not supported by default or in any form integrated into the Ubuntu distro but you can at any point in time indeed install it to use flatpak packaged applications…

Pip is not actually a packaging format but similar to CPAN it is a delivery mechanism for certain modules of a programming language (python in this case (while CPAN is the equivalent for the perl language)) and mainly used by programmers to pull in the right modules when creating an application… Some programmers abuse pip/CPAN as an actual application delivery mechanism but it is clearly not designed as such…

Zip or tarball are simple archive formats but both have zero integration with any OS usually (except for slackware perhaps which was actually built with very specific tarballs as it’s original package format)

Wine just tries to emulate a Windows environment via hacked up libraries (that in turn emulate windows system calls on top of the Linux kernel) so that you can install some windows apps on a Linux system, but since this is a rather hackish approach it varies a lot by application if it works or not… And indeed wine applications are not really integrated in Ubuntu either…

Indeed it is up to you what formats you pick to install on your machine, that’s the freedom of running a Linux system, but some of these formats are better supported than others depending on what distribution you pick, Ubuntu is clearly focused on deb and snap packages by default, using any other formats is up to you but your mileage may vary regarding integration, compatibility and support…

There are other distros that are built with different support options either based on technical reasons or even on politics or company goals of the distributor…

3 Likes

Excellent write.

Thanks.

It’s a matter of personal preference, unless you have a situation where flatpak offers something that’s unavailable in the official repositories or in snap.

Here’s a real world example: A few years ago, there was a bug in Gedit that affected not many people, but it affected me. I needed a later version than was in the standard repositories. Unfortunately, the snap version is heavily restricted in its sandbox, so it only lets me edit files within ~/Documents. I can’t edit files anywhere else — not ~/bin, ~/.ssh, /etc/fstab (with sudoedit), files on external drives, etc. My request to allow “classic” installation has been left unactioned.

Thus, I had no choice but to find something else. The easiest option by far was flatpak.

If you have no specific reason to choose one over the other, it’s easiest (and probably safest) to use the default, which is snap when available, or the standard repositories.

Comparing repositories: Some packages are available only in snap (e.g. Acrobat Reader DC); some only in flatpak (e.g. Bottles); some only in the standard repositories (e.g. KDE Partition Manager). Some packages are available in two or all three of them.

By and large, snap and flatpak are more up-to-date than the standard repositories.