- 
      
- 
        Save rm77/1ef1ffd364fc99bc99b317c40e304ae0 to your computer and use it in GitHub Desktop. 
Revisions
- 
        jfeilbach revised this gist Nov 7, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Ubuntu 24.04 Firefox snap replacement I need a proper Firefox installation and not the snap version. The snap version does not work properly with Smart Cards. Although it seems to be possible to get it to work with smart cards it is extremely difficult and I don't care to try and make it work. This is not a tutorial on how to get your PIV or CAC to work. Also snaps suck. Canonical will heopfully abandon snaps in the future. ## Remove Snap Firefox ``` 
- 
        jfeilbach revised this gist Sep 2, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Ubuntu 24.04 Firefox snap replacement I need a proper Firefox installation and not the snap version. The snap version does not work properly with Smart Cards. Although it seems to be possible to get it to work with smart cards it is extremely difficult and I don't care to try and make it work. Also snaps suck. Canonical will heopfully abandon snaps in the future. ## Remove Snap Firefox ``` 
- 
        jfeilbach revised this gist Sep 2, 2024 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,7 +70,15 @@ Update your package list and install the Firefox .deb package: Taken from `https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions` On this page there are also instructions for installing Firefox from Mozilla builds. ## Migrate profile If you have been using Firefox snap version and would like to keep data in your user profile you can follow these steps. If you have never used snap Firefox on your install then you can skip this. You will need to have used the snap Firefox at least once for a Firefox user profile to have been created. ``` mkdir -p ~/.mozilla/firefox/ && cp -a ~/snap/firefox/common/.mozilla/firefox/* ~/.mozilla/firefox/ ``` ## Optional. Disable unattended upgrades. You may want to perform this step because this service might bring back the snap version of Firefox. Thanks Ubuntu. ``` sudo systemctl status unattended-upgrades 
- 
        jfeilbach revised this gist Sep 2, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,7 @@ sudo systemctl status unattended-upgrades In file `/etc/apt/apt.conf.d/20auto-upgrades` Change from enabled APT fucntions to disabled: ``` APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; 
- 
        jfeilbach revised this gist Aug 27, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ sudo snap disable firefox sudo snap remove --purge firefox ``` You will probably have leftover files in `/var/lib/snapd/seed/snaps` from the default Firefox install. You can manually remove them. I don't think there is a snap comand that will remove just the Firfox files. Be careful deleting stuff in this directory especially if you are stil using other snaps besides Firefox. You've been warned. ## Block future snap Firefox installs ``` 
- 
        jfeilbach revised this gist Aug 23, 2024 . 1 changed file with 15 additions and 10 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,13 +21,12 @@ Removed /etc/systemd/system/multi-user.target.wants/var-snap-firefox-common-host If this fails you might be able to do this... ``` sudo umount /var/snap/firefox/common/host-hunspell sudo snap disable firefox sudo snap remove --purge firefox ``` You will probably have leftover files in `/var/lib/snapd/seed/snaps` from the default Firefox install. You can manually remove them. I don't think there is a snap comand that will remove just the Firfox files. Be careful deleting stuff in this dorectory especially if you are stil using other snaps besides Firefox. You've been warned. ## Block future snap Firefox installs ``` sudo vim /etc/apt/preferences.d/firefox-no-snap @@ -39,17 +38,23 @@ Pin-Priority: -1 ## Install Firefox .deb package for Debian-based distributions To install the .deb package through the APT repository, do the following: Create a directory to store APT repository keys if it doesn't exist: ``` sudo install -d -m 0755 /etc/apt/keyrings ``` Import the Mozilla APT repository signing key: ``` wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null ``` If you do not have wget installed, you can install it with: `sudo apt-get install wget` The fingerprint should be `35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3`. You may check it with the following command: ``` gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}' ``` Next, add the Mozilla APT repository to your sources list: ``` 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 ``` Configure APT to prioritize packages from the Mozilla repository: ``` 
