Flatpaks - I'm still puzzled (and confused!)

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
br1anstorm
Level 5
Level 5
Posts: 603
Joined: Mon Nov 24, 2014 8:53 am

Flatpaks - I'm still puzzled (and confused!)

Post by br1anstorm »

I have LMDE5 on my laptop, and I posted separately in this forum a few weeks ago after being offered a number of Flatpak updates in the Update Manager. I didn't think I needed them. I thought that I had no Flatpak apps installed.

I was wrong. I had downloaded nomacs (a graphics/photo app) from the Mint Software manager, and apparently it is only available as a Flatpak. I'm thinking of removing it.

Why? Because in fact I don't need nomacs (there are other graphics apps which do roughly the same job). More important, as a general principle I'm not keen on "bloat". I don't want to use Flatpaks at all. In terms of packaging, the only tailored format I'm prepared to use is AppImages, as they remain separate from the main system.

But I'm posting again separately on this subject because I've been reading this thread about Flatpaks in the Mint Main Edition forum viewtopic.php?f=47&t=389637. That has revealed two further aspects of Flatpaks that I find worrying:

- there are real concerns over security loopholes in Flatpak. See the details at https://www.flatkill.org/ . I don't understand the technicalities, but it doesn't look good.

- apparently Flatpak (or Flathub) is now "built into" Mint from version 21 onwards (and presumably now also into LMDE5?), which seems to be the reason why the Update Manager pushes out Flatpak updates which are sometime both numerous and bulky. Why is this now built in or forced on to all Mint users, even those like me who actually don't want to use Flatpaks? (I might add that on my other laptop, running Mint 19.1, there is no Flatpak at all in /var/lib).

So I went looking. Here's what I found....

Code: Select all

$ flatpak list
Name             Application ID                Version Branch     Installation
Mesa             …edesktop.Platform.GL.default 21.3.9  21.08      system
Intel            …desktop.Platform.VAAPI.Intel         21.08      system
openh264         …reedesktop.Platform.openh264 2.1.0   2.0        system
Mint-Y Gtk Theme org.gtk.Gtk3theme.Mint-Y              3.22       system
Mint-Y-Orange G… ….gtk.Gtk3theme.Mint-Y-Orange         3.22       system
KDE Application… org.kde.Platform                      5.15-21.08 system
nomacs - Image … org.nomacs.ImageLounge        3.16    stable     system
I have no idea what Mesa is or what it does. It also looks as if some of the features which I had regarded as integral parts of the Mint OS rather than optional add-on apps - like the Mint-Y themes - are packaged as Flatpaks.

And the real eye-opener: I seem to have a Flatpak that relates to KDE software apps. I know that KDE tends to be bulky. And I'm a disciple of @Pjotr, whose wise advice is that it's not a good idea to mix different DEs and their software. I would therefore stay away from trying to install KDE apps (like K3b) anyway. So what's going on here? Why have I got KDE-related Flatpak stuff already on my system, and am now being offered a large (657MB) update to it?

If I purge or get rid of all this (and there seem to be different ways of doing so) what, if anything, will fall over? I can do without the nomacs app. But what will be the consequences for my Mint-Y theme(s), for example? And what if I remove the Mesa, Intel, openh264 Flatpaks?

Is Mint at risk of becoming too complex, or too bloated, for its own good?
Last edited by LockBot on Tue Jul 18, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Flatpaks - I'm still puzzled (and confused!)

Post by rene »

br1anstorm wrote: Wed Jan 18, 2023 10:12 am Is Mint at risk of becoming too complex, or too bloated, for its own good?
No.

The by you installed "nomacs" is a KDE (or just Qt) application -- and it being a flatpak means said KDE/Qt-ness stays isolated to it, so you don't need to worry about it from that angle. If I check here, org.nomacs.ImageLounge pulls in

Code: Select all

        ID                                             Branch                Op            Remote             Download
 1.     org.freedesktop.Platform.GL.default            21.08                 i             flathub            < 129,8 MB
 2.     org.freedesktop.Platform.openh264              2.0                   i             flathub              < 1,5 MB
 3.     org.gtk.Gtk3theme.Matcha-light-sea             3.22                  i             flathub            < 207,5 kB
 4.     org.kde.Platform.Locale                        5.15-21.08            i             flathub            < 347,5 MB (partial)
 5.     org.kde.Platform                               5.15-21.08            i             flathub            < 310,4 MB
 6.     org.nomacs.ImageLounge                         stable                i             flathub             < 14,9 MB
