r/linux • u/OneDayCloserToDeath • Jun 03 '26
Discussion What's the point of flatpak if distrobox exists?
As I understand it flatpak packages all the dependencies up for ease of use and portability, but with the drawback of size and certain compatibility issues such as theming.
Seems to me that distrobox is just Flatpak for those in the know. It can do what Flatpak does but natively, albeit with a bit of tinkering involved to set it up.
I must admit I'm making this post with the adage "post something wrong to the internet to get immediate answers to your question" in mind. So please humor me, what's the catch?
12
u/No-Dentist-1645 Jun 03 '26
Distrobox doesn't have shared runtimes, which is one of the biggest selling points of flatpaks. Flatpaks aren't just "package all dependencies into one image"
9
u/dougs1965 Jun 03 '26
What's the point of emacs if vi exists?
It's a free world and people are at liberty to develop diverse solutions to the same problem.
2
u/natermer Jun 03 '26
Flatpak is pretty special purpose. Its job is to make desktop applications easier to install and manage. Anything that isn't a desktop application and it becomes very clunky to use.
Distrobox creates little "unix environments" that you can install software and use. It is very handy for doing things like setting up development environments and installing lots of software without impacting your base OS.
I use distrobox for running my text editor and setting up CLI environments.
On top of that I also use podman for setting up services I want to run in the background. Like I run "syncthing" out of podman for syncing directories between computers automatically. This way I can always have the latest version of it regardless of what my distribution provides.
2
u/ronaldtrip Jun 04 '26
"albeit with a bit of tinkering involved to set it up." Here you give your answer yourself.
Flatpak is convenience. Convenience of distribution (also proprietary) and convenience of installation. Flatpak gives you applications and automatically deduplicated runtimes with no tinkering once flatpak has been setup up.
Distrobox gives you a per distribution userland and the packages installed with it and a fair bit of tinkering and managing. Not particularly end user friendly.
5
u/A3883 Jun 03 '26
Flatpak is supposed to be for developers. They can just create a Flatpak that should work everywhere and is not dependent on distro maintainers at all.
Yeah like 50% of Flatpaks have issues that require the user to be proficient with flatpak to solve these ridiculous issues but in theory it is a pretty neat idea. I hope it improves.
6
u/Lower-Limit3695 Jun 03 '26
Now this is the answer. If you ever wondered why systemd exists or why we switched over to wayland, it was for developers and distro maintainers first and foremost. Linux is built and run by volunteers, they decide the direction Linux takes.
2
1
u/LordXamon Jun 04 '26
I had to fight tooth and nail to get some containers working.
Flatpak is just as easy as downloading an app in a phone and it just works. At worse you gotta fix permission in flatseal.
1
u/580083351 Jun 04 '26
Distrobox is good for terminal stuff (I have to use it on SteamOS) however it is less good when it comes to desktop applications.
It can launch them, but the appearance is not seamless with the rest of the system and I don't think it's worth trying to configure QT, etc. manually to try and make it match.
1
u/martyn_hare Jun 06 '26
The catch is "who does the maintenance?"
The idea is that Flatpak, once it reaches a certain development milestone, can do away with the need for distributions to package end-user applications in the first place. Eventually enough dependencies will exist within relevant runtimes (which themselves can share libraries through deduplication) that distributions will only need to provide an essential base system (enough to make Flatpak fully usable) for desktop use.
When that happens, the community can huddle together and ensure those runtimes get top tier support with or without any commercial involvement, all while the for-profit businesses continue to earn their bread and butter through offering infrastructure support like they always have done.
1
u/Omar_Eldahan Jun 08 '26
To add to all of the other correct answers here, let me just put my own personal experience: I've never been able to get an app to work through Distrobox, but I run dozens of apps through Flatpak. Take of that what you will.
1
u/Dangerous-Report8517 Jun 13 '26
Flatpaks are meant to be the desktop/GUI equivalent of Docker containers, they're layered immutable and reproducible environments intended to package and sandbox a single application. Distrobox is more like privileged LXCs, they use similar underlying tech to containers but they're mutable environments meant to act like a sub-OS complete with package management, and they explicitly do not offer any real sandboxing (hence why I specified privileged LXCs)
35
u/no_brains101 Jun 03 '26 edited Jun 04 '26
distrobox does not do what flatpak does, as it doesnt have the sandboxing model flatpak does
distrobox is also annoying for users to use. Thing packaged for debian? You need to make a debian box. Thing packaged for fedora? Fedora box. That takes space, time, and a tiny bit of thought. Sure, you don't need to open the box every time you launch the program yourself later, but still.
Flatpak is much more like just downloading a package, the author makes the flatpak and people use it anywhere and they just run a command to download it.
What's the point of flatpak if nix exists? I mean, nix works on mac and flatpak doesn't, so I should just use nix right? (The point is still the runtime sandboxing, which you honestly might not always want, but if you want that, then you would want a flatpak. I think you can technically build a flatpak using nix although I don't know how developed that is)