Announcement

Collapse
No announcement yet.

Oh Snap!

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

  • Schwarzer Kater
    replied
    Originally posted by jlittle View Post
    […]
    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?
    Well, I have discovered some (minor) problems during a release-upgrade indeed, if the user has installed Firefox from the Mozilla Team PPA​ - due to Ubuntu's Firefox "dummy" packages that install the Snap, .
    I am currently testing several things/scenarios and working around those "problems" in my scripts - my present solution is to automatically remove the Mozilla Team version of Firefox before a release-upgrade and automatically re-install it after the release-upgrade when the user gets rid of Snap again.
    I am not doing this carelessly (is this the correct word?) - 3 to 4 conditions will have to be fulfilled before a user's Firefox from the MT PPA is removed. Let's see if there is another way, but I doubt it. At least the Firefox user data is left untouched…
    Last edited by Schwarzer Kater; Mar 22, 2023, 03:58 PM. Reason: added information about removal conditions

    Leave a comment:


  • claydoh
    replied
    Originally posted by Brickfoot View Post
    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.
    The first page in this thread has a link to instructions on how to de-snap.
    There are many such how-tos
    That is pretty much as newbie-friendly as it can get, really.



    Leave a comment:


  • Schwarzer Kater
    replied
    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…

    Leave a comment:


  • Brickfoot
    replied
    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.

    Leave a comment:


  • claydoh
    replied
    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.

    Leave a comment:


  • Schwarzer Kater
    replied
    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

    Leave a comment:


  • jlittle
    replied
    (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?

    Leave a comment:


  • Schwarzer Kater
    replied
    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.

    Leave a comment:


  • claydoh
    replied
    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

    Leave a comment:


  • Schwarzer Kater
    replied
    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

    Leave a comment:


  • Brickfoot
    replied
    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.

    Leave a comment:


  • claydoh
    replied
    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​

    Leave a comment:


  • Schwarzer Kater
    replied
    … 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.

    Leave a comment:


  • GreyGeek
    replied
    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.

    Leave a comment:


  • Schwarzer Kater
    replied
    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

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X