- 
        jfeilbach revised this gist Aug 23, 2024 . 1 changed file with 13 additions and 19 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,39 +37,33 @@ Pin-Priority: -1 ``` ## Install Firefox .deb package for Debian-based distributions To install the .deb package through the APT repository, do the following: Create a directory to store APT repository keys if it doesn't exist: `sudo install -d -m 0755 /etc/apt/keyrings` Import the Mozilla APT repository signing key: `wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null` If you do not have wget installed, you can install it with: sudo apt-get install wget The fingerprint should be `35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3`. You may check it with the following command: `gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'` Next, add the Mozilla APT repository to your sources list: `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` Configure APT to prioritize packages from the Mozilla repository: ``` echo ' Package: * Pin: origin packages.mozilla.org Pin-Priority: 1000 ' | sudo tee /etc/apt/preferences.d/mozilla ``` Update your package list and install the Firefox .deb package: `sudo apt-get update && sudo apt-get install firefox` Taken from `https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions` On this page there are also instructions for installing Firefox from Mozilla builds. ## Optional. Disable unattended upgrades. 
- 
        jfeilbach revised this gist Aug 23, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ # Ubuntu 24.04 Firefox snap replacement I need a proper Firefox installation and not the snap version. The snap version does not work properly with Smart Cards. Although it seems to be possible to get it to work with smart cards it is extremely difficult and I don't care to try and make it work. Also snaps suck. ## Remove Snap Firefox @@ -35,7 +36,7 @@ Pin: release o=Ubuntu* Pin-Priority: -1 ``` ## Install Firefox .deb package for Debian-based distributions To install the .deb package through the APT repository, do the following: 
- 
        jfeilbach renamed this gist Aug 23, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        jfeilbach created this gist Aug 23, 2024 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,92 @@ I need a proper Firefox installation and not the snap version. The snap version does not work properly with Smart Cards. Although it seems to be possible to get it to work with smart cards it is extremely difficult and I don't care to try and make it work. Also snaps suck. ## Remove Snap Firefox ``` sudo snap disable firefox sudo snap remove --purge firefox 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) ``` If you get this error verify that `/var/snap/firefox/common/host-hunspell` is mounted as an ext4 file system using `lsblk -fe7 -o+ro` ``` sudo systemctl stop var-snap-firefox-common-host\\x2dhunspell.mount sudo systemctl disable var-snap-firefox-common-host\\x2dhunspell.mount Removed /etc/systemd/system/default.target.wants/var-snap-firefox-common-host\x2dhunspell.mount. Removed /etc/systemd/system/multi-user.target.wants/var-snap-firefox-common-host\x2dhunspell.mount. ``` If this fails you might be able to do this... ``` sudo umount /var/snap/firefox/common/host-hunspell ``` ``` sudo snap disable firefox sudo snap remove --purge firefox ``` ## Block future snap Firefox installs ``` sudo vim /etc/apt/preferences.d/firefox-no-snap Package: firefox* Pin: release o=Ubuntu* Pin-Priority: -1 ``` ##Install Firefox .deb package for Debian-based distributions To install the .deb package through the APT repository, do the following: Create a directory to store APT repository keys if it doesn't exist: `sudo install -d -m 0755 /etc/apt/keyrings` Import the Mozilla APT repository signing key: `wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null` If you do not have wget installed, you can install it with: sudo apt-get install wget The fingerprint should be `35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3`. You may check it with the following command: `gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'` Next, add the Mozilla APT repository to your sources list: `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` Configure APT to prioritize packages from the Mozilla repository: ``` echo ' Package: * Pin: origin packages.mozilla.org Pin-Priority: 1000 ' | sudo tee /etc/apt/preferences.d/mozilla ``` Update your package list and install the Firefox .deb package: `sudo apt-get update && sudo apt-get install firefox` Taken from `https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions` On this page are also instructions for installing Firefox from Mozilla builds. ## Optional. Disable unattended upgrades. ``` sudo systemctl status unattended-upgrades sudo systemctl disable --now unattended-upgrades sudo systemctl status unattended-upgrades ``` In file `/etc/apt/apt.conf.d/20auto-upgrades` Change from enabled APT fucntions to disbled: ``` APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; ``` after it shoud look like this: ``` APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0"; ```