You can uninstall it through Software Manager or simply as

Code: Select all

flatpak uninstall org.nomacs.ImageLounge
which you'd then follow-up with

Code: Select all

flatpak uninstall --unused
to also remove the runtimes that it once pulled in. If after that

Code: Select all

flatpak list
still tells you there are things installed and you longer want any you can always do

Code: Select all

flatpak uninstall --all
Anything that is installed as flatpak is only useful for flatpaks; your "system proper" doesn't depend on any, and if you install another flatpak anything it depends on will be pulled back in.

It's not Mint 21 that integrated flatpak support but IIRC Mint 19 of some 4 years ago. Only thing Mint 21 does is now integrate the updates to flatpaks in Update Manager whereas they used to be run automatically behind the scenes. I.e., you are just seeing them and are being offered more rather than less control.

While I'm not a fan of flatpak myself, flatkill.org is basically a propaganda site which you can only use/read succesfully when you know how and to what extent to interpret its musings. If you don't -- ignore it.
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Flatpaks - I'm still puzzled (and confused!)

Post by xenopeek »

br1anstorm wrote: Wed Jan 18, 2023 10:12 am - apparently Flatpak (or Flathub) is now "built into" Mint from version 21 onwards (and presumably now also into LMDE5?), which seems to be the reason why the Update Manager pushes out Flatpak updates which are sometime both numerous and bulky. Why is this now built in or forced on to all Mint users, even those like me who actually don't want to use Flatpaks? (I might add that on my other laptop, running Mint 19.1, there is no Flatpak at all in /var/lib).
Linux Mint has supported flatpak for over 5 years now, since Linux Mint 18.3: https://web.archive.org/web/20210804225 ... atsnew.php. Since then the Software Manager has been able to install flatpaks from the Flathub remote out-of-the-box.

With Linux Mint 20.2 the controls for automatically updating flatpaks moved into Update Manager: https://www.linuxmint.com/rel_uma_cinnamon_whatsnew.php. And with Linux Mint 21.1 Update Manager now can show individual flatpak updates and let the user selectively install them: https://www.linuxmint.com/rel_vera_cinn ... atsnew.php. Several smaller improvements were done in intermediate releases.

Everything that's new in Linux Mint 21.1 has been rolled out to LMDE hence you have this added functionality now as well. That Update Manager shows you flatpak updates and lets you selectively install them only changes the visibility of updates. You have been able to install flatpaks through Software Manager for over 5 years. It is not something new.
br1anstorm wrote: Wed Jan 18, 2023 10:12 am - there are real concerns over security loopholes in Flatpak. See the details at https://www.flatkill.org/ . I don't understand the technicalities, but it doesn't look good.
See rene's answer for what I think about that website.

You can view and change the sandbox configuration of flatpaks with Flatseal — and it is much nicer than other sandboxing solutions in that regard. I have a dozen or so flatpak apps installed. Some allow filesystem=host (and logically so, for a file manager for example) but more only filesystem=home or even more limited to one or a few specific directories in my home directory. You can easily restrict an app to more limited access if you want to.

From Linux Mint's perspective flatpaks are supplementary to the official repositories; you can get additional apps or the latest releases of apps from there. You don't need to use it but you can if you have a use for it. By adding some additional remotes (flathub-beta, gnome nightly, kde nightly) you can also get development versions which is very useful to make good bug reports for apps — because you can test your issue with a version directly supported by the app developers.
br1anstorm wrote: Wed Jan 18, 2023 10:12 am So I went looking. Here's what I found....

$ flatpak list
<cut for brevity>

I have no idea what Mesa is or what it does. It also looks as if some of the features which I had regarded as integral parts of the Mint OS rather than optional add-on apps - like the Mint-Y themes - are packaged as Flatpaks.

And the real eye-opener: I seem to have a Flatpak that relates to KDE software apps. I know that KDE tends to be bulky. And I'm a disciple of @Pjotr, whose wise advice is that it's not a good idea to mix different DEs and their software. I would therefore stay away from trying to install KDE apps (like K3b) anyway. So what's going on here? Why have I got KDE-related Flatpak stuff already on my system, and am now being offered a large (657MB) update to it?
Instead, use flatpak list --app to just see which apps you have installed as flatpak. It will only show nomacs I think; the rest are runtimes that are used by that app. The Mint themes are added so that your flatpak apps look native on Linux Mint. Flatpak apps can't use themes from the host OS but they can use the same theme if it is installed as a flatpak runtime.

