Ostatní > Tipy a triky pro Linux

Firefox nadále jako balík deb, i pro starší verze Ubuntu

(1/1)

Ventero:
S novými verzemi Ubuntu přišlo protlačování a diktát kontroverzních (zejména kvůli enormnímu zabírání místa) Snap balíků a bohužel mají přednost.
Ve starších verzích už ani nemusí být (v rámci deb) k dispozici nová verze - např. v 18.04 je poslední verze Firefox 113 a dnes už máme 123.

Kdo se (za mě celkem rozumně) chce vyhnout snapu a instalovat si i do starší verze Ubuntu aktuální Firefox, tak může buď použít "portable" verzi - ke stažení klasicky zde:
https://www.mozilla.org/cs/firefox/all/#product-desktop-release
a zde k nalezení návod pro použití s tím, že si lze pak udělat potřebné zástupce (tomu se tady věnovat nebudu)
https://support.mozilla.org/cs/kb/instalace-firefoxu-v-linuxu#w_install-firefox-deb-package-for-debian-based-distributions

Nebo stáhnout potřebný balík z repozitáře na Launchpad a instalovat ručně pomocí nejlépe např. apt, gdebi, Synaptic.
https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/pool/main/f/
název vypadá např.

--- Kód: ---firefox_123.0.1+build1-0ubuntu0.18.04.1~mt1_amd64.deb
--- Konec kódu ---
(velikost je cca 65MB)
a k tomu případně stáhnout balík jazykové lokalizace, který vypadá např. takto

--- Kód: ---firefox-locale-cs_123.0.1+build1-0ubuntu0.18.04.1~mt1_amd64.deb
--- Konec kódu ---
Podobně i u verze ESR.
Nevýhoda je, že by se toto, pro udržení aktuálnosti, muselo dokola opakovat, a tak by to mohlo mít smysl snad jen pro ESR verzi, která má podporu většinou déle, než rok - u šestitýdenního (i nižší někdy) cyklu klasické verze asi pěkný opruz.

Nakonec nejlépe tedy bude přidat repo pro Firefox do systému se současným zrušením snap priority. O tom pojednávají tato 2 vlákna:
https://askubuntu.com/questions/1399383/how-to-install-firefox-as-a-traditional-deb-package-without-snap-in-ubuntu-22/
a zdrojové:
https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04
Výtažek:

--- Citace ---Step 1: Uninstall the Firefox Snap:

--- Kód: ---sudo snap remove firefox
--- Konec kódu ---
Step 2: Create an APT keyring (if one doesn’t already exist):

--- Kód: ---sudo install -d -m 0755 /etc/apt/keyrings
--- Konec kódu ---
Step 3: Import the Mozilla APT repo signing key (if wget is missing install it first):

--- Kód: ---wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
--- Konec kódu ---
Step 4: Add the Mozilla signing key to your sources.list:

--- Kód: ---echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
--- Konec kódu ---
Step 5: Set the Firefox package priority to ensure Mozilla’s Deb version is always preferred. If you don’t do this the Ubuntu transition package could replace it, reinstalling the Firefox Snap:

--- Kód: ---echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla

--- Konec kódu ---
Step 6: Finally, install the Firefox DEB in Ubuntu:

--- Kód: ---sudo apt update && sudo apt install firefox
--- Konec kódu ---
Step 7 (Optional): To use a localised version of Firefox (i.e. the UI in a language other than American English) you need to install the corresponding language package, e.g., for French:

--- Kód: ---sudo apt install firefox-l10n-fr
--- Konec kódu ---
You can see a list of all available language packs by running apt-cache search firefox-l10n.
Once you’ve installed everything open the app launcher, click the Mozilla Firefox icon to open your new non-Snap Firefox build, and away you go. Pin the icon to the Ubuntu Dock if you need to.

--- Konce citace ---
Nebo alternativně (jiný způsob zadání, ale stejný princip) i s vrácením změn:

