Live data from Hacker News

Linux desktop leaders unite behind Flathub app store. Here's why

zdnet.com

21–30 of 124 posts

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#22
Flatpak is great for self contained apps, but it seems problematic when it has to reach outside the sandbox. I ran into this in VSCode and with CUDA video processing filters, but I'm sure there are more examples.

And thats what distro packages are for, I guess.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#23
post #3

Part of my issue with Flatpak is that it takes these systems that really ought to be managed separately (process isolation, package management, runtime configuration, security, etc.) and makes them one monolith. It's an ok stopgap for people frustrated with software distribution, but it tangles itself up in so much mess that it's hard to promote over it's competitors (even Snap). It's not great. Sometimes it works we…

> but when the wiccan magic inside Flatpak breaks now you have to debug two runtimes for the price of one! As a user I couldn’t care less.

Exactly.

A lot of Linux users grouse about people not wanting to use their favorite OS but they don't do it because a bunch of perfectly well built software may or may not run depending on some under-the-hood voodoo magic they don't understand and can't fix.

Flatpaks fix that. If the pack is well built, it'll work. If it's from a reputable source, it's probably well built.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#24
post #12
post #2

Because they've given up on being able to maintain a desktop distro with a set of system libraries that allow you to run programs. Future shock from the too rapidly changing underlying libs and no thought of forwards compatibility longer than 3 years means no software lasts longer than 3 years, if that. And so, like a fever is a symptom of infection, we have containers as symptom of future shock. As for which contain…

Forgive me if it seems like this question comes from a place of ignorance and misunderstanding; it probably does. Why can't we just static link everything, and distribute binaries like we're on win32?

On Win32 you don't static link everything, all OS functionality is provided through shared libraries (aka DLLs), the OS provides a ton more functionality out of the box (GUI, multimedia, input, graphics, etc) than you'd get with Linux, which while it provides strong backwards compatibility is just the kernel and practically everything else a regular desktop program uses is provided by libraries talking with it.

The big difference isn't static vs dynamic but that on Windows the DLLs that come with the OS do not break backwards compatibility so applications can rely on them whereas on Linux only a very tiny number of libraries do not break backwards compatibility (from the top of my head that'd be glibc[0], X11/Xlib/etc, curl and OpenGL). Most importantly the libraries for making a GUI application do tend to break backwards compatibility (see the breakage in Gtk1->Gtk2->Gtk3->Gtk4 and Qt1->Qt2->Qt3->Qt4->Qt5->Qt6 though with the latter being C++ they can't help it as C++ itself makes it harder with not having a stable ABI). Not all do (AFAIK Motif has been backwards compatible since the early 90s) but those that don't aren't that common (for unrelated reasons - e.g. most provide only a small fraction of the functionality Gtk/Qt provide or, in cases like Motif, the license was unpopular with FLOSS developers so no ecosystem was built around it).

[0] they do break compatibility for programs using unsupported APIs though

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#25
post #8

Earlier quoted context omitted.

What do you think about Nix

Nix is the ultimate expression of this abandonment of the concept of a desktop distro. It doesn't even try to have system libraries. Nix gives up re: future shock. The entire OS is just containers. I'm sure it works fine if you only ever use popular software but as someone that's constantly compiling and adding little .c programs from the 'net to my bin/ having to manually create and specify the entire "system" libra…

Haven't tried it but you could probably pin an env with everything you would want and then use direnv for automation. And for quick experiments there's FHS/steam-run. But yeah.. setup.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#26
post #5

What advantages does Flatpak offer over Nix? The only benefit(s) I see are: 1. Sandboxed applications (via containers?) - so applications you have don't technically have access to your home directories by default. That's sort of nice - but how many applications really warrant this overhead? 2. Possibly easier to write/package? That said, in Nix you pretty much just need to package once. I've not used Flatpak - can so…

I actively use both Nix and Flatpak, and my perspective is that they're tuned for different purposes:

- Flatpak doesn't require apps to be rebuilt when the runtime changes, whereas Nix would require a rebuild. This is, of course, an intentional selling point for Nix: you don't have to worry about keeping track of ABIs and the like. This is, however, less fun when you have to update a large amount of applications for little reason. - When using flakes, it's easy to end up with a lot of extra disk usage because of a proliferation of different nixpkgs versions. Flatpak's runtimes help avoid this, since apps target a runtime version and can run under any individual commit for that version. - Flatpak has a massive amount of internal infra for sandboxing that would take a moderate effort to reproduce elsewhere. - This also means that running Flatpaks always involves new user namespaces; this can't just use environment variables like Nix does. - Flatpak's entire setup is more tuned towards GUI applications, with support for stuff like swapping out the graphics drivers. (nixOS can ofc do this, but you need nixGL otherwise.) - Flatpak has support for downloading non-redistributable files at install time and placing them in the same location as the application's main files. - Flatpak's summaries that it downloads from the server are much smaller than nixpkgs checkouts. - Flatpak dedups individual files across apps.

Really, it's just that Flatpak prefers keeping the build process and usage simpler to focus the energy on sandboxing, leading to design decisions like the more straightforward runtime/app split (easier for a user to understand / manage) and all of the built-in extras for graphical applications. Nix has a significantly more complex UX but is infinitely more flexible and also far better suited for development environments.

If your thought is "most of this isn't structural", that wouldn't be incorrect: there is no reason that:

- building flatpaks couldn't use a more nix-like model - nix couldn't add sandboxing and summary support on top

Heck, you could probably build a Flatpak from a Nix derivation, if you figured out how to separate the "runtime" and "app" parts. But at the end of the day, every tool has some limited degree of development bandwidth, and as-is, Flatpak and Nix just optimized that bandwidth for different targets.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#27
post #17

Earlier quoted context omitted.

That exists - https://appimage.org/ .

Appimages are not statically linked at all.

While not statically linked necessarily, app images do attempt to bundle dependencies such that they “just work” as self-contained executables on most Linux distros - which is what the poster above seems to care about.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#28
post #5

What advantages does Flatpak offer over Nix? The only benefit(s) I see are: 1. Sandboxed applications (via containers?) - so applications you have don't technically have access to your home directories by default. That's sort of nice - but how many applications really warrant this overhead? 2. Possibly easier to write/package? That said, in Nix you pretty much just need to package once. I've not used Flatpak - can so…

You're listing one of the biggest reasons flatpaks was even created as the only benefit. The reason it got some attention lately is the growing interest in immutable distributions where flatpak is sold as the userspace package manger while ostree handles the root system.

There you have it. Apples and oranges.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#29
post #2

Because they've given up on being able to maintain a desktop distro with a set of system libraries that allow you to run programs. Future shock from the too rapidly changing underlying libs and no thought of forwards compatibility longer than 3 years means no software lasts longer than 3 years, if that. And so, like a fever is a symptom of infection, we have containers as symptom of future shock. As for which contain…

Once the linux world moves completely to Flatpak, that would truly help languages like C++ - whose evolution and cleanliness has been tremendously crippled by being unable to have a clean ABI break.

Re: Linux desktop leaders unite behind Flathub app store. Here's why

#30
Flatpak is great! Flathub on the other hand... The app submission process is very convoluted and the documentation is super vague.

Snap is much easier to publish and a joy to use with the dashboard and analytics. I hope Flathub improves their submission system and documentation because it's still a mystery to me.

Post reply on HN