What is a flatpak and why should I care

This is in response to a question from @fernandomaroto in another thread . In order to keep that thread on topic I and answering here.

The advantages of using Flatpaks.

Cited from: http://docs.flatpak.org/en/latest/basic-concepts.html#sandboxes Quote:
Sandboxes
With Flatpak, each application is built and run in an isolated environment, which is called the ‘sandbox’. Each sandbox contains an application and its runtime. By default, the application can only access the contents of its sandbox. Access to user files, network, graphics sockets, subsystems on the bus and devices have to be explicitly granted. Access to other things, such as other processes, is deliberately not possible.”
End Quote

As mentioned above, flatpak applications are dependent on runtimes, which is a set of essential libraries and services. Flatpaks can and do share common runtimes. So flatpaks that share a runtime do not create redundant copies of runtimes. The structure of flatpaks and runtimes is subject to the Freedesktop standards.

Pros:
Flatpak is a distro independent method for packaging and distributing Linux software. Developers release a single flatpak and it can be universally used on any Linux system that supports flatpak.

Software that is not compatible with current system libraries will work when packaged as a Flatpak. An example of that already mentioned in the Endeavour forum is Spotify.

Since each flatpak runs in its own container, version conflicts on libraries and other dependencies are eliminated. Plus this provides better security for both the OS and user.

Delta upgrades make upgrades more efficient in the long run

Cons:
In Arch/Endeavour and most other distros, the flatpaks are not automatically updated.
In Endeavour that simply means you update as follows:
# pacman -Syu
# flatpak update

Since a flatpak runs in its own runtime, what ever theme the developer included is what you get and cannot be changed and is unaffected by the desktop theme. Not a problem for me but might be for some.

Here is what got me interested in flatpaks. In a Fedora Workstation install, all went well until I installed VLC. Then in Firefox whenever I watched a video which required the Cisco H264 codec the audio was totally borked. It turns out that Mozilla insists that it has its own internal version of H264 installed by default. Then when I installed VLC it had a dependency for the H264 codec which came from rpmfusion.org. The two H264 codecs were fighting each other. I uninstalled VLC and reinstalled it as a flatpak. Since the VLC flatpak runs in its own container, it supplied its own desired version of H264 indepenent of the rest of the OS and everyone started playing nice together again.

So I started thinking (look out world). Since the sandbox environment contains everything it needs to run, including libraries, then library and other dependency conflicts will be avoided. So I if a flatpak for a desired application is available, I started using the flatpak. It has worked out quite well for me.

I hope @Bryanpwo doesn’t mind, but since he stated it more eloquently than I can, click and see a quote from Bryan on this subject. I couldn’t have said it better myself.

Describing everything about Flatpaks is more than the scope of this thread, but there is a ton of information available on the internet.

2 Likes

hello,perso, I left windows to no longer .exe .I do not want to see him back through the window under linux form “flatpak or snap” is my opinion.

3 Likes

Flatpak has absolutely nothing to do with Windows, and it makes Linux applications more secure. Wine can make you susceptible to problems running Windows programs like you mentioned, but not so with flatpak. The flatpaks are on demand commands, meaning they only launch apps when you want them to, and it only updates flatpaks when you want to. flatpak is a command, not a service.

Snap is Canonical’s version of flatpak. It also has nothing to do with Windows. However, with snap, you install snapd to enable snap capabilites. The d at the end of snapd stands for deamon, which means you use systemctl to enable snapd to run as a socket service in the background. Snap automatically checks and updates your snap apps on a daily basis. By enabling a socket deamon you have just opened a port for Canonical or a hacker to access your computer. That is how they check for and do updates daily. Snap is not a security risk from Windows, but in my opinion snaps ability to open a socket service is a sercurity risk.

1 Like

iot is future :slight_smile: i dont mind but, it gives atleast ssome power when you cannot take things. as long you can choose as in freedom is fine for me :slight_smile:

personal, I prefer to compile a software than take a flatpak of 2 giga

1 Like

its understandable, its for me also a no go offcourse, with pkgbuild also have some power to a certain level offcourse.

