Skip to content

Instantly share code, notes, and snippets.

@bmcculley
Last active March 4, 2020 12:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmcculley/64c53117b9929cb1b75aa734aecbdad3 to your computer and use it in GitHub Desktop.
Save bmcculley/64c53117b9929cb1b75aa734aecbdad3 to your computer and use it in GitHub Desktop.
A script to automate the installation of the latest Firefox on Crostini.

Install Firefox Quantum on Crostini

On my Pixelbook cURL was already installed but check to make sure first.

curl -V

You should see some output like this:

curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 ...

If not you'll need to install it:

sudo apt-get install -y curl

Then from your home directory:

curl -sL https://git.io/fNbqF | bash -

At this point Firefox should be installed and you can start using it from the shelf or by typing firefox.

#!/bin/bash
# script that will install the latest firefox and create a shelf icon
# Run:
# curl -sL https://git.io/fNbqF | bash -
if [ $(dpkg-query -W -f='${Status}' bzip2 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
sudo apt-get install -y bzip2;
fi
if [ $(dpkg-query -W -f='${Status}' libdbus-glib-1-2 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
sudo apt-get install -y libdbus-glib-1-2;
fi
curl -sL "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" -o firefox.tar.bz2
tar -xjf firefox.tar.bz2
sudo mv firefox /opt/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
rm firefox.tar.bz2
sudo bash -c 'cat > /usr/share/applications/firefox.desktop << EOL
[Desktop Entry]
Name=Firefox
Comment=Browse the World Wide Web
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Exec=/opt/firefox/firefox %u
Type=Application
Categories=Network;WebBrowser;
EOL'
sudo chown root:root /usr/share/applications/firefox.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment