Linux – Firefox Portable version on Linux

firefoxlinuxportable-apps

As a developer, I need to test my sites and Add-Ons in different Firefox versions, so I need a Tool to create a firefox in a special folder with its own profile and data.

Also some customers need a certain Firefox version to run some old software that doesn't work with newer Firefox versions.

How do I create a Firefox Portable version from a certain Version for Linux?

I am looking for an install script, that does the whole trick, so I can install the desired version easily on several machines.

Best Answer

For Linux, I created a script that downloads a certain Firefox version and installs it in an extra folder.

I also host here: https://gist.github.com/rubo77/b999c1bc6d10ab802536

#!/bin/sh
# Configure the following variables according to your requirements

version="24.0" # chose from http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
language="en-US" # e.g. "de" or "en-US"

########################################################

application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary execution needs to be adapted as well see filenames at http://download.cdn.mozilla.net/pub/mozilla.org/

echo This script downloads "${application} Version ${version} If you want to install another version press Ctrl C and edit and configure this file"
read -n1 -r -p "Press space to continue..." key

file="${application}-${version}.tar.bz2"
url="http://download.cdn.mozilla.net/pub/mozilla.org/${application}/releases/${version}/linux-i686/${language}/${file}"
#e.g.

mkdir "${application}-portable"
cd "${application}-portable"
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 -profile ../data' >> "${application}-portable"

chmod +x "${application}-portable"
echo ... finished
echo "#close all running instances of another ${application} version:"
echo killall ${application}
echo "#change into the directory"
echo "# and start the application there"
echo cd "${application}-portable"
echo ./"${application}-portable"

I used this source: http://portableapps.com/node/16344

ToDo: maybe add a sterter with help of this page: http://wiki.ubuntuusers.de/Portable_Firefox