Search This Blog

Sunday, January 15, 2006

Upgrading to firefox 1.5

My config : linux fc3 x86.

The Totem video plugin doesn't seem to work with firefox 1.5
Install package 'mozilla-mplayer' instead.

Also you need package 'libstdc++5' installed.

You may get an error dialog (twice) each time Firefox starts up saying Firefox could not install this item because of a failure in Chrome Registration.
This is a bug.
To work around do the following:-
sudo touch /opt/firefox/extensions/talkback@mozilla.org/chrome.manifest


Installing :
#>First, back up your bookmarks and settings:

cd ~/.mozilla/firefox/*.default
mkdir ~/Desktop/ffsettings
cp bookmarks.html cert8.db cookies.txt formhistory.dat key3.db signons.txt history.dat mimeTypes.rdf ~/Desktop/ffsettings

#>Download firefox-1.5.tar.gz from mozilla.com, and change to the directory you downloaded it to.

#>Install it to /opt/firefox:

sudo cp firefox-1.5.tar.gz /opt/
cd /opt
sudo tar xzvf firefox-1.5.tar.gz
sudo rm firefox-1.5.tar.gz

#>Link to your plugins (and remove totem-mozilla as it doesn't seem to work with Firefox 1.5):

cd /opt/firefox/plugins/
sudo ln -s /usr/lib/mozilla-firefox/plugins/* .
sudo rm libtotem_mozilla.*

#>Change to your home directory, and rename your old profile, leaving it as a backup (using the existing profile may cause problems with Firefox 1.5):

cd
mv .mozilla .mozilla.fc3

#>To ensure it is used as the default version, modify the symbolic link in /usr/bin:

mv /usr/bin/firefox /usr/bin/firefox.bak
sudo ln -s /opt/firefox/firefox /usr/bin/firefox

Restoring should only be done after running firefox at least once and fully closing it.

#>Restore your old data:

cd ~/Desktop/ffsettings
mv * ~/.mozilla/firefox/*.default

#>Restore your Searchplugins:

sudo cp -i --reply=no /usr/lib/firefox[-VER]/searchplugins/* /opt/firefox/searchplugins/
sudo cp -i --reply=no ~/.mozilla/firefox/*.default/search/* /opt/firefox/searchplugins/

#>If you want to keep the original fc3 icon for firefox, enter this command:

sudo cp /usr/share/pixmaps/firefox.png /opt/firefox/chrome/icons/default/default.png

#>To ensure that other programs use version 1.5 of firefox and not the old 1.07 version, go to Preferences -> More Preferences -> Preferred Applications in the System menu. For the "Web Browser" tab, choose "Custom" and then enter the command:

firefox %s


Restoring Extensions and Themes

this should only be done after running firefox at least once and fully closing it.

#> Backup the new profile (just in case):

cd ~/.mozilla/firefox
mkdir ff1.5
mv profiles.ini *.default ff1.5/

#> Restore your previous profile:

cp ~/.mozilla.fc3//firefox/profiles.ini .
cp -r ~/.mozilla.fc3//firefox/*.default .


Updating

To get firefox's own update/autoupdate to work at all, you have three choices (read them all and choose one):

#> Change the /opt/firefox directory to have 'write' permissions & ownership set for the user instead of the root. To change ownership, after installation type:

sudo chown -R username:username /opt/firefox

This is the only way to get update notification working, but doing this has security implications in a multi-user environment, and is not recommended: a virus or malicious program running as a user may now replace or corrupt the files in /opt/firefox, which would affect other users of the computer.

#> An alternative to the above method is to run firefox with sudo to get the updates. That is, when there is an update available, you would run sudo firefox -safe-mode (the safe-mode is an extra layer of protection since it will not load any extensions while running as sudo), install the update (Help -> Check for Updates...), close firefox, and then restart firefox as a normal user. You should NOT browse other websites while you are running firefox with sudo. (It is not known whether this method is any safer/more secure than the first method).

#> A third option, is to use method 1, but only for updates: Keep the firefox folder owned by root and use it normally until you need an update, then give your user ownership: sudo chown -R username:username /opt/firefox. Start firefox normally and update (Help -> Check for updates...). Once the update is completed, you should restore ownership to root: sudo chown -R root:root /opt/firefox. Again, do NOT browse other sites while firefox has these elevated permissions. This is probably the best option although it is also the most cumbersome.


Removing


#> Restore the symbolic link:

sudo rm /usr/bin/firefox
mv /usr/bin/firefox.bak /usr/bin/firefox

#> Restore your old profile:

cd
mv .mozilla .mozilla-1.5
mv .mozilla.fc3 .mozilla

#> (optional) Delete the firefox directory

sudo rm -r /opt/firefox

No comments: