Bonum Certa Men Certa

What are Flatpaks and How Do They Help on a GNU/Linux Distribution Such as Debian? Why Are They Better Than Snaps?

Guest post by Ryan, reprinted with permission from the original

Flatpak picture



Every GNU/Linux distribution has a “native” package manager system.



In Debian-family distributions, this has normally been Debian Packages. (Although, arguably, Snap may eventually replace it in Ubuntu.)



These DEB files, managed by dpkg, are in turn managed overall by the Advanced Packaging Tool, or Apt, which tracks dependent libraries and programs of what the user is trying to install, and which offers to clean up orphaned packages when nothing is left that requires them.



"One thing that these different systems have in common is they’re basically incompatible with each other, even when it’s the same package management system on each distribution."In Red Hat distributions, these are RPM files, managed by…well, RPM, which in turn is now managed overall with dependency tracking and orphan cleanup by DNF (still called YUM in Red Hat Enterprise Linux, but it’s DNF now in RHEL 8).



One thing that these different systems have in common is they’re basically incompatible with each other, even when it’s the same package management system on each distribution. If you install an Ubuntu package or software repo in Debian, you’ll probably break Debian, and vice versa, and the same holds true with Fedora, OpenSUSE, and Mageia, even though they all use RPM.



Sometimes you can get away with it, or the author has taken into account that he or she needs to set the stuff in a place where it won’t collide with anything from such a distribution, and you have “universal” RPMs or DEBs that you can install locally, but this is also a pain because it’s not guaranteed to work.



Enter Flatpak.



Flatpak, formerly called xdg-app, is a “universal” package system for GNU/Linux distributions, where developers can write a program, build it once, and deploy it to users of multiple, otherwise quite incompatible GNU/Linux distributions, and it works. Why? They’re fairly self-sufficient in “containers”, and while they have dependencies, they can satisfy them by bringing in those other Flatpaks which contain the foundations the program needs.



In fact, when most people (including me) first see the disk space calculation to install a Flatpak app, they freak out because it’s misleading. It looks like they’re gigantic, but they’re really not that bad. First of all, the more of them you install, the more dependencies you’re going to get, and eventually the next programs you get will need less and less that you don’t already have.



Then, there’s the fact that the containers are compressed.



They install very quickly, and I’ve been messing around and have converted several of the applications I use to Flatpak format and I’m finding the system quite fast. There actually is not much in the way of “install” because it just puts them where it puts them and that’s basically it.



Applications default to being installed for all users on the system, but can be installed for a particular user. Although for the sake of efficiency, you probably want system-wide installations.



Every once in a while, you should run flatpak uninstall –unused to remove orphans, but in my case there are none at the moment.



How does this help a desktop user?



Well, it helps in a few ways.



"...Flatpak lets you have your Debian cake and eat it too."You get software a lot faster than a distribution is going to package it, at least if you use a Debian or Enterprise or Long Term Support distribution, where the packages available in the native format can go stale rather fast.



On a system like Fedora, where applications are packaged rapidly from upstream, or a rolling release like Manjaro or Arch, or even a 6 month release of Ubuntu, this may not be as important, but these systems exact a toll on the user by forcing them to stop and deal with problems along the way, including in the core OS, the desktop environment, etc. All of which is essentially super stable and maintained with security and bug patches in a longer-lived distribution.



In other words, Flatpak lets you have your Debian cake and eat it too.



When I was a Fedora user, I used to spit and curse all the time when they brought in some new kernel that did more harm than good. They always do more harm than good once your computer works well enough that you’d be better parking yourself on a LTS Linux kernel. (These special kernels are maintained for years by various stakeholders and get hundreds of stabilizing releases, and a little new hardware support if it won’t risk rocking the boat too much.) Other parts of the system could be brought in by Fedora that do something terrible.



Once, they brought in a new build of the 32-bit x86 libc that contained “optimizations” that turned out to brick some of my Steam games and I had to wait for them to revert it. When they’re just bringing in new junk all the time and pimping your ride, you just never know what will happen next. It’s barely tested. In fact, you are the tester.



Then, a while later, they brought in a Linux kernel where Intel tried closing a minor security problem in the graphics driver by disabling its power management, thereby causing my Skylake U-based Yoga 900-ISK2 (which was basically a SoC architecture design) to consume twice as much power. All of a sudden, my usual 6-8 hours away from the wall became 2 or 3, and I had to back out that kernel and go to an older kernel _and_ version-lock it.



By the time Intel “fixed” the power mess, by giving up on fixing the security issue (LOL), my computer had over 160 unpatched security vulnerabilities before I could upgrade the kernel again.



"It used to be that Fedora was more hit or miss, and now it’s just some janky semi-rolling crap that IBM hardly even cares about."

Now I can just strap some Flatpaks onto Debian 11 and let Debian worry about keeping the underlying system nice and stable, and my computer working properly, and if there is a failure in one of my Flatpak apps, at least it doesn’t spill out and ruin the entire OS like a bad OS update could.



It used to be that Fedora was more hit or miss, and now it’s just some janky semi-rolling crap that IBM hardly even cares about.



Flatpak also gets around distribution packaging policies that you don’t agree with.



Debian has their “Free Software Guidelines” and for the most part, this helps us because they’re not spamming proprietary software, but sometimes you want a program like SNES9x, which Debian considers non-Free because it has source available, you can redistribute it with modifications, but you can’t use it for commercial purposes.



In other words, you don’t care. Why would you care if a company can make a product with SNES9x? You just want to load ROM files in it and play Super Nintendo games.



Flatpak has it. Honey Badger don’t care about no commercial use on an SNES emulator.



There’s also a potential security upside with Flatpak applications.



Thanks to sandboxing and a permissions system, they might be safer than non-Flatpak applications, especially if they have to handle untrusted data from the Internet, or run media codecs, which are notoriously insecure.



Web browsers and VLC are in Flatpak format.



Flatpak is the end of dependency hell, system file stomping from third party repos, and many other kinds of problems.



When you add third party repositories to your distribution’s package manager, and that person doesn’t take care to get along with the OS and not overwrite any of its files, or you install multiple such repositories, you can end up in big trouble really fast.



In fact, OpenSUSE used to encourage the user to set up multiple such repositories to get extra software, and then the system was immediately broken at setup with food fights over which version of what package to install, which broke this or that, and then broke the package manager and then the OS was ruined.



Although that was an extreme example. Most distributions are smart enough not to do this. Stupid krauts.



How is the system integration?



Usually pretty good. I noticed that Debian doesn’t install the Adwaita-Qt theme or set the environment variable to make sure Qt applications look close to native on your GNOME desktop, especially if you use dark themes. I love dark themes.



"...you may hit minor bumps here and there, but overall they integrate pretty well with the system."You can either set up Adwaita-Qt, or you can let Flatpak handle your Qt or KDE apps, like VLC (Qt) and Krita (KDE). Normally, APT would just bring in a ton of stuff from Qt and KDE and then maybe it does a good job tracking and getting rid of it if nothing needs it, and maybe it doesn’t.



I tweak my GNOME settings to work better as a more traditional desktop, and to look more “correct” for an American PC user, and to blow away some of the settings that I’ve always hated, like middle click paste.



While I was messing around with Flatpak Firefox, I noticed it was middle click pasting. Well, this is a problem because I enable autoscroll in about:config, and so every time I’d hit scroll, it would paste random crap into a blog post or something, so I had to go back into about:config and find a setting to disable middle click paste. The Firefox ESR from Debian respects your system settings.



So you may hit minor bumps here and there, but overall they integrate pretty well with the system.



How do Flatpaks compare with Snap from Ubuntu?



I hate Snap, and that won’t change. I think they implemented it poorly.



It requires a system service that takes hundreds of MB of RAM to manage the software images. Flatpak doesn’t.



When I tried using Snap on Ubuntu, there were many Snaps that just didn’t work at all, and one of them was GZDoom, which I have installed on Debian 11 as a Flatpak, and which works fine.



Snaps require AppArmor, which Debian has since version 10 (but not all distributions do!), or else there’s no sandbox at all, Flatpaks have their own sandbox methods. Snaps are bigger and don’t integrate as well with system settings. Flatpak is Free Software on the client _and_ server side, but Snap is totally proprietary on the server side and only Canonical can run a Snap store.



Canonical claims that Snaps are universal “Linux” programs, but it doesn’t really work properly on other distributions, and most of them have rebuked Snap in forceful language and purged it from their distribution completely, including the Ubuntu-based Mint and Fedora.



