Announcement

Collapse
No announcement yet.

Snaps vs. Flatpack

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Snaps vs. Flatpack

    There's been a lot of noise recently about Ubuntu's continued emphasis on Snaps, as well as Flatpacks as a better alternative. As it seems that distros are moving towards this type of packaging, i wonder just what are the technical reasons for preferring one over the other. Personally, I have one Snap--Firefox--which was slow to start at first but now is comparable to Waterfox, which is not a Snap. I have a couple of Flatpack programs as well, which are rather slower to start. I also have a few Appimages, which are much faster but more problematical to upgrade to newer versions. Apart from the business-end objections to Canonical's pushing towards an all-Snap repository for Ubuntu, just what are the technical objections to Snap, especially vs. Flatpack and Appimages? I have not bothered to eliminate snapd and make Firefox a Deb. packagae because it doesn't seem necessary, except for those who want a super-rapid startup. But if there are real technical problem with Snaps which make it unwise to rely on them for daily use, I would like to know what they are so I can decide whether to continue with the Ubuntu universe or not. I would appreciate some feedback on the technical side without the corporate issues, which I've read about and don't really care too much about.

    #2
    Some answers to your questions can be found here: DJ Ware - The Canonical Decision.
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #3
      Technical reasons? Nothing significant to prefer one over the other.
      But sticking with one seems to be a good idea, in terms of drive space/bloat and having to learn multiple tools.

      Basically, it is the Ubuntu=always bad syndrome. Objections to these formats are 85% political/ideological/religious/fear0-of-change, and 15% the teething problems with the system.

      Snaps do have an advantage in that they can be used for server and terminal applications, and flatpak can't. But this is sort of irrelevant for desktop users.
      You can install a nextcloud server setup as a snap for example. It works much in the same manner as setting every thing up in Docker.

      These formats put the packaging back in the hands of the software developers a lot more, which is not a bad thing, especially as so many projects have a much faster and more frequent development pace. it isn't like in the olden times when there was a significantly smaller number of applications and utilities out there. Creating packages in either format looks to be vastly simpler and less complicated than doing debs, which is sort of a Dark Art, in my experience.

      Comment


        #4
        Originally posted by claydoh View Post
        Technical reasons? Nothing significant to prefer one over the other.
        […]
        This could be up for debate, depending on the definition of "significant"…
        • Flatpak was targeted at desktop applications from the beginning and is better suited for desktop installations --- Snap was developed as Canonical's answer to e.g. Docker and therefore is much better suited for servers or special cases on desktop computers IMHO.
        • Flatpak cannot run CLI/server applications --- Snap can.
        • Flatpaks can be installed either for a single user or system wide --- Snaps can only be installed system wide.
        • It is easy to uninstall unused ("orphaned") Flatpak components --- it is quite complicated to uninstall unused ("orphaned") Snap components.
        • Flatpaks are uncompressed --- Snaps are compressed (this gets more relevant subject to how old/weak one's computer is - only the decompression behavior of the Firefox Snap has been improved a lot due to complaints recently).
        • Snaps spam loop devices, at least a pain in the butt --- Flatpaks don't do such a thing.
        • Flatpaks use their own sandbox permissions (which are relatively easy to configure with e.g. Plasma System Settings ≥ 5.27 or Flatseal) --- Snaps rely on (active blocking with) AppArmor (quite complicated to configure for a "normal" user), which additionally is not ideal for distributions that ship with SELinux instead of AppArmor.

        I also have to add that the biggest (not only) Flatpak "store" (Flathub) is officially supported by e.g. KDE and GNOME and is open --- and that the only Snap "store" is run by Canonical and is not open.

        I avoid both Flatpaks and Snaps if possible, but for desktop installations I do prefer Flatpaks.

        PS: If you want to have a comparison how some of the different distributions with KDE Plasma that are based on Debian support Flatpak and Snap out of the box, see Overview: Kubuntu, its parent and some of its siblings.
        Last edited by Schwarzer Kater; Jul 09, 2023, 08:43 AM. Reason: added PS
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          Originally posted by Schwarzer Kater View Post
          This could be up for debate, depending on the definition of "significant"
          For the end user, on the desktop, using an app store to install and remove applications, there aren't any significant difference,from a technology standpoint.
          Yes, there ARE differences in how they work, etc et al, ad nauseum.

          None of the points above, except for the cleanup one, is terribly relevant to the end user. I missed that one.

          Originally posted by Schwarzer Kater View Post
          and that the only Snap "store" is run by Canonical and is not open.
          yes, and no. A decent and relatively sane discussion on the topic, and of sourcing software a bit more broadly

          And.....outside of Fedora's crappy default flathub instance (which they are moving away from, maybe?), exactly how many different flathubs are in use in any significant sense?
          This is not a technical topic, but a more political/ideological one.The number of sources one can add isn't bettor or worse, from a technological perspective. It is just different.

          KDE has at least 150 application on the Snap store, btw, produced by KDE.

          The thing is, no one can give a real, unbiased opinion as the topic is inherently political, and for some things, growth and change is hard.
          I also am a very bad knee-jerk contrarian. If this discussion were reversed, I would be making similar points about the usefulness of debs, and the joys of complex dependency hell management, and why needing 2-6 packages for each application, before external dependencies are factored in, is a great system in all cases

          I don't hate this stuff. I don't think Snaps will survive in the long run, though they may hang around in the server arena a bit.
          Red Hat/Fedora will "win", much like they did with Systemd, pulseaudio(?) .
          But in daily use, in terms of running a program or managing things both seem to be about the same, overall.

          Originally posted by Schwarzer Kater View Post
          Snaps spam loop devices, at least a pain in the butt --- Flatpaks don't do such a thing.
          How is this, annoying as it is, a technological difference? How often do users actually see this?
          Though, really it doesn't seem like it would take too much to hide that, as well as all of the other weird crap that is "mounted" in our systems.

          Comment


            #6
            Originally posted by claydoh View Post
            And.....outside of Fedora's crappy default flathub instance (which they are moving away from, maybe?), exactly how many different flathubs are in use in any significant sense?
            This is not a technical topic, but a more political/ideological one.The number of sources one can add isn't bettor or worse, from a technological perspective. It is just different.
            The problem is not that more sources is better. With flatpaks, someone else will be able to set up an instance if one instance will become unusable (or the store owner decides to charge people/enterprises for access to it), because it is open source....this is certainly a technical issue as well (just not only a technical issue)

            And in the FOSS world, free software ideology is pretty important for most actors (and it should be so even for end users) and I resent the fact that you group it up with politics/religion/fear-of-change etc, as if it's in a same level of insignificance as the others.

            Originally posted by claydoh View Post
            Basically, it is the Ubuntu=always bad syndrome.
            An opinion, and quite a simplification at that. Even if that were true, these sort of "syndromes" don't materialize out of thin air.
            Last edited by kubicle; Jul 09, 2023, 10:03 AM.

            Comment


              #7
              The OP question wasn't about the political/opinion/freedom aspects. We are providing some helpful information, for sure
              But, as I mentioned, the philosophical content also creeps in, and the same well-discussed topics in that sphere re-enter the ring.

              I just noticed that the third-party snap repo found in my link was created by the Ubunty Unity lead, who is 12 or 13 years old

              Is it philosophical or technological that a person or an entity/enterprise prefers to have a single vetted source for software, or the 'wild west' of things like the AUR, PPAs, and random git repos or flathubs?
              I think that sort of thing may be why Fedora is using its own Flathub servers over the public one? Some of the stuff in Fedora's was quite outdated.

              Another + toward Flatpak is the upcoming integration with payments/donations.

              But it is time for me to stop my knee-jerk contrarian string, that dang arthritis is kicking in today, in real life even

              Comment


                #8
                Canonical lost me when I learned that snapd runs all the time as a service. That its back end is proprietary, and Discover is (AFAIK) its only front end GUI confirmed my decision.

                Why does snapd continually run as a back end service? The user is not continually querying a repository for applications to install or remove. They may do that once a day or less often, so why does snapd have to run all the time, and against a proprietary repository? It's certainly not telemetry because one can supposedly opt out of that during the install of K/Ubuntu. What else is Canonical so keen on monitoring? And for whom if not themselves?

                Why the proprietary back end? To force monetization for selected packages. IF package A is the best of type and available only via Discover and some $$$ then Canonical has created two classes of users, with the paying class getting the best. That is a direct attack on the GPL and FOSS. And, the FOSS developer pool is drained of talent. Those writing package A are no longer FOSS developers, they are working for hire, IF Canonical is sharing those fees. IF package B is almost as good as package A but is in the free repository then it will be my first choice, for the same reason that I choose to use LibreOffice over M$'s offering. Libre Office doesn't have to be "as good" as Microsoft Office, just good enough.

                I'm not against paying money for a distro or for apps. I paid quarterly for SUSE for eight years, even though it was free, and got my money's worth. For years my only sound and Internet drivers were proprietary because no FOSS driver worked. Remember 4Front Sound? Or Bamboo Internet?

                And I've donated to FOSS apps as well, but all of that was voluntary. I downloaded, installed and use several distros or apps under the GLP for free. The GPL allows a developer to charge for a copy of the binary of the app but the user has a right to ask for and receive the source code for that binary app. Has anyone seen the source code for snapd or its back end repository?

                While many project developers award a special member of their team with the title "BDFL", Mark Shuttlesworth awarded himself the title "SABDFL" or Self-Appointed Benevolent Dictator For Life because his $500M floats Canonical and Ubuntu. Perhaps we are witnessing a transformation from SABDFL to SADFL?

                For me the die is cast. The only question is when? Where ever I land it will be a haven for the KDE Plasma desktop and for BTRFS.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Thank you, all, for a reasonably condensed discussion of the topic. It's nicely referable by the title of the thread.

                  (I've been exposed most or all of this before, but usually in the context of snaps/flatpaks vs APT or AUR or building from source, and that context means discussions have not been "reasonably condensed". Thus, it's all clouded by a murk of half-remembered factoids and confusion.)
                  Regards, John Little

                  Comment


                    #10
                    Thanks to all for replying. Let's hope that the end-user benefits from all this experimentation.

                    Comment


                      #11
                      Originally posted by claydoh View Post
                      […]
                      None of the points above, except for the cleanup one, is terribly relevant to the end user. I missed that one.
                      The relevance always depends on the individual user and use case.

                      For example if I wanted to install a certain CLI application that is not available from the repositories and didn't want to e.g. compile it myself, I would use a Snap.
                      Or if I had a very old computer, I would try to avoid Snaps and Flatpaks alltogether - but would prefer Flatpaks to Snaps if the application would only be available in those formats (I had a customer where this was relevant and I had this case on my oldest computer myself before I sold it last year).


                      Originally posted by claydoh View Post
                      […] Basically, it is the Ubuntu=always bad syndrome. […]
                      Originally posted by claydoh View Post
                      […] The thing is, no one can give a real, unbiased opinion as the topic is inherently political, and for some things, growth and change is hard.
                      I also am a very bad knee-jerk contrarian. If this discussion were reversed, I would be making similar points about the usefulness of debs, […]
                      I think you are partially right, but I don't think that my point of view would be different if Snap had been developed by SUSE or Red Hat

                      And your contrarianism (is this even a word? ) is a good thing, because it can make people see things from another perspective or can make them begin thinking at all.
                      Last edited by Schwarzer Kater; Jul 10, 2023, 04:35 PM. Reason: typos
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #12
                        Originally posted by GreyGeek View Post
                        Why does snapd continually run as a back end service?
                        Because snapd is the service that let's snap apps interact with the system (the thing that enables snap app to run across different systems, because snaps only need to talk to snapd...and snapd handles the system interactions)

                        Originally posted by GreyGeek View Post
                        Has anyone seen the source code for snapd or its back end repository?
                        snapd is free and open source software (unlike the snap store server software), the source is freely available...you can download it with "apt-get source snapd" from the repos like any other source code for the apps in the main repos (provided that you have the deb-src repos enabled. You can also view the source online in here (for example): https://github.com/snapcore/snapd/releases

                        snapd isn't really an issue, snap problems lie elsewhere.

                        Comment


                          #13
                          I've actually done a 180 on Snap. I didn't like it, considered it a bad idea, was worried about invasion of privacy, but I talked to a few people who were devs, and they told me my fears were largely unfounded. It took a while, but they convinced me to give Kubuntu a try again because I missed my Ubuntu+KDE distro so very much. So I installed, it, and went ahead and used Snap for Firefox, and a few other apps, and so far I have been pleasantly surprised. Firefox loads in a split second. You can't even tell Snap is on my system unless you go looking for it. It's honestly not what I thought it was, negatively speaking, and I'm glad, because I was tired of trying to find ways around it.

                          I still don't like that Canonical pushes it so hard, but I can at least say from firsthand experience now that my worries were largely pointless.

                          Comment


                            #14
                            Originally posted by Avidan2006 View Post
                            I've actually done a 180 on Snap. I didn't like it, considered it a bad idea, was worried about invasion of privacy, but I talked to a few people who were devs, and they told me my fears were largely unfounded. It took a while, but they convinced me to give Kubuntu a try again because I missed my Ubuntu+KDE distro so very much. So I installed, it, and went ahead and used Snap for Firefox, and a few other apps, and so far I have been pleasantly surprised. Firefox loads in a split second. You can't even tell Snap is on my system unless you go looking for it. It's honestly not what I thought it was, negatively speaking, and I'm glad, because I was tired of trying to find ways around it.

                            I still don't like that Canonical pushes it so hard, but I can at least say from firsthand experience now that my worries were largely pointless.
                            Containerized software distribution isn't bad (or evil) in itself, it's a nice option to have for developers, distributors and users (whether it's snap, flatpak, appimage or something else). And I concur that fears for privacy etc. are largely unfounded, and most of the widely distributed criticisms target the wrong issues with them.

                            The thing about snaps is just that it is (at least currently) a technically inferior solution to the competition and Canonical's control of it is bad for free software in general, for many reasons...including this one: https://www.nitrokey.com/news/2021/n...st-ubuntu-core
                            (Note that there is no Ubuntu or snap "hate" in there, these guys really wanted to use these, just that there were technical and practical reasons that wasn't feasible).

                            Snaps will never be a widely accepted solution, which is one of the reasons Canonical is forcing it in so hard, even desperately https://www.theregister.com/2023/02/..._drop_flatpak/
                            Last edited by kubicle; Jul 20, 2023, 09:59 PM.

                            Comment


                              #15
                              Originally posted by kubicle View Post

                              Containerized software distribution isn't bad (or evil) in itself, it's a nice option to have for developers, distributors and users (whether it's snap, flatpak, appimage or something else).

                              The thing about snaps is just that it is a technically inferior solution to the competition and Canonical's control of it is bad for free software in general, for many reasons...including this one: https://www.nitrokey.com/news/2021/n...st-ubuntu-core
                              (Note that there is no Ubuntu or snap "hate" in there, these guys really wanted to use these, just that there were technical and practical reasons that wasn't feasible).

                              Snaps will never be a widely accepted solution, which is one of the reasons Canonical is forcing it in so hard, even desperately.
                              I understand what you're saying, and yeah, I'd feel better if they just used Flatpak, as I prefer it, but they're not going to in the foreseeable future. They see this as the best decision for server side implementation, but I guess they decided "in for a penny, in for a pound" and pushed it desktop side, too. Server side makes sense, but the desktop is being pulled along for the ride. That said, what I've seen so far is that it's still a pretty decent setup even for desktops, but I do understand the frustration.

                              Comment

                              Working...
                              X