• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which browser do you guys recommend?

#15
I thought I'd drop some code here,  in case you might want to run 2 versions of Firefox. I'm on Ubuntu 16.04, and running the old version 48. Your results may vary.

Code:
#!/bin/bash

#
# After running this script, you need to do some things:
#  1) Go to Firefox prefs and turn off updating
#  2) Make your home page http://dev
#  3) Install Firebug
#  4) Install FirePHP
#  

FFDIR=$HOME/Firefox
FF48="https://ftp.mozilla.org/pub/firefox/releases/48.0/linux-x86_64/en-US/firefox-48.0.tar.bz2"
FFPROFILE=$HOME/.mozilla/firefox/firefox48
LAUNCHER=$HOME/.local/share/applications/ff48.desktop

# Make sure Firefox directory in home directory
if [ ! -d $FFDIR ];
then
    mkdir $FFDIR
fi

cd $FFDIR

# Remove the old Firefox directory if it exists
if [ -d $FFDIR/Firefox-48.0 ];
then
    rm -rf $FFDIR/Firefox-48.0
fi

# If Firefox 48 archive doesn't exist, get it from Mozilla
if [ ! -f $FFDIR/firefox-48.0.tar.bz2 ];
then
    wget $FF48 -O firefox-48.0.tar.bz2
fi

# Extract Firefox 48 from the tar.bz2 file if it exists
if [ -f $FFDIR/firefox-48.0.tar.bz2 ];
then
    tar -xjf $FFDIR/firefox-48.0.tar.bz2

    # Rename the extracted firefox directory to Firefox-48.0 if it exists
    if [ -d $FFDIR/firefox ];
    then
        mv $FFDIR/firefox $HOME/Firefox/Firefox-48.0

        # Remove the old profile directory for Firefox 48
        if [ -d $FFPROFILE ];
        then
            rm -rf $FFPROFILE
        fi

        # Create the profile to be used
        firefox -CreateProfile "firefox48 $FFPROFILE"

        # Make sure the launcher exists
        touch $LAUNCHER

        # Rebuild the launcher
        printf "[Desktop Entry]\n" > $LAUNCHER
        printf "Version=1.0\n" >> $LAUNCHER
        printf "Type=Application\n" >> $LAUNCHER
        printf "Terminal=false\n" >> $LAUNCHER
        printf "Name=Firefox48\n" >> $LAUNCHER
        printf "Comment=Run firefox 48.0\n" >> $LAUNCHER
        printf "Exec=$FFDIR/Firefox-48.0/firefox -no-remote -P firefox48\n" >> $LAUNCHER
        printf "Icon=/usr/share/icons/HighContrast/48x48/apps/firefox.png\n" >> $LAUNCHER
        printf "Categories=Utility;\n" >> $LAUNCHER

        # Finished
        $FFDIR/Firefox-48.0/firefox -no-remote -P firefox48
    else
        printf "Extracted archive directory did not exist\n"
    fi
else
    printf "Archive did not exist\n"
fi
Reply


Messages In This Thread
RE: Which browser do you guys recommend? - by skunkbad - 04-29-2017, 01:39 PM
RE: Which browser do you guys recommend? - by Leo - 03-22-2018, 03:46 AM
RE: Which browser do you guys recommend? - by Leo - 03-12-2019, 12:51 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.