 | Distinguished Member with 2,526 posts. | | Join Date: Apr 2005 Location: New York Experience: no man can be my equal | | 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 | | Junior Member with 2 posts. | | Join Date: Jul 2009 Experience: Advanced | | 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. | | Distinguished Member with 14,836 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | 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 | | Distinguished Member with 2,526 posts. | | Join Date: Apr 2005 Location: New York Experience: no man can be my equal | | 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
| | | Distinguished Member with 14,836 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | Quote:
Originally Posted by namenotfound 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 | | Distinguished Member with 2,526 posts. | | Join Date: Apr 2005 Location: New York Experience: no man can be my equal | | 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 | | Distinguished Member with 14,836 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | Quote:
Originally Posted by namenotfound 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 |  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.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:38 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|