Announcement

Collapse
No announcement yet.

Oh Snap!

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

    #31
    Fortunately, I (1) can't really understand all the technical issues being discussed here, and (2) can't relate to the issue itself: to Snap or not to snap!
    I say, "fortunately," because -- so far -- I'm doing fine with my newly installed 22.04, Firefox included. I did read some introduction to Snap somewhere, but that's about it -- SO FAR!
    (did notice some quirk when I downloaded some files using Firefox, but somehow got past it ok ...)
    Ignorance * can be, at times, bliss *! ha-ha
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #32
      I'm really tired of Snap updates breaking Firefox!! What a joke. It makes me nervous about keeping my system updated.I can't think of any other Linux system I've used that had the same problem with Firefox over and over. What is the problem? Why can't anyone get it right?

      Operating System: Kubuntu 22.04
      KDE Plasma Version: 5.24.7
      KDE Frameworks Version: 5.92.0
      Qt Version: 5.15.3
      Kernel Version: 5.15.0-67-generic (64-bit)
      Graphics Platform: X11
      Processors: 8 × Intel® Core™ i7-2670QM CPU @ 2.20GHz
      Memory: 15.5 GiB of RAM
      Graphics Processor: GeForce GT 555M/PCIe/SSE2​

      Comment


        #33
        Just get rid of the Firefox Snap and replace it with a version from a PPA or the binary from Mozilla (or a Flatpak if you want to use a containerized version for some reason).

        The only thing one has to be aware of is that before one release-upgrades to the next (LTS-) version of Kubuntu one has to make sure that neither snapd nor the Firefox Snap is blocked by APT-pinning​ then and snapd is (re-)installed.

        Of course one can apply the changes regarding Firefox (and Snaps) again after a release-upgrade as yet - this seems to have become a never-ending cycle with *ubuntu

        I have several little scripts to do parts of this and if I have some spare time during the next weeks I will try to revise them to cover all scenarios I can think of and publish them here.
        Unfortunatly I have not been fond of programming for over 40 years…
        Last edited by Schwarzer Kater; Mar 15, 2023, 01:18 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


          #34
          Snapd is woven into Kubuntu and if one is not careful just removing snapd may leave a lot of snap detritus laying around your system. It used to be that almost a dozen loop devices were used as snapd devices and drivers. Then they switched to squashfs, which many people can't figure out how to remove. For those running BTRFS /snapd and many other snapd directories are btrfs subvolumes in /var, but they are attached to /.


          A good method is shown on this link:
          https://askubuntu.com/questions/1280...uninstall-snap
          BUT, if you have either FireFox or Chromium loaded then purge them first.

          In Ubuntu 20.04 LTS (but it works also in the following releases till 22.04, that is the current one), I removed snapd following these steps:

          # stop snapd services:
          sudo systemctl stop snapd && sudo systemctl disable snapd
          # purge snapd
          sudo apt purge snapd

          # remove no longer needed folders
          rm -rf ~/snap
          sudo rm -rf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd /root/snap

          Then, to avoid that other applications may reinstall it (chromium-browser is an example of application that restores snapd even if installed via apt) you can create a file no-snap.pref by issuing:

          sudo -H gedit /etc/apt/preferences.d/no-snap.pref and then copying the following content in it:
          Package: snapd
          Pin: release a=*
          Pin-Priority: -10

          Despite that, there are a couple files that you cannot remove because doing so will remove your desktop and many of its dependencies:
          libsnapd-glib.so.1
          ​xdg-desktop-portal

          When I do "locate snapd" in a Konsole I get the following output:

          $ locate snapd
          /home/jerry/Documents/textfiles/snapd_depends_rdepends.txt
          /usr/lib/x86_64-linux-gnu/libsnapd-glib.so.1
          /usr/lib/x86_64-linux-gnu/libsnapd-glib.so.1.0.0
          /usr/share/doc/libsnapd-glib1
          /usr/share/doc/libsnapd-glib1/changelog.Debian.gz
          /usr/share/doc/libsnapd-glib1/copyright
          /var/lib/dpkg/info/libsnapd-glib1:amd64.list
          /var/lib/dpkg/info/libsnapd-glib1:amd64.md5sums
          /var/lib/dpkg/info/libsnapd-glib1:amd64.shlibs
          /var/lib/dpkg/info/libsnapd-glib1:amd64.symbols
          /var/lib/dpkg/info/libsnapd-glib1:amd64.triggers


          ​I went to Mozilla's website and downloaded a binary version of FireFox from their "Advanced Users" section of their download page:
          https://support.mozilla.org/en-US/kb...-firefox-linux

          The instructions are straight forward and easy to follow.
          "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


            #35
            … or one could use Debian's instructions to install the binary from Mozilla.org - which are similar:
            https://wiki.debian.org/Firefox#From_Mozilla_binaries
            That's what I have done several dozens of times after a fresh installation since Kubuntu 22.04 and what I used as basis for my scripts.
            Last edited by Schwarzer Kater; Mar 16, 2023, 07:40 PM.
            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


              #36
              Originally posted by GreyGeek View Post
              ​xdg-desktop-portal
              This one is necessary for other things unrelated to snaps and flatpaks (which is where the concept for XDG portals originated) - such as being able to use the KDE file picker in Firefox, for example. Plasma itself depends on this package, not snap or flatpak.
              libsnapd-glib.so.1 is going to be hard to remove, but as a library, it isn't running or providing a service or anything, just a connector, and as far as I can see does not itself depend on snap stuff, so won't pull it in down the road. Though of course fans of conspiracy theories might think otherwise



              If it helps, this is what neon use to pin the mozillateam PPA. Others who use this repo have similar files.

              /etc/apt/preferences.d/org-kde-neon-net-launchpad-ppa-mozillateam-pin
              (the name is not terribly important)

              Code:
              ​# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
              # SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
              
              Package: firefox
              Pin: release o=LP-PPA-mozillateam
              Pin-Priority: 550
              
              Package: firefox-*
              Pin: release o=LP-PPA-mozillateam
              Pin-Priority: 550
              
              Package: firefox-locale-*
              Pin: release o=LP-PPA-mozillateam
              Pin-Priority: 550​

              Comment


                #37
                Thanks, it's great to know I have options. When I have time to study these I'm going to make some changes. However, since this is a soapbox I will say it's really too bad updating has to be this complicated. In my opinion the update process in Linux has always been one of the biggest advantages it has over that "other" O.S.
                Thanks again for the help.

                Comment


                  #38
                  Originally posted by claydoh View Post
                  […]
                  If it helps, this is what neon use to pin the mozillateam PPA. Others who use this repo have similar files.
                  […]
                  It does, thank you very much!

                  I am currently on my MacBook and far away from my desktop computer at home - and therefore without the possibility to boot into KDE neon (and with no space left for an additional virtual machine) and between two funerals…
                  So I am using the free time to extend my Firefox installation script with a second option: to install Firefox from the Mozilla Team PPA (exactly like KDE neon does).

                  1. Do you know why they specify an additional Package: firefox-locale-* - wouln't be just Package: firefox-* sufficient?
                  (I left out the Package: firefox-locale-* part in my script so far.)

                  2. And generally: what is the reason for Package: firefox and Package: firefox-* and […] and not just Package: firefox*?
                  Is there a firefoxmakesmycomputerexplode package, for example?
                  Last edited by Schwarzer Kater; Mar 17, 2023, 03:24 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


                    #39
                    Originally posted by Schwarzer Kater View Post
                    1. Do you know why they specify an additional Package: firefox-locale-* - wouln't be just Package: firefox-* sufficient?
                    No idea, Not sure if one works, while the other does not (in terms of apt reading the config) or it is just good practice or just a norm. My regex knowledge is utterly horrible.

                    Originally posted by Schwarzer Kater View Post
                    2. And generally: what is the reason for Package: firefox and Package: firefox-* and […] and not just Package: firefox*?
                    Is there a firefoxmakesmycomputerexplode package, for example?
                    Yes - firefox-esr, for example. Which may explain #2......aaaaand I think this is the case
                    firefox-esr has its own set of locale packages, and there is at least one package with 'firefox' in the name that is not from mozilla

                    Comment


                      #40
                      Yes: firefox-esr, of course!

                      Thanks - I think I will add the firefox-locale-* again, in case it is good practise or a norm or …
                      Last edited by Schwarzer Kater; Mar 17, 2023, 04:52 PM.
                      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


                        #41
                        (Since this has become a long-running thread about firefox and snaps, I'd like to add a little finding and opinion to the story...)

                        There's been several mentions of
                        install Firefox from the Mozilla Team PPA
                        An alternative is
                        Originally posted by GreyGeek View Post
                        ​I went to Mozilla's website and downloaded a binary version of FireFox from their "Advanced Users" section of their download page...
                        In my experience the Mozilla Team PPA was often far too slow; on one occasion the download took 20 minutes. The binary version sometimes updates in less than a second. (I imagine there's some cacheing magic happening when there's a new version.)

                        I suspect that the binary version, installed to /opt and started through /usr/local/bin, will avoid some problems during a release upgrade. Having purged snapd and having no /snap, will a release upgrade reinstall them?
                        Regards, John Little

                        Comment


                          #42
                          I have had no chance to test that yet (but I suspect that, too) - perhaps I will get to that within the next week.

                          So far in my script that prepares a "de-snapped" Kubuntu for a release-upgrade all APT-pinnings in /etc/apt/preferences.d that block the installation of snapd and prefer the Firefox from the Mozilla Team PPA are removed and afterwards both snapd and the Firefox Snap are reinstalled (and the Snap support for Discover, too). I am uncertain yet if I will have to deinstall Firefox itself from the Mozilla Team PPA, too…

                          I will post here when I have had the time and possibility to test it at home.

                          PS: Just for your information - I am testing the scripts (and have already used variations of them for installations during the last year) with Kubuntu 20.04, 22.04 and 22.10.
                          I have refrained from testing them with any other Ubuntu "Flavours" or Ubuntu itself due to the amount of time that takes…
                          Last edited by Schwarzer Kater; Mar 18, 2023, 06:49 AM. Reason: added PS, typos and other additions
                          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


                            #43
                            Originally posted by jlittle View Post
                            In my experience the Mozilla Team PPA was often far too slow; on one occasion the download took 20 minutes. The binary version sometimes updates in less than a second. (I imagine there's some cacheing magic happening when there's a new version.)
                            The PPA server(s) can get bogged down, which I see fairly often. I am sure your physical location doesn't help.
                            Oddly, the ipv6 address for ppa.launchpadcontent.net is in Massachusetts, while the ipv4 is in in London
                            Mozilla will have a much greater set of local mirrors worldwide, probably as many as Ubuntu proper have, or more, so that is a consideration worth factoring when deciding on where to source your FF from.

                            Comment


                              #44
                              OK I'm getting very confused. Based on what I'm reading I qualify as a newbie. I'm sure y'all know what you're talking about but it makes me too nervous to try. Maybe I'm expecting too much, but will there be a solution for a "newbie" that hates Snap's hold on Kubuntu (or maybe just Firefox)? I'm patient.
                              Very interesting reading, thanks.

                              Comment


                                #45
                                Originally posted by Brickfoot View Post
                                […]Maybe I'm expecting too much, but will there be a solution for a "newbie" that hates Snap's hold on Kubuntu (or maybe just Firefox)? I'm patient. […]
                                Give me one or two more weeks and I hope I can provide you and other people who are interested with three scripts that will hopefully cover all scenarios for Kubuntu 20.04, 22.04 and 22.10… :
                                1. a script that removes and blocks snapd and Snaps (including the Firefox Snap)
                                2. a script that lets you choose to either install Firefox as a binary from Mozilla.org like Debian suggests or install Firefox from the Mozilla Team PPA like KDE neon does
                                3. a script that prepares Kubuntu for a release-upgrade to the next version if one has removed and blocked Snaps before (e.g. with script #1)

                                To use the scripts one would have to
                                • copy and paste the code of the individual script into a blank Kate document
                                • save it as e.g. "script_name.sh" to e.g. your home directory
                                • make it executable in Dolphin or CLI (in Konsole go to the directory you saved the script to and chmod +x script_name.sh)
                                • in Konsole go to the directory you saved the script to and run it with ./script_name.sh
                                ​I will also try to provide the scripts for direct download from a GitLab page when I will have time…
                                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

                                Working...
                                X