Microsoft loves Snap. Of course, when they packaged a DEB, they clobbered Debian system files with it, so when they’re too $%#$ing stupid to package an application and they love Snap, you should know to run. Hell, they screw up their own OS all the time with bad updates.



So I hope this encourages some interest in Flatpak.



I think it’s a really neat and exciting software management system that compliments the usability of a very stable and long-lived distribution such as Debian.

Recent Techrights' Posts

Alyssa Rosenzweig's LibrePlanet Talk About Freeing the Apple GPU
Alyssa Rosenzweig is the graphics witch behind the reverse-engineered drivers for the Apple GPU. She previously led Panfrost, the free drivers for Arm Mali GPUs powering devices like the Pinebook Pro. She graduated in 2023 with a Computer Science degree from the University of Toronto and now writes free software full-time.
Links 30/06/2024: LLMs Under Fire and Dictatorship of the Old
Links for the day
[Meme] Walking Outside the Guardrails of the Walled Gardens Built by Monopolies
So-called "advertiser-unfriendly" material was never a problem for Wikileaks
This War Crime Footage, Nothing Political Per Se, Is What They Made Julian Assange Plead Guilty To (War Criminals Not Convicted, Only Those Who Expose Them)
Wikileaks' Julian Assange: Exposing the US Military Crimes
20 Years Passed, Let's Go Even Faster Now
We are hoping to bring more original stories
Windows Lost Almost 92% Market Share in Egypt
From over 99% to just over 7%
 