Reminds me of the redundant Windows dll hell.
J.

I just installed in a VM and am installing abiword to test it. It sounds like fun :slight_smile:

People always complained about why having apt, pacman, yum etc wanting a more universal way to have use the very same package in different distros. So i like the idea about flatpak.

Looking at their repo i noticed that many of the stuff there is already present in arch repos, doesn’t mean is “useless”, only means that arch repo is awesome. :stuck_out_tongue:

The flatpak usage seems more related with personal taste (as always), when users want something very particular, or if your distro repo is small.

Did some of you test Steam? Is is capable of running windows games like wine does or just linux?

Anyway, it’s another alternative, you can use it or not, and love it or even lay all your hate on it :smile:

3 Likes

For me they are both (snap and flatpak) invalidating the idea of a rolling release, really. Plus as long as something is in the repos it is always better to install it from there (including, for me, the AUR). After all, that’s the second biggest reason to run Arch: The AUR.

I mean to each his or her own, but I only use them if there is no other way to install an app (like Spotify on Suse).

1 Like

It can always be handy, but structural it goes more to iot systems, like canonical target it. Our robot running unity has internet connection basicly it just neeed asolid to set some stuf what it need. But its handy to be there, as freedom you choose to take or not. Current braking point of communitu is, that ubuntu force snap, thats poisoness… Making snap a depency of apt. Sort kinda practice people only step away

2 Likes

In the light of the big Manjaro discussion in their community and outside: @Pudge posted this as additional info on flatpak just to inform people on a choice you can make.
EndeavourOS is never going to adopt flatpak in our system, however for people who like to use it, don’t hesitate to ask for help if you encounter problems, I’m sure fellow members (like pudge) will help you with it.

5 Likes

I have tried both snaps and flatpak. I like the idea but i’m not sold on snaps like you say. I’m not real warm and fuzzy about canonical. I think Intel is using flatpak on the clear linux project not that i favor them either. Mostly i have used flatpak because i get annoyed with spotify in the AUR always being flagged out of date and having issues installing it. What applications are you using that are flatpaks? I might decide to use it more. I thought the AUR was the greatest thing when i first started using Arch but it does have some drawbacks.

3 Likes

https://distrowatch.com/table.php?distribution=endeavour

I am not a fan of flatpak. So far the Aur has worked for me. When I have had problems I have contacted the maintainer and all was well. I have been using arch based systems since 2015.

I use the regular steam runtime from the repo. Steam now uses a thing called proton to run windows directx games. There is a setting to try it on all games not just tested ones. I recommend this setting as many of my games were not tested. It is found in settings from desktop mode and not found in big picture. Then all you have to do is try to start the game via steam and it either works or not. So far everything I have thrown at proton has worked except mods for certain games. Just have to keep them vanilla.

My steam controller works as well.

There is another project for gog, battlenet, origin, and uplay called lutris. It works to install games from those services. I haven’t tried it yet.

https://lutris.net/

There is also a third party gog launcher for gog
though I no longer have it installed as it took a little bit of tinkering to set up. The page does have install instructions for arch in the read me. As I see it gaming on linux is awesome right now and always getting better.

1 Like

well compiling isnt everyones idea of fun and it can take hours to compile software on certain hardware.
sure modern processors can compile in no time flat but older machines? a bit harder to do and infinitely more time consuming.
For me i see flat and snap as the nice middleground of pre compiled binaries and something that is easy to roll updates with.

There are also third party repos like disatrousaur that contain many AUR packages. I had a problem with the repo’s db the other day and I emailed the maintainer and it was fixed within two hours. I also have RebornOS’s repo which contains many of the same packages that Antergos had. Between those two repos I have not had to compile a package in sometime.

hello,in RebornOS, there are flatpak, more people who want flatpak there is a package on AUR: fpakman

Group of people is stil small, only if as example spotify dont build from aur’ sometimes is handy to read out te comments, as example link change… Pkg build is more natibe to your system without container is tje flatpak is basicly big wit build in depencys itonically enough people want avoid that

flatpak vs snap vs flathub??? the best?? :thinking:

Some reading material on this:

1 Like