FirefoxNewVersion

上网、浏览、聊天、下载等
回复
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

FirefoxNewVersion

#1

帖子 oneleaf » 2005-12-10 22:08

FirefoxNewVersion
Installing Firefox from mozilla.org

For some reason, the mozilla.org build of Firefox is significantly faster than the default Ubuntu one. Firefox 1.5 is even faster, and has many new features. These instructions lead you through installing Firefox 1.5 final, but should also work for 1.0.7 or any other version.
Notes

*

You will no longer get automatic updates through the repositories (but firefox itself has a built into auto-updater).
*

The Totem video plugin doesn't seem to work with firefox 1.5. You may want to install package 'mozilla-mplayer' instead before you start.
*

You need package 'libstdc++5' installed.
*

If you are using scim-1.0.2 as your input method platform, firefox will crash on startup.
*

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. Please contact the author about this problem.. This is due to [WWW] this bug. To work round 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.org, 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.*


*

Rename your old profile:

cd
mv .mozilla .mozilla.ubuntu


*

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

sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox


*

Try it out: :-)

firefox


*

Restore your old data:

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


If you want to keep the original Ubuntu icon for firefox, enter this command:

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


This step must only be done after running firefox at least once and fully closing it.
*

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

firefox %s


*

Firefox 1.5 should now be installed and working properly. If for whatever reason you become unhappy with firefox 1.5 and would like to remove it, see the "Removing" section below for directions.

Restoring Extensions and Themes

In addition to restoring your settings, you can also restore your themes and extensions. As indicated above, this should only be done after running firox at least once an 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.ubuntu//firefox/profiles.ini .
cp -r ~/.mozilla.ubuntu//firefox/*.default .


*

Start firefox and try it out.

A dialog may appear indicating that one or more extensions and/or themes are not compatible. This is normal and firefox may be able to find updates for you.

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. (The author does not know 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
sudo dpkg-divert --rename --remove /usr/bin/firefox


*

Restore your old profile:

cd
mv .mozilla .mozilla-1.5
mv .mozilla.ubuntu .mozilla


*

(optional) Delete the firefox directory

sudo rm -r /opt/firefox


Installing Firefox as a debian package

It is nice to have a package (easier to upgrade, etc). There is an experimental package building tool at [WWW] http://kidsquid.com/programs/ubuntu/fir ... 386.tar.gz. It can automatically download the i386 version of Firefox 1.5 (or you can copy in your existing Firefox download), then it will create a .deb package for it. Follow the steps in the README to install the new package. Please do not distribute any files created by this tool, as copying may violate the Firefox copyright.


https://wiki.ubuntu.com/FirefoxNewVersion
Neoion
帖子: 111
注册时间: 2005-12-02 7:23

#2

帖子 Neoion » 2005-12-10 23:28

Firefox的新版本
从mozilla.org安装Firefox

处于某些原因,来自mozilla.org的firefox要比ubuntu默认安装的firefox快一些,firefox1.5则更快,并且含有包含一些新特性。下边的这份介绍将指引您安装最近版本的Firefox1.5final版,或者是来自mozilla的1.0.7及其他您想安装的版本。

注意:

*您将不再得到自动的升级提示(但是firefox已经内置了一个自动升级的组件)。
*您将发现Totem视频插件在1.5中不能继续工作,您或许想要安装mozilla-mplayer来在您安装1.5之前代替totem组件。
*您需要预先安装“libstdc++5”组件。
*如果您使用scim-1.0.2作为您的输入平台的话,firefox1.5会在开始的时候崩溃。
*在您每次启动firefox的时候或许会遇到两次(也许1次)提示firefox不能安装这个组件的因为在进行"Chrome Registration“时出现错误请联系该组件的发布者的错误对话框,这是由于已知的bug引起的,解决办法,在终端里输入:

sudo touch ~/firefox/extensions/talkback@mozilla.org/chrome.manifest


安装

首先,备份您的书签和设定:

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

在mozilla.org下载Firefox1.5 并在终端里转到您的下载目录。之后,假设我们将firefox安装到根目录下的firefox子目录中 (~/firefox)当前位于根目录下 输入如下代码:

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

安装您的扩展;并删除totem-mozilla插件,因为它看起来似乎从来没有在1.5下工作过:

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

重命名您之前旧版本的特性设置(profile):

cd
mv .mozilla .mozilla.ubuntu

确定您以前的firefox是linux默认安装的版本,并编辑/usr/bin下的新立得安装链接:

sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
sudo ln -s ~/firefox/firefox /usr/bin/firefox

现在试着启动firefox,在终端输入:

firefox

恢复您的备份数据:

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

如果您想保留ubuntu默认的firefox图标,输入:

sudo cp /usr/share/pixmaps/firefox.xpm ~/firefox/chrome/icons/default/default.xpm

注意:这个步骤必须在firefox正确启动并完全关闭后才可以运行。


要确认您的firefox1.5被其他程序默认使用,请在系统---->首选想---->首选应用程序菜单中,找到Web浏览器一项,将命令自定义为:

firefox %s

现在,firefox1.5应该已经安装到您的系统中,并可以正常工作了,无论什么原因,如果您并不满意firefox1.5的表现,并且想删除它,那么请查询删除那一节。


恢复扩展及 Themes

作为附加,重新使用您之前的设定,请确定您已经完整的运行并关闭了firefox1.5至少一次。

备份您现有的特性设置(profile):

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

安装您之前版本的特性设置(profile):

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

此时重新起动firefox,或许您会看到一个要求设定您的扩展的对话窗口,这是正常的,firefox将会自动为您查找扩展的升级程序。

升级

为了获取firefox特有的扩展或升级,您有三个选择(您只需选择其中一种):
上次由 Neoion 在 2005-12-11 6:21,总共编辑 3 次。
Neoion
帖子: 111
注册时间: 2005-12-02 7:23

#3

帖子 Neoion » 2005-12-10 23:46

1).更改~/firefox目录的属性,为您自己添加“写”权限,更改所有者属性,假设所有者为username,输入如下代码:

