Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
a script that downloads a certain Firefox or Thunderbird version and installs it in an extra folder to create an independent and portable App for Linux. source:
# Configure the following default variables according to your requirements
language="en-US" # e.g. "de" or "en-US"
if [ ! "$1" ]; then
# default if no argument is set:
version="73.0" # chose from
application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary
if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
echo 'Usage: $0 [application] [version]'
echo Usage:
echo " for example"
echo " $0 mozilla 68.5.0esr"
echo ' -h --help display this help'
exit 0
if [ "$1" ] ; then
if [ "$2" ] ; then
echo result $0 $application $version
echo "This script downloads
$application Version $version
If you want to install another version press Ctrl+C and call this program with other options, for
example: $0 $application 68.5.0esr"
read -n1 -r -p "Press space to continue..." key
#for 32bit use the first line instead:
# or example for firefox nightly:
mkdir "$dir"
cd "$dir"
wget $url
echo "Extracting archive, please wait..."
tar xfj $file
rm $file
mv $application app
mkdir data
echo '#!/bin/sh' > "${application}-portable"
echo 'dir=${0%/*}' >> "${application}-portable"
echo 'if [ "$dir" = "$0" ]; then' >> "${application}-portable"
echo ' dir="."' >> "${application}-portable"
echo 'fi' >> "${application}-portable"
echo 'cd "$dir/app"' >> "${application}-portable"
echo './firefox --no-remote -profile ../data' >> "${application}-portable"
chmod +x "$application-portable"
echo ... finished
cat <<EOM
... finished
"#close all running instances of another $application version:"
killall $application
"#change into the directory"
"# and start the application there"
cd "$dir"

This comment has been minimized.

Copy link
Owner Author

rubo77 commented Jun 17, 2014

also could be used instead


This comment has been minimized.

Copy link

pdebski commented Dec 27, 2017

Looks like the download URL once again changed as described here:

Please use to retrieve the latest Thunderbird release.

For example, if you wish to download the US English installer for Windows (32bit)
the url is

This could be pasted into the location bar of a browser, or used with curl or wget, e.g.
wget -O ThunderbirdSetup.exe ""

For other operating systems replace 'os=win' with:
OS X os=osx
Linux x86_64 os=linux64
Linux i686 os=linux

For other languages replace 'lang=en-US' with:
Albanian lang=sq
Arabic lang=ar
Armenian lang=hy-AM
Asturian lang=ast
Basque lang=eu
Belarusian lang=be
Bengali (Bangladesh) lang=bn-BD
Breton lang=br
Bulgarian lang=bg
Catalan lang=ca
Chinese (Simplified) lang=zh-CN
Chinese (Traditional) lang=zh-TW
Croatian lang=hr
Czech lang=cs
Danish lang=da
Dutch lang=nl
English (British) lang=en-GB
Estonian lang=et
Finnish lang=fi
French lang=fr
Frisian lang=fy-NL
Gaelic (Scotland) lang=gd
Galician lang=gl
German lang=de
Greek lang=el
Hebrew lang=he
Hungarian lang=hu
Icelandic lang=is
Indonesian lang=id
Irish lang=ga-IE
Italian lang=it
Korean lang=ko
Lithuanian lang=lt
Lower Sorbian lang=dsb
Norwegian (Bokmål) lang=nb-NO
Norwegian (Nynorsk) lang=nn-NO
Polish lang=pl
Portuguese (Brazilian) lang=pt-BR
Portuguese (Portugal) lang=pt-PT
Punjabi (India) lang=pa-IN
Romanian lang=ro
Romansh lang=rm
Russian lang=ru
Serbian lang=sr
Sinhala lang=si
Slovak lang=sk
Slovenian lang=sl
Spanish (Argentina) lang=es-AR
Spanish (Spain) lang=es-ES
Swedish lang=sv-SE
Tamil (Sri Lanka) lang=ta-LK
Turkish lang=tr
Ukrainian lang=uk
Upper Sorbian lang=hsb
Vietnamese lang=vi
Welsh lang=cy

Mozilla Release Engineering


This comment has been minimized.

Copy link

pablorocka commented Feb 23, 2018

Thanks! very useful!!

One suggestion is to add --no-remote in the firefox command, so that you can run a separate instance if you are already running another version of firefox. so line 63 would be like this:

echo './firefox --no-remote -profile ../data' >> "${application}-portable"


This comment has been minimized.


This comment has been minimized.

Copy link
Owner Author

rubo77 commented Mar 2, 2020

I added --no-remote and also updated the script to use 64 bit and the latest firefox version by default.


This comment has been minimized.

Copy link

sxiii commented Mar 21, 2020

Hi @rubo77. Thanks for the script. I'm trying to download FF version around 3. Tried with 3.0, 3.5.1, 3.6; always get downloading errors like this:

Connecting to (||:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-03-21 12:07:27 ERROR 404: Not Found.

Extracting archive, please wait...
tar (child): 3.6-.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: cannot remove '3.6-.tar.bz2': No such file or directory
mv: cannot stat '3.6': No such file or directory

UPD: Answering myself. Have to fix URL to this for older versions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.