A Crisis of Online Journalism
Almost a week ago a journalist was forced to plead guilty for an act of journalism
Germany One of Many Countries Where Microsoft's Bing Lost Market Share After All That LLM Nonsense (Bing Chat and Further Rebrands/Renames)
openai.com traffic plunged 60% last month
Microsoft’s Latest Antitrust Scrutiny
4 new stories
Microsoft Layoffs, Mass Plagiarism, and More
outrage included
GNU/Linux Climbed 0.25% This Month (in statCounter)
Around midday on Tuesday we'll start seeing preliminary data for July
Ilya Gulko Introduces Pollyanna
"Pollyanna is a web framework that makes it easy to create your own libre social space, such as a social network or blog."
'FSFE': Underage Labour, GAFAM Fronting, and Identity Theft to Undermine the FSF's Current Fundraiser
looking to raise funds at the same time as the FSF
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, June 29, 2024
IRC logs for Saturday, June 29, 2024
Links 29/06/2024: Astronauts at Risk, Ukraine Updates
Links for the day
Fedora and Red Hat Leftovers
mostly redhat.com
Microsoft is Now Googlebombing or Spamming 'Open Source' and 'Linux' to Promote Proprietary Surveillance, Azure
Notice the title and the image, what's being promoted etc.
Seychelles: GNU/Linux Doing OK
Seychelles cannot be considered poor
Gemini Protocol Isn't Even Remotely "Dead"
"Lupa knows of 505,000 (half a million!) working Gemini URLs at present, up from about 425,000 this time last year"
About 10 New Free Software Foundation (FSF) Members Per Day
The total changed from 46 to 47 while typing the article
Vista 11 Adoption Unusually Low in Germany and It's Going Down, Not Up
This is not happening only in Germany
Kevin Korte on Computers Being Allowed to Make Decisions Based on Cryptic Algorithms and Proprietary/Secret Data
It uses buzzwords where none are needed
[Meme] Garbage In, Garbage Out (linuxsecurity.com)
It is neither Linux nor security, just chatbot-generated slop
Microsoft-Invaded CISA Spreads Anti-Free Software FUD (as If Proprietary Software Has No Memory Safety Issues), Brittany Day Uses Chatbots to Amplify and Permutate the Microsoft FUD
linuxsecurity.com became an anti-Linux spam site
Microsoft Laying Off Staff in an Act of Retaliation and Union-Busting
retaliatory layoffs at Microsoft
Gemini Links 29/06/2024: Content Drowning in 'Goo' and LLM Slop
Links for the day
In Ecuador, GNU/Linux Adoption Surged From Under 1% to Over 4% in About 3 Years
Not even counting Chromebooks
LibrePlanet: Cultivating Backups (of Recordings)
an appeal to recover some of these talks
Microsoft/Windows Machines Are Turned Off (or Windows Deleted/Decommissioned) in Web Servers, as the "Market Share" Collapse Continues
Taking full history into account, this is a decrease of over 90% in some cases
Corwin Brust Hosting Freedom: A Behind-the-scenes Tour With the GNU Savannah Hackers
"the "smiling faces" behind it."
Android at 90% or More in Chad
Windows below 2%
David Wilson: Cultivating a Welcoming Free Software Community That Lasts
"a feeling of shared ownership for all users."
Julian Assange Might Continue Wikileaks, But Certainly Not Yet (Recovery Time Needed)
And probably at a symbolic capacity only
Bringing in 12 Santas and Taking 13 Out (Old Interview With Julian Assange)
Julian Assange's life inside the Ecuadorian embassy
Neil Plotnick on GNU/Linux in the High School Classroom
uploaded to the LibrePlanet instance of MediaGoblin
Asia Appears to be Fastest to Adopt GNU/Linux
the home of a considerable majority of the world's population
Alexandre Oliva's LibrePlanet 2024 Talk About "Software Enshittification"
in spite of technical difficulties encountered while recording
What They Used to Do With Mono They Now Do With Systemd (Lower and Deeper Down Than Userspace)
Now we have a project started primarily by Red Hat (and managed by Microsoft GitHub, which is proprietary) being managed by Microsoft and primarily serving Microsoft and IBM
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, June 28, 2024
IRC logs for Friday, June 28, 2024
Links 28/06/2024: Kangaroo Courts and Patents Spam, EFF Still Fighting for CPC's TikTok (a Digital Weapon)
Links for the day
Links 28/06/2024: Overton window and Polarization
Links for the day
[Meme] In 50 Years...
Microsoft's Vista 11 will take 50 years to be fully adopted
Only About 1 in 8 Russian Windows Users is Using Vista 11
it looks like over the past 12 months Vista 11 hardly grew and it remains very low at around 12% of Windows usage in Russia
Links 28/06/2024: More Attacks on the Press, More Censorship in Russia
Links for the day
Gemini Links 28/06/2024: Christmas Prematurely, Self-hosting
Links for the day
IBM: So Long, Suckers. Your Free OS is Now Proprietary. Pay IBM or Else.
almost exactly a year after turning RHEL into proprietary software
Vista 11 is Doomed and Despite Lack of Adoption Microsoft Already Speaks of Vapourware ("12")
"Microsoft has pulled a Windows 11 update after users reported boot loops and startup failures."
ChromeOS Reaches Highest Share in Years at the World's Most Populous Nation, Windows Now at All-Time Low of 13%
We're talking about India today
[Video] "It Is Incredible That Julian Assange Survives"
There was a positive and mutual relationship between Wikileaks and Dr Jill Stein
Never Assume That Because the Law Exists the Powerful Will Follow the Law
Who's going to hold them accountable now?
Nearly a Month Has Passed and Nobody at the Debian Project Even Attempted to Explain What Seems Like Back-dooring of Debian (and Hundreds of Distros That Are Debian-Derived)
I can cynically guess that only matters when a user with a Chinese name does it
[Video] Julian Assange Explains Wikileaks' Logistics
predating indefinite detention
IBM Was Never the "Good Guy", Just a Self-Serving and Opportunistic Money- and Power-Hungry Monopolist, Living Off of Taxpayers' Money (Government Contracts)
The Nazi Party of Germany was its second-biggest client at one point and now it's looking to profit from the work of slaves
"I Hated Working at IBM. They Were the Most Unfriendly People."
Don't forget what Watson the son did to a poor woman on a plane
State of the News (and Depletion of Journalism Online, Not Just Offline)
Newspapers are not coming back and the Web is not coming back either
GNU/Linux Consolidates in North America
Android rising a lot this year, too
[Meme] More Monopolies Granted While Patent Examiners Die (Overworking for Less Compensation)
Work more; Get less
Staff Union of the EPO (SUEPO) is Taking the New Pension Scheme (NPS) to an International Tribunal (ILOAT)
SUEPO wants more EPO staff to participate in collective action
Stella Assange and the Legal Team Speak to the Media a Day After WikiLeaks Founder Julian Assange Arrives in Australia
Published yesterday by a number of mainstream publishers
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, June 27, 2024
IRC logs for Thursday, June 27, 2024
RIP Daniel Bristot de Oliveira, Red Hat death
Reprinted with permission from Daniel Pocock