--- Citace ---
--- Kód: ---sudo add-apt-repository ppa:mozillateam/ppa
--- Konec kódu ---
Then, copy and paste the following code in a terminal in one go (don't copy-paste line by line) to prioritize the apt version of firefox over the snap version.

--- Kód: ---echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

Package: firefox
Pin: version 1:1snap1-0ubuntu2
Pin-Priority: -1
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

--- Konec kódu ---
Next, remove the snap version of firefox

--- Kód: ---sudo snap remove firefox
--- Konec kódu ---
If you see the following error,
error: cannot perform the following tasks:
- Remove data for snap "firefox" (1943) (unlinkat /var/snap/firefox/common/host-hunspell/en_ZA.dic: read-only file system)
Then run the following commands (source) to disable the hunspell service, and try removing Firefox snap once again.

--- Kód: ---sudo systemctl stop var-snap-firefox-common-host\\x2dhunspell.mount
sudo systemctl disable var-snap-firefox-common-host\\x2dhunspell.mount
sudo snap remove firefox

--- Konec kódu ---
Install Firefox with apt.

--- Kód: ---sudo apt update && sudo apt install firefox
--- Konec kódu ---
To ensure that unattended upgrades do not reinstall the snap version of Firefox, enter the following command. Alternatively, you can turn off unattended upgrades.

--- Kód: ---echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

--- Konec kódu ---

To undo these changes
Remove the firefox PPA.

--- Kód: ---sudo add-apt-repository -r ppa:mozillateam/ppa
--- Konec kódu ---
Remove the apt pin.

--- Kód: ---sudo rm -rf /etc/apt/preferences.d/mozilla-firefox
--- Konec kódu ---
Remove the apt version and reinstall snap.

--- Kód: ---sudo apt remove firefox && sudo snap install firefox
--- Konec kódu ---

--- Konce citace ---
Zde návod v češtině na Root.cz
https://www.root.cz/clanky/jak-do-ubuntu-vratit-klasicky-firefox-z-balicku-deb-a-odstranit-snap/

Pokud si uživatel nejprve všechny snapbalíky a celý systém snap zruší - o tom zde pojednávají nějaká vlákna a poděkování tímto uživateli Juwa - tak může rovnou přejít k části přidání repozitářů a instalaci, bez nutnosti odinstalovat snapbalík Firefox a vynucení priority.

--- Citace ---1. Open the Terminal
2. List all the snaps installed on your system with
--- Kód: ---snap list
--- Konec kódu ---
You will see something like this:

--- Kód: ---    Name                  Version                     Rev    Tracking         Publisher         Notes
    chromium              87.0.4280.141               1444   latest/stable    canonical✓        -
    core                  16-2.48.2                   10583  latest/stable    canonical✓        core
    core18                20201210                    1944   latest/stable    canonical✓        base
    emote                 1.3.0                       12     latest/stable    tom-james-watson  -
    gnome-3-28-1804       3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical✓        -
    gnome-3-34-1804       0+git.3556cb3               66     latest/stable    canonical✓        -
    gnome-system-monitor  3.36.0-12-g35f88a56d7       148    latest/stable/…  canonical✓        -
    gtk-common-themes     0.1-50-gf7627e4             1514   latest/stable/…  canonical✓        -
    snap-store            3.38.0-59-g494f078          518    latest/stable/…  canonical✓        -
    spotify               1.1.46.916.g416cacf1        43     latest/stable    spotify✓          -
    vlc                   3.0.11                      1700   latest/stable    videolan✓         -

--- Konec kódu ---
3. Remove each snap that you may have chosen to install using sudo snap remove <package>:

--- Kód: ---    sudo snap remove --purge chromium
    sudo snap remove --purge emote
    sudo snap remove --purge spotify
    sudo snap remove -- purge vlc

--- Konec kódu ---
4. Remove the core snaps in this order (your list may be slightly different):

--- Kód: ---    sudo snap remove --purge snap-store
    sudo snap remove --purge gtk-common-themes
    sudo snap remove --purge gnome-system-monitor
    sudo snap remove --purge gnome-3-34-1804
    sudo snap remove --purge gnome-3-28-1804
    sudo snap remove --purge core18
    sudo snap remove --purge snapd

--- Konec kódu ---
4.Verify there are no more snaps installed with
--- Kód: ---snap list
--- Konec kódu ---
You should see a message like this:

--- Kód: ---No snaps are installed yet. Try 'snap install hello-world'.
--- Konec kódu ---
5. Unmount the snap mount points with
--- Kód: ---sudo umount /snap/core/{point}
--- Konec kódu ---
, replacing {point} with the actual mount point. You can find the complete list using
--- Kód: ---df -h
--- Konec kódu ---
Note: In Ubuntu 20.10 (and newer) you only need to do this:
--- Kód: ---sudo umount /var/snap
--- Konec kódu ---
6.Remove snapd from your system with
--- Kód: ---sudo apt purge snapd
--- Konec kódu ---
7. Remove any snap-related directories that might remain:

--- Kód: ---    sudo rm -rf ~/snap
    sudo rm -rf /snap
    sudo rm -rf /var/snap
    sudo rm -rf /var/lib/snapd

--- Konec kódu ---
Your system will now be devoid of snaps.

--- Konce citace ---
Odkazy relevantní pro odstranění nebo hospodaření Snap:
https://askubuntu.com/questions/1309144/how-do-i-remove-all-snaps-and-snapd-preferably-with-a-single-command
https://www.debugpoint.com/remove-snap-ubuntu/
Uvolnění místa Snap:
https://forum.ubuntu.cz/index.php?topic=86190.msg581068#msg581068

Ventero:
Doplněno o návod na kompletní odstranění systému Snap.

Navigace

[0] Seznam témat

Přejít na plnou verzi