# install firefox-latest (release) ## téléchargement, décompression ```shell ### user ### # on travaille dans le répertoire temp mkdir /tmp/xxxFirefox cd /tmp/xxxFirefox # Quelle architecture ? if [ "$(dpkg --print-architecture)" = "amd64" ]; then arch='linux64'; else arch='linux'; fi # on charge wget -O firefox-latest.fr.$arch.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=$arch&lang=fr" # on décompresse tar -xaf firefox-latest.fr.$arch.tar.bz2 # on efface le téléchargement rm firefox-latest.fr.$arch.tar.bz2 ``` ##lanceur desktop ```shell cat << "EOF" >> firefox-latest.desktop [Desktop Entry] Encoding=UTF-8 Name=Firefox latest Name[fr]=Firefox latest GenericName=Web Browser GenericName[fr]=Navigateur Web Comment=Browse the World Wide Web Comment[fr]=Naviguer sur le World Wide Web Type=Application Terminal=false Icon=/opt/firefox-latest/browser/icons/mozicon128.png StartupNotify=true Categories=Network;WebBrowser; X-GNOME-FullName=Firefox latest X-GNOME-FullName[fr]=Firefox latest Exec=/opt/firefox-latest/firefox -p firefox-latest -no-remote %u Terminal=false X-MultipleArgs=false Type=Application Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; StartupWMClass=Firefox-latest StartupNotify=true EOF ``` ## Vérifications ```shell # vérification si profil par défaut : ls ~/.mozilla/firefox/ # couramment, on doit voir: ##: Crash Reports profiles.ini user.default # vérification si un seul profil : cat ~/.mozilla/firefox/profiles.ini | grep --color -iE "\[Profile.?\]" # couramment on voit seulement [Profile], on incrémentera donc de 1, soit [Profile1]: # on copie le répertoire par défaut en firefox-latest (nouveau profil) cp -R ~/.mozilla/firefox/user.default/ ~/.mozilla/firefox/firefox-latest ``` ##un nouveau profil ajout au dernier profil existant ([Profile1] à modifier si besoin) ```shell cat << "EOF" >> ~/.mozilla/firefox/profiles.ini [Profile1] Name=firefox-latest IsRelative=1 Path=firefox-latest EOF ``` ## installation ```shell su # on crée /opt si inexistant mkdir /opt/firefox-latest # on déplace le répertoire de firefox mv firefox /opt//firefox-latest/ # on déplace le lanceur desktop mv -f firefox-latest.desktop /usr/share/applications/ # on sort du root exit # on retourne dans son home cd ~ # on supprime le répertoire temporaire rm -R /tmp/xxxFirefox/ ``` ## modification lanceur original **SI** firefox autre version installée et à conserver, **SINON** on bypasse cette portion ```shell su # on cherche la localisation du lanceur initial firefox installé localisation=$(find /usr/share/applications/ -name 'firefox*.desktop') # on affiche pour vérifier echo $localisation # std: /usr/share/applications/firefox-esr.desktop #SINON continer manuellement en analysant le pourquoi #on ajoute l'option d'appel permettant plusieurs sessions simultanées sur le lanceur originel sed -i "s/\(firefox-esr \)\(%u.*\)/\1-p firefox-latest -no-remote \2/" $localisation exit ``` ## update-alternatives : si adoption ```shell #A venir, si utile ``` ## désinstallation éventuelle de la version Debian ```shell su # on purge la version Debian, le profil intial étant copié dans latest-firefox apt purge firefox-esr-l10n-fr firefox-esr-l10n-fr ``` a faire # on purge la version Debian, le profil intial copié dans latest-firefox apt purge firefox-esr-l10n-fr firefox-esr-l10n-fr ``` ##########cp -R ~/.mozilla/firefox/user.default/ ~/.mozilla/firefox/test cat << "EOF" >> ~/.mozilla/firefox/profiles.ini [Profile2] Name=test IsRelative=1 Path=test EOF localisation="/usr/share/applications/firefox-esr.desktop"