The KDE runtime is installed because nomacs is a KDE app, as rene answered. The rest of the runtimes are graphics APIs, like Mesa: https://en.wikipedia.org/wiki/Mesa_(computer_graphics). Installed because nomacs or the KDE runtime requires them. Flatpak runtimes like these make it so that different apps — while still sandboxed and isolated from the host OS — can share libraries so they only need to be downloaded once and not for each app that uses them.

And as answered elsewhere, flatpak can't tell you exactly how big an install or update is but it can say how large it will be at most. Which is why Update Manager shows it with "<" (less than). flatpak uses ostree for file management and that makes it so that when installing something new or updating something, only new and changed file parts need to be download. Many files may stay the same between versions and thus when updating these won't need to be downloaded again. So usually the actual update is (much) smaller than the maximum shown.
br1anstorm wrote: Wed Jan 18, 2023 10:12 am If I purge or get rid of all this (and there seem to be different ways of doing so) what, if anything, will fall over? I can do without the nomacs app. But what will be the consequences for my Mint-Y theme(s), for example? And what if I remove the Mesa, Intel, openh264 Flatpaks?
No, the whole point of flatpak is that your OS won't fall over regardless of what you do with your flatpak apps. So go ahead and run:
flatpak uninstall --delete-data nomacs
And then:
flatpak uninstall --delete-data --unused
And that should remove all flatpaks.

You can additionally remove the Flathub remote if you don't want to install flatpaks:
flatpak remote-delete flathub
br1anstorm wrote: Wed Jan 18, 2023 10:12 am Is Mint at risk of becoming too complex, or too bloated, for its own good?
All that has changed since flatpak support was added over 5 years ago is that since a short while ago flatpak updates are visible in Update Manager. Maybe that is too much complexity visually, but that is all it is.

Personally I don't need control at this level: flatpak updates can't break the OS so I don't need to care about them. So I've them to install automatically.
Image
br1anstorm
Level 5
Level 5
Posts: 603
Joined: Mon Nov 24, 2014 8:53 am

Re: Flatpaks - I'm still puzzled (and confused!)

Post by br1anstorm »

Thanks to both @rene and @xenopeek for those detailed explanations and answers. That's a whole tutorial on the history of Flatpak and Mint! It has certainly clarified the situation for me.

I hadn't realised that nomacs was a KDE app. That certainly explains why I found "org.KDE.Platform stuff" on my computer when I looked...

And I took the alarmist website about Flatpak security at face value. It did seem surprising that Mint would adopt something that was iffy, so it's good to have reassurance that the dire warnings were just "propaganda".

I'll now do a bit of housekeeping with the help of those useful commands suggested by @xenopeek. Many thanks again: I'm now just a little bit further along the learning curve, and my confidence in Mint is even stronger than before.
Shiva
Level 3
Level 3
Posts: 131
Joined: Thu Jul 07, 2022 11:25 am

Re: Flatpaks - I'm still puzzled (and confused!)

Post by Shiva »

br1anstorm wrote: Wed Jan 18, 2023 12:46 pm I'll now do a bit of housekeeping with the help of those useful commands suggested by @xenopeek. Many thanks again: I'm now just a little bit further along the learning curve, and my confidence in Mint is even stronger than before.
About the Flatpak basic concepts if you're interested in :
https://docs.flatpak.org/en/latest/basic-concepts.html
kb90210
Level 1
Level 1
Posts: 15
Joined: Thu Mar 11, 2021 8:11 pm
Location: Canada

Re: Flatpaks - I'm still puzzled (and confused!)

Post by kb90210 »

I have found that Flatpak versions of software are both slower and take up more room on my system.
For now I avoid them.
User avatar
axisofevil
Level 4
Level 4
Posts: 379
Joined: Mon Nov 14, 2011 12:22 pm

Re: Flatpaks - I'm still puzzled (and confused!)

Post by axisofevil »

Clearly using Software Manager is a bad idea.

Why not install stuff via apt or synaptic - if no software is found, then its not stable enough to be part of LMDE5.
Of course, there is no reason why you shouldn't compile from source code.
Locked

Return to “Software & Applications”