this post was submitted on 22 Jun 2024
596 points (97.8% liked)

Linux

47231 readers
1145 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 29 points 2 months ago (31 children)

Sorry to ask, I'm not really familiar with Linux desktop nowadays: I've seen Flatpak and Flathub talked about a lot lately and it seems to be kinda a controversial topic. Anyone wanna fill me in what's all the noice about? It's some kind of cross-distro "app store" thingy?

[–] [email protected] 74 points 2 months ago* (last edited 2 months ago) (20 children)

Flatpak is a universal application packaging standard for Linux. It allows devs to create a single application that gets bundled with all necessary dependencies including versioning.

These apps run in their own semi-isolated "container" which makes immutable distros possible. (Distros like Fedora Silverblue that are effectively impossible to break by installing or removing critical system files.)

This means that a Linux app doesn't have to have a .deb version, an .rpm version, or be pre-compiled for any other distros. A user can simply go to Flathub, (the main repository for Flatpak apps), download the flatpak, and install it on their distro of choice.

It's quickly becoming the most popular way for users to install apps on Linux because it's so easy and quick. But there are a few downsides like size on disk, first party verification, per-distro optimizations, and the centralization of application sources. That's why some users aren't fully endorsing or embracing how popular they are becoming.

[–] [email protected] 17 points 2 months ago* (last edited 2 months ago) (6 children)

Cool, thanks for the explanation.

a single application that gets bundled with all necessary dependencies including versioning

Does that mean that if I were to install Application A and Application B that both have dependency to package C version 1.2.3 I then would have package C (and all of its possible sub dependencies) twice on my disk? I don't know how much external dependencies applications on Linux usually have but doesn't that have the potential to waste huge amounts of disk space?

[–] [email protected] 29 points 2 months ago (1 children)

Essentially yes, if you start using lots if older applications or mixing applications that use many different dependency versions, you will start to use lots of extra disk space because the different apps have to use their own separate dependency trees and so forth.

This doesn't mean it will be like 2x-3x the size as traditional packages, but from what I've seen, it could definitely be 10-20% larger on disk. Not a huge deal for most people, but if you have limited disk space for one reason or another, it could be a problem.

[–] [email protected] 1 points 2 months ago (2 children)

It CAN get pretty wild sometimes, though. For example, Flameshot (screenshotting utility) is only ~560KB as a system package, while its flatpak version is ~1.4GB (almost 2.5k times as big)

[–] [email protected] 6 points 2 months ago (1 children)

Flameshot is 3.6MB on disk according to flatpak info org.flameshot.Flameshot

[–] [email protected] 3 points 2 months ago* (last edited 2 months ago)

Weird, the software manager (using LM 21.3) reports 1.1GB dl, 2.4GB installed (which is different from when i checked yesterday for some reason?). flatpak install reports around 2.1GB of dependencies and the package itself at just 1.3MB

EDIT: nvm im stupid, the other reply explains the discrepancy

[–] [email protected] 5 points 2 months ago

no, that number don't reflect the shared runtimes and deduplication

[–] [email protected] 6 points 2 months ago

Most dependencies are bundled in the "runtime" images, and it uses file deduplication to reduce the size of the dependencies, but it's still a little more than a normal package manager.

[–] [email protected] 4 points 2 months ago* (last edited 2 months ago)

on a desktop it might not be significant but I tried using flatpak apps on a device with very limited root emmc storage (16 GB) and ran out of space really fast. Its really common to see a couple multi-hundred-megabyte library downloads for each new app IME.

I like them for some stuff but there are glaring issues that I don't like. I've posted about it before, poor integration of apps/not getting the right permissions is a big problem, the people packaging them don't often do as good of a job as someone like a distro maintainer.

But admittedly my experience using it probably isn't representative (pop os through their shop and arch on a mobile device). Neither were amazing, but not having to compile shit myself or install with an untrusted shell script was nice for some apps. Without some significant improvements it's not a good replacement for a distro's package repos but it might be a good way to broaden the available applications without having to maintain 10x more packages.

[–] [email protected] 3 points 2 months ago

It's not quite that simple.

Each package can choose one from a handful of runtimes to use, each of which include common dependencies (like gnome or qt libraries), and if multiple flatpaks use the same runtime, that runtime is only downloaded once.

It is less space efficient than your typical package manager, but brings other benefits like sandboxing.

[–] [email protected] 2 points 2 months ago

Flatpak as a dependency system that allows use of specially packaged library type flatpaks. This significantly reduces the needed disk space.

[–] [email protected] 0 points 2 months ago

Not necessarily. GNOME and KDE dependencies and "base system" for flatpaks to run in are flatpaks themselves so apps that depend on them will not use duplicated dependencies. Storage usage may not be as efficient as using a traditional package manager but you don't install a new OS per app either.

load more comments (13 replies)
load more comments (23 replies)