Home > Bash Tip & Tricks, linux, UNIX TLC, xAppSoftware News > Installing Firefox 3.5 or Firefox 3.6 on Ubuntu

Installing Firefox 3.5 or Firefox 3.6 on Ubuntu

With the following script you can install Firefox (version 3.5  or version 3.6)  on your ubuntu box.

I have checked this script on ubuntu 8.10 umpc, Ubuntu 8.10 and Ubuntu 9.04. This script should also work with Ubuntu 9.10, If you use this script to install Firefox3.5/6 on Ubuntu 9.10 please leave a comment to this post.

As usual in each new installation you should add new repositories in /etc/apt/sources.list file thenyou shuould update the synaptic application and then you should install your totally new application.

To use this script you shall copy and paste it into a gedit window, then you shall save it as firefox_installer.sh, after open a terminal window and change the execution privelegies by typing the following command

# chmod +x firefox_installer.sh

now you can proceed with the installation (as sudoer) typing the following command:

# sudo ./firefox_installer.sh

and answering to each question.

Copy and paste the following script in gedit




#!/bin/bash

#

# Checking for root privileges

#

check_root_privileges()

{

   if [ ! "$UID" = "0" ]; then

    echo "[$LOGNAME] You need to be [root] to run this script."

    echo "You could login as root, or"

    echo "You could also try one of these: # sudo $0"

    echo " # su -c $0"

    exit 1

  fi

}

#

# Select the OS version

#

update_OS()

{

  PS3="Please select the OS version you are using:"

  options1="Ubuntu_9.10 Ubuntu_9.04 Ubuntu_8.10 Ubuntu_8.04"

  echo

  select opt in $options1 ; do

    case $opt in

      "Ubuntu_9.10")

       echo "deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu karmic main" >> /etc/apt/sources.list

       echo "deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu karmic main" >> /etc/apt/sources.list

    break

  ;;

    "Ubuntu_9.04")

      echo "deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main" >> /etc/apt/sources.list

      echo "deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main" >> /etc/apt/sources.list

    break

  ;;

    "Ubuntu_8.10")

      echo "deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu intrepid main" >> /etc/apt/sources.list

      echo "deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu intrepid main" >> /etc/apt/sources.list

    break

    ;;

    "Ubuntu_8.04")

      echo "deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu hardy main" >> /etc/apt/sources.list

      echo "deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu hardymain" >> /etc/apt/sources.list

    break

  ;;

    esac

  done

  echo $opt

}

#

# Starting the script

#

clear

firefox="3.5 3.6"

PS3="Select the version of firefox you want to install"

check_root_privileges

update_OS

apt-key adv keyserver keyserver.ubuntu.com recv-keys 247510BE

sudo apt-get update

select app in $firefox ; do

   case $app in

      "3.5")

          sudo apt-get install firefox-3.5

          break

          ;;

      "3.6")

          sudo apt-get install firefox-3.6

          break

         ;;

    esac

done

 

  1. No comments yet.
  1. No trackbacks yet.
*

Statistical data collected by Statpress SEOlution (blogcraft).