sudo chown -R username:username ~/firefox

这是唯一可以获得升级提示的方法,但是此方法在多用户系统下,有安全隐患,因此不建议使用。因为病毒或黑客程序可以以用户身份运行并取代~/firefox目录中的文件,进而威胁到系统中其他用户的安全。

2.)除方法1.)以外,我们还可以通过sudo命令在有升级出现的时候,得到所有升级补丁,您可以通过输入代码:

sudo firefox-safe-mode

来启动firefox的安全模式,然后在帮助菜单----->检查更新中安装所有升级,关闭firefox,然后再以普通用户身份重新起动firefox,请注意,在以sudo模式开启firefox的时候,不要浏览任何网页。(针对这个方法,发布者并不知道这个方法是否比方法1更安全)

3.)
第三个方法,是使用方法1,但是只在有升级需要的时候改变文件夹属性,平时保留firefox文件夹属于root,方法如下,在您想升级的时候,输入如下代码,此处假定用户名为username:

sudo chown -R username:username ~/firefox

然后正常打开firefox,帮助菜单--->检查更新,进行升级,一旦升级结束,您需要把firefox文件夹属性更改回原来的样子,输入如下代码:

sudo chown -R root:root ~/firefox

需要注意的是,在firefox更改文件夹属性的时候请不要浏览网页。


删除
上次由 Neoion 在 2005-12-11 6:22,总共编辑 1 次。
Neoion
帖子: 111
注册时间: 2005-12-02 7:23

#4

帖子 Neoion » 2005-12-10 23:54

恢复新得利链接:

sudo rm /usr/bin/firefox
sudo dpkg-divert --rename --remove /usr/bin/firefox

恢复您之前的特性设置(profile):

cd
mv .mozilla .mozilla-1.5
mv .mozilla.ubuntu .mozilla

附加选项 删除firefox目录

sudo rm -r ~/firefox



以debian软件包的形式安装firefox

以包的形式安装firefox是轻松方便的,这里提供一个已知的链接:

http://kidsquid.com/programs/ubuntu/fir ... 386.tar.gz.

它可以自动下载并安装for i386版本firefox1.5解压后,它会自动创建一个a.deb的安装包,按照README中的步骤,您可以自己安装,请不要发行任何通过此工具建立的软件包,因为那将违反firefox的版权
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#5

帖子 oneleaf » 2005-12-15 8:50

回复