Firefox Portable version on Linux?

12,323

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

Share:
12,323

Related videos on Youtube

rubo77
Author by

rubo77

Updated on September 18, 2022

Comments

  • rubo77
    rubo77 almost 2 years

    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.

    • terdon
      terdon about 10 years
      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?
    • rubo77
      rubo77 about 10 years
      maybe now it is clearer?
  • nc4pk
    nc4pk about 10 years
    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.
  • rubo77
    rubo77 about 10 years
    @tapped-out: I edited the Answer
  • terdon
    terdon about 10 years
    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.
  • rubo77
    rubo77 about 10 years
    As I changed the sentence at the start by now? Or what do you mean?