Firefox

From Leo's Notes
Last edited on 18 August 2023, at 21:08.

Running older versions of Firefox on Linux

Use this handy dandy script to automatically download and run a specific version of Firefox. This is used in my Dell Remote Access Controller page where the built-in web servers required older versions of SSL.

#!/bin/bash
# Credit to bmaupin. Original script from:
# https://gist.github.com/bmaupin/731fc12a178114883ff6e7195a133563

options=(
	"33.0 - Last version to support SSLv3 (https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/)"
	"51.0 - Last version to support NPAPI plugins (e.g. Java) (https://support.mozilla.org/en-US/kb/npapi-plugins)"
	"56.0 - Last version to support XPCOM- and XUL-based addons (https://blog.mozilla.org/addons/2016/11/23/add-ons-in-2017/)"
	"116.0 - Latest version of Firefox"
	"Quit"
)

echo "Please select an option:"
select v in "${options[@]}"
do
	firefox_version=${v%% *}
	case $firefox_version in
		"33.0")
			echo Selected ${options[0]}
			break
			;;
		"51.0")
			echo Selected ${options[1]}
			break
			;;
		"56.0")
			echo Selected ${options[2]}
			break
			;;
		"116.0")
			echo Selected ${options[3]}
			break
			;;
		"Quit")
			exit
			;;
		*) echo "Invalid option";;
	esac
done

# Get firefox
if [ ! -d firefox-$firefox_version ] ; then
	wget https://ftp.mozilla.org/pub/firefox/releases/$firefox_version/linux-x86_64/en-US/firefox-$firefox_version.tar.bz2

	tar -xvf firefox-$firefox_version.tar.bz2
	mv firefox firefox-$firefox_version
fi

cd firefox-$firefox_version

# No update check
if [ ! -d profile ] ; then
	mkdir profile
	
	# Disable automatic updates and default browser check
	echo "user_pref(\"app.update.enabled\", false);\nuser_pref(\"browser.shell.checkDefaultBrowser\", false);" > profile/user.js
fi

# Start firefox
./firefox --profile profile