3

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.

  • Please explain what you mean by a "portable" version. As far as I can tell, your script simply downloads and installs firefox on the local machine. I take it you will simply be installing this on a pendrive? – terdon Jun 4 '14 at 13:58
  • maybe now it is clearer? – rubo77 Jun 4 '14 at 14:06
2

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

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – nc4pk Jun 4 '14 at 11:09
  • @tapped-out: I edited the Answer – rubo77 Jun 4 '14 at 11:53
  • Thanks for the edit to your question (and +1 to it) but the answer would be much better if you explained what the script actually does. Either by commenting your code or by describing the approach in your answer. – terdon Jun 4 '14 at 14:08
  • As I changed the sentence at the start by now? Or what do you mean? – rubo77 Jun 4 '14 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.