Skip to content

Instantly share code, notes, and snippets.

@miry
Last active January 9, 2020 20:04
Show Gist options
  • Save miry/612aea5b9887c8aad18f9a1d271093b6 to your computer and use it in GitHub Desktop.
Save miry/612aea5b9887c8aad18f9a1d271093b6 to your computer and use it in GitHub Desktop.
Linux: Install or upgrade firefox developer edition.
#!/usr/bin/env bash
set -euxo pipefail
FIREFOX_DIR="$HOME/bin"
rm -fr "${FIREFOX_DIR}/firefox"
# Cache version with wget
# wget https://download.mozilla.org/\?product\=firefox-devedition-latest-ssl\&os\=linux64\&lang\=en-US -O ~/tmp/firefox.tar.bz2
# tar xjf ~/tmp/firefox.tar.bz2 -C "${FIREFOX_DIR}"
curl -L https://download.mozilla.org/\?product\=firefox-devedition-latest-ssl\&os\=linux64\&lang\=en-US | \
tar xj -C "${FIREFOX_DIR}"
# Gnome
mkdir -p $HOME/.local/share/applications/
cat <<EOF > $HOME/.local/share/applications/firefox-developer-edition.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
Comment=Browse the Web
Exec=$HOME/bin/firefox/firefox %u
Icon=$HOME/bin/firefox/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
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;
StartupNotify=true
StartupWMClass=Firefox Developer Edition
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Exec=${HOME}/bin/firefox/firefox --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
Exec=${HOME}/bin/firefox/firefox --private-window %u
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment