Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
How can I switch Firefox versions?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,546 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
03-Jul-2009, 07:53 PM #1
How can I switch Firefox versions?
I recently installed Firefox 3.5, but when I click the Firefox icon, it still uses the default Ubuntu-version Firefox 3.0.11

How can I switch to Firefox 3.5?


3.5 installed in: /usr/lib/firefox-3.5
3.0.11 installed in: /usr/lib/firefox-3.0.11
__________________
404: Name Not Found
Don't PM me questions, that's what posts are for
My Favorite Editors: Windows: Crimson Editor | Mac: Smultron | Linux: gPHPEdit
epicfail101's Avatar
Computer Specs
Junior Member with 2 posts.
 
Join Date: Jul 2009
Experience: Advanced
03-Jul-2009, 10:19 PM #2
Uninstall the older version of firefox, and see if that works. If it doesnt work, uninstall firefox completely and reinstall in from scratch. When you reinstall it it should have the updated version.
lotuseclat79's Avatar
Distinguished Member with 14,984 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
04-Jul-2009, 07:49 AM #3
Hi namenotfound,

I happen to have your same setup for Firefox 3.0.11 and Firefox 3.5 in /usr/lib. Here is how I switch between them with just a minor setup in /usr/bin.

First, issue the commands:
$ which firefox
$ ls -lt `which firefox`
$ ls -lt /usr/binf/firefox*

What I do is an initial setup (which can be either Firefox 3.0.11 or Firefox 3.5):
1) Become root:
$ sudo -i
2) Goto /usr/bin
# cd /usr/bin
3) Create symbolic links to both Firefox 3.0.11 and Firefox 3.5:
# ln -s ../lib/firefox-3.0.11/firefox firefox-3.0
# ln -s ../lib/firefox-3.5/firefox firefox-3.5
4) Initialize one of the above as the default firefox executable:
# ln -s firefox-3.0 firefox
This initializes the firefox executable to Firefox 3.0.11
To initialize firefox to Firefox 3.5:
# ln -s firefox-3.5 firefox

Then re-execute the first three commands in this thread.

However, if firefox is already initialized to one or the other, you must first remove the symoblic link to firefox assuming you are located in /usr/bin as root:
# rm -f firefox

In order to switch between the two versions of Firefox, I execute a script to do it for me. There may be a residual bug with the environment variable, but in essence it does the switch between the Firefox versions, and the other aliases can compensate to correct the environment variable to the new version change.

-----------swff.sh------------------------------
#!/bin/bash
cd /home/ubuntu
unset firefox
if [ "$firefox" = "firefox-3.0" ]
then pushd /usr/bin
sudo rm firefox
sudo ln -s firefox-3.5 firefox
popd
elif [ "$firefox" = "firefox-3.5" ]
then pushd /usr/bin
sudo rm firefox
sudo ln -s firefox-3.0 firefox
popd
fi
firefox=`ls -lt /usr/bin/firefox | nawk '{print $10}'`
export firefox
#echo firefox=$firefox
exit 0
--------------------cut here-----------------------------------

I have the following aliases in my .bash_aliases file in my home directory:
alias ffv=''`ls -lt /usr/bin/firefox | nawk '{print $10}'`''
alias setff=''firefox=`ls -lt /usr/bin/firefox | nawk '{print $10}'`''
alias expff='export firefox'
alias swff='/home/ubuntu/Desktop/swff.sh; cd ~ubuntu; . .bashrc; setff; expff'

I then only have to execute:
$ swff
in order to switch between the two different versions of Firefox.

Note: It is important that once you change the .bash_aliases file that you execute the following command:
$ . .bashrc
in order to activate the above aliases.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,546 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
04-Jul-2009, 09:22 AM #4
Well I got Firefox 3.5 to be my default when I click the icon

However, I think I'm doing something wrong with your switch script, when I put $ swff in the terminal to switch versions, I get the following

Quote:
bash: swff: command not found
lotuseclat79's Avatar
Distinguished Member with 14,984 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
04-Jul-2009, 11:16 AM #5
Quote:
Originally Posted by namenotfound View Post
Well I got Firefox 3.5 to be my default when I click the icon

However, I think I'm doing something wrong with your switch script, when I put $ swff in the terminal to switch versions, I get the following
Hi namenotfound,

You have to be located in your home directory to do the following from the end of my previous post:
Note: It is important that once you change the .bash_aliases file that you execute the following command:
$ . .bashrc
in order to activate the above aliases.

Also, you have to make the script, swff.sh, executable with the following command:
$ chmod +x swff.sh

-- Tom

P.S. You do know, don't you?, that when I refer to $ swff, the $ is the prompt for a regular user account, and if you have done everything according to my post, you only need to type: swff
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,546 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
04-Jul-2009, 02:17 PM #6
Should I be placing the .bash_aliases file in /home? I have it in /home/MYNAME

I had to create one, it wasn't already created (in either directory)

I did the . .bashrc and chmod, and yeah I know about the "$" symbol

I'll try moving the file to /home when I get on my home computer and see if it works
__________________
404: Name Not Found
Don't PM me questions, that's what posts are for
My Favorite Editors: Windows: Crimson Editor | Mac: Smultron | Linux: gPHPEdit
lotuseclat79's Avatar
Distinguished Member with 14,984 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
05-Jul-2009, 06:36 AM #7
Quote:
Originally Posted by namenotfound View Post
Should I be placing the .bash_aliases file in /home? I have it in /home/MYNAME

I had to create one, it wasn't already created (in either directory)

I did the . .bashrc and chmod, and yeah I know about the "$" symbol

I'll try moving the file to /home when I get on my home computer and see if it works
Hi namenotfound,

Yes, the default .bashrc file usually refers to the .bash_aliases file with the following lines:
# ~/.bash_aliases, instead of adding them here directly.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases

~ is a way to refer to the /home/ubuntu (if you use the default user account) or as in your case since it appears you have setup a user account name MYNAME, to /home/MYNAME. Both the .bashrc file and .bash_aliases files are co-located in your home directory, i.e. in your case /home/MYNAME.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 01:40 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.