个人工具

“UbuntuHelp:FirefoxNewVersion”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的4个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/FirefoxNewVersion}}
 
{{From|https://help.ubuntu.com/community/FirefoxNewVersion}}
 
{{Languages|UbuntuHelp:FirefoxNewVersion}}
 
{{Languages|UbuntuHelp:FirefoxNewVersion}}
== Installing Firefox from Mozilla ==
+
== Introduction ==
This guide is for installing the Mozilla build of Firefox on Ubuntu. The Firefox in the Ubuntu repositories gets security updates and usually gets them quite quickly, but sometimes people prefer to get the updates straight from Mozilla or prefer the Mozilla build for other reasons.
+
When a new version of Firefox comes out, there is some delay until it can be downloaded and run. This page will explain how to install Firefox as soon as possible.
'''Warning:''' If you use this guide, ''do not remove the Ubuntu version of Firefox.'' Doing so will break the following packages: Yelp (help viewer), Epiphany, Gnome-app-install (Add Applications), Liferea, Blam and any application requiring the Gecko rendering engine.
+
The ''Check For Updates'' link in Firefox is disabled in Ubuntu. Firefox should only be updated through the [[UbuntuHelp:InstallingSoftware|package-management system]].
=== Notes ===
+
== Instructions for the impatient ==
* Updates for Firefox through the repositories will not apply to the Firefox you use after following this guide, but Firefox itself has a built-in auto-updater (see below for how that works).
+
'''Low difficulty, high safety''': these packages are maintained and fully tested by the Ubuntu Project
* The Totem video plugin doesn't may not work with certain versions of Firefox. You may want to install package ''mozilla-mplayer'' instead before you start.
+
* Hardy - Karmic: Coming Soon
* You need the package ''libstdc++5'' installed. If you need help look at the [[UbuntuHelp:InstallingSoftware|InstallingSoftware]] page.
+
{|border="1" cellspacing="0"
* This is for i386. If you are on amd64, there are some specific tips in [[UbuntuWiki:FirefoxAMD64FlashJava|FirefoxAMD64FlashJava]]
+
|https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconWarning3.png||This section explains how to install packages that ''have not been fully tested''. If you encounter bugs, please file against the [https://bugs.launchpad.net/ubuntu/+source/firefox firefox] package and tag PPA.
* If you are using scim-1.0.2 as your input method platform, Firefox will crash on startup. You may manually build Firefox to make both of them work. See [[SCIM]] and [[CompileFirefoxNewVersion]] for more information. If you don't know what SCIM is, you probably aren't using it - it is used for some non-English character sets only.
+
|}
* The Mozilla build will ''not'' be compiled from source. Rather, it comes with all libraries and system information and can run after being extracted. This guide will help you place it in the proper directory and with the correct paths.
+
=== Firefox-stable channel ===
=== Automated Install of the Latest Firefox ===
+
'''Medium difficulty, medium safety''': Firefox 3.6 completely replaces previous versions of Firefox and incompatibilities may arise.
The [[http://ubuntuzilla.sourceforge.net|Ubuntuzilla]] project maintains an automated script that backs up your Firefox profile, locates and downloads the latest Firefox release, allows you to select a locale, verifies download integrity with Mozilla Software Releases GPG signature, and installs Firefox into /opt/firefox with all the proper symlinks in /usr/bin.
+
Mozilla team made Firefox 3.6 available to Ubuntu community for testing.
In other words, it does everything this step-by-step tutorial does and more... but with less copying and pasting and more error checking.
+
<ol><li>Go to the [https://launchpad.net/~mozillateam/+archive/firefox-stable mozilla-team firefox-stable personal package archive].
Detailed usage instructions and more information are available on [[http://ubuntuzilla.sourceforge.net|Ubuntuzilla]] project site. 64-bit users, you'll need some extra 32-bit compatibility packages ([[http://ubuntuzilla.wiki.sourceforge.net/#usersof64bitubuntu|see this note for 64 bit users]]).
+
</li><li>Karmic 9.10 or later: Add '''ppa:mozillateam/firefox-stable''' to your system's Software Sources.
If you run into any problems with this script, or have feature requests, comments, suggestions, please feel free to post on the [[http://ubuntuforums.org/forumdisplay.php?f=251|Ubuntuzilla project forum]], now officially hosted on the Ubuntu forums in the [[http://ubuntuforums.org/forumdisplay.php?f=46|3rd Party Projects]] area.
+
</li><li>Jaunty 9.04 or earlier: Follow the [https://edge.launchpad.net/+help/soyuz/ppa-sources-list.html official instructions] on how to use software from a PPA.
=== Manual Install ===
+
</li><li>Install the package for the new version of Firefox (e.g. package name is ''firefox'')
* First, back up your bookmarks and settings:
+
</li><li>[[UbuntuWiki:MozillaTeam/Bugs|Report|any bugs]] that you experience - especially anything that previously worked, then stops working</li></ol>
<pre><nowiki>
+
cp -R ~/.mozilla ~/.mozilla.backup</nowiki></pre>
+
* Download Firefox from the [[http://www.getfirefox.com|Firefox website]], and change to the directory you downloaded it to.
+
* Install it to /opt/firefox (make sure the /opt directory exists first):
+
<pre><nowiki>
+
sudo tar -jxvf firefox-3.0.tar.bz2 -C /opt
+
rm firefox-3.0.tar.bz2</nowiki></pre>
+
* Link to your plugins and remove <code><nowiki>totem-mozilla</nowiki></code> as it doesn't seem to work with Firefox 1.5.x or 2.x:
+
<pre><nowiki>
+
sudo mv /opt/firefox/plugins /opt/firefox/plugins.bak
+
sudo ln -s /usr/lib/firefox/plugins /opt/firefox/plugins
+
sudo rm /usr/lib/firefox/plugins/libtotem_mozilla.*</nowiki></pre>
+
* To ensure it is used as the default version, modify the symbolic link in /usr/bin:
+
<pre><nowiki>
+
sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
+
sudo ln -s /opt/firefox/firefox /usr/bin/firefox</nowiki></pre>
+
The ''dpkg-divert'' command will move the original system-wide /usr/bin/firefox to a new name.
+
The ''ln'' command will place a symlink to the newly installed Firefox in /usr/bin.
+
* Try it out: :-)
+
<pre><nowiki>
+
firefox &</nowiki></pre>
+
*Running Firefox in terminal may cause errors to show but don't worry about that, it will still work once Firefox is restarted. The reason for these errors is because Firefox 3 is checking for updates, which is not abnormal activity. Also, running this command make take a some time to execute. Please be patient.
+
*If you want to keep the original Ubuntu icon for Firefox, enter this command:
+
<pre><nowiki>
+
sudo cp /usr/share/pixmaps/firefox.xpm /opt/firefox/chrome/icons/default/default.xpm</nowiki></pre>
+
Some users may find the icon with a different extension, they should use this command:
+
<pre><nowiki>
+
sudo cp /usr/share/pixmaps/firefox.png /opt/firefox/chrome/icons/default/default.xpm</nowiki></pre>
+
=== Install Updates for Mozilla Download of Firefox ===
+
Backup your profile with:
+
<pre><nowiki>
+
cp -R ~/.mozilla ~/.mozilla.backup.30x</nowiki></pre>
+
(You may also want to consider backing up the profiles of other users on the system as they will be affected by the upgrade too).
+
There are two ways you can update Firefox to the newest version:
+
==== Method 1 ====
+
To update firefox you can run Firefox from the terminal with <pre><nowiki>
+
gksudo firefox</nowiki></pre> Be sure to close any running version of Firefox first. Enter your password where prompted. Then check update ('''Help''' -> '''Check for updates...'''). If updates are found, apply the update and when it asks to restart, use the '''Restart''' option. When Firefox starts, you should see a Mozilla page confirming that you're using the latest version. Close Firefox and open it as a normal user (the way you usually open it). Firefox should now be updated to the newest version for all users. This way you don't have to change any file permissions and you won't forget to not change them back.
+
You must use the command ''gksudo firefox'' Do not use ''sudo firefox'' instead as it may give some files in your home directory root ownership and cause problems.
+
==== Method 2 ====
+
Close Firefox and give your user (yourself) file ownership: <pre><nowiki>sudo chown -R ${USER}:${USER} /opt/firefox
+
</nowiki></pre> Start Firefox normally and update (Help -> Check for updates...)  Once the update is completed, close Firefox and then '''restore ownership to root''':  
+
<pre><nowiki>
+
sudo chown -R root:root /opt/firefox</nowiki></pre>
+
Do '''not''' browse other sites while firefox has these elevated permissions, that is without changing back the ownership of /opt/firefox over to root. Such a practice is ''not safe''.
+
=== Removing ===
+
If for some reason you want to undo the installation and revert back to the standard Ubuntu Firefox, here's how:
+
* Restore the symbolic links:
+
<pre><nowiki>
+
sudo rm /usr/bin/firefox
+
sudo dpkg-divert --rename --remove /usr/bin/firefox</nowiki></pre>
+
* Restore your old profile:
+
<pre><nowiki>
+
mv ~/.mozilla ~/.mozilla.manual.download
+
mv ~/.mozilla.backup ~/.mozilla</nowiki></pre>
+
* (optional) Delete the firefox directory:
+
<pre><nowiki>
+
sudo rm -r /opt/firefox</nowiki></pre>
+
=== Installing Firefox (Quick and Dirty) ===
+
Some people are too lazy or too impatient to install Firefox the way it '''should''' be in Ubuntu (see section '''1'''). This section is '''not''' the proper installation method. It is also '''not safe''' compared to "Section 1". This current section is only for those too lazy and / or too impatient and / or need a quick fix to temporarily use a nightly Firefox trunk. Please note that if you follow this installation option instead of the others, you ''may'' have '''problems''' with some plugins. The instructions to install are basically: unzip, move existing profile, change file permissions, run. The instructions to update are basically: change file permissions, launch and update, change file permissions back. The instructions to uninstall are basically: change file permissions, delete its folder. During these instructions, do '''not''' use <code><nowiki>sudo</nowiki></code> except when apt-getting the prerequisite (dependency).
+
If you are following these instructions to try out Firefox 2.x alpha/beta, please make sure to backup your profile and use a new one if possible.
+
==== Installing Firefox (Quick and Dirty) ====
+
1. Install the prerequisite: '''You need package 'libstdc++5' installed'''.
+
  
<pre><nowiki>
+
== Installing versions of Firefox in testing ==
sudo apt-get install libstdc++5</nowiki></pre>
+
=== Security-testing packages ===
2. Download the tar.gz archive from the [[http://www.mozilla.org/|Mozilla]] site to /home/username (username is your own username; adjust to your settings).
+
'''Medium difficulty, medium safety''': security-testing packages are halfway through the quality-assurance process.  Although bugs are rare, no guarantees are given.
3. Untar to home:
+
Users of the most recent Ubuntu release can get new versions of Firefox a few days early from the semi-official ''ubuntu-mozilla-security'' archive.  This archive holds updates to the Mozilla suite (including Firefox) while they're tested for security and stability.
 +
To get packages that have not yet been tested for security:
 +
<ol><li>Go to the [https://edge.launchpad.net/~ubuntu-mozilla-security/+archive/ppa ubuntu-mozilla-security personal package archive].
 +
</li><li>Karmic 9.10 or later: Add '''ppa:ubuntu-mozilla-security/ppa''' to your system's Software Sources.
 +
</li><li>Jaunty 9.04 or earlier: Follow the [https://edge.launchpad.net/+help/soyuz/ppa-sources-list.html official instructions] on how to use software from a PPA.
 +
</li><li>Install the package for the new version of Firefox (e.g. this was ''firefox-3.5'' when Firefox 3.5 was being released)
 +
</li><li>A package without security testing will be made available a few days before general release
 +
</li><li>[[UbuntuWiki:MozillaTeam/Bugs|Report|any bugs]] that you experience - especially anything that previously worked, then stops working</li></ol>
  
<pre><nowiki>
+
=== Daily updates ===
cd
+
'''Medium difficulty, low safety''': daily packages have not undergone any quality assurance.  Daily packages are sometimes very safe, and sometimes don't work at all.
tar -jxvf firefox-3.0.tar.bz2</nowiki></pre>
+
Users of recent Ubuntu releases can get the latest development version of Firefox from the semi-official ''ubuntu-mozilla-daily'' archive.  This archive holds updates to the Mozilla suite (including Firefox) that are ''under active development'' - for example, ''preview versions of Firefox 3.6.2pre and 3.7a1,'' were available at the time of writing.  Although these packages will work well most of the time, you should expect crashes and other problems.  To get packages that are only half-finished:
4. Change permissions on the newly created directory
+
<ol><li>Go to the [https://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa ubuntu-mozilla-daily personal package archive].
 +
</li><li>Karmic 9.10 or later: Add '''ppa:ubuntu-mozilla-daily/ppa''' to your system's Software Sources.
 +
</li><li>Jaunty 9.04 or earlier: Follow the [https://edge.launchpad.net/+help/soyuz/ppa-sources-list.html official instructions] on how to use software from a PPA.
 +
</li><li>Install the package for the new version of Firefox (e.g. this was ''firefox-3.6'' when Firefox 3.6 was being released)
 +
</li><li>A snapshot of a recent development version will be available immediately
 +
</li><li>[[UbuntuWiki:MozillaTeam/Bugs|Report|any bugs]] that you experience
 +
</li><li>To stop the ubuntu-mozilla-daily PPA riding roughshod over the Official Repositories consider [http://ubuntuforums.org/showpost.php?p=8636047&postcount=36 Pinning].</li></ol>
  
<pre><nowiki>
+
As these packages install in their own directories and each use separate profiles, you can use 3.6/3.7 side by side.
chmod -R uog-w /home/username/firefox</nowiki></pre>
+
The new Firefox 3.6 will be found under the name "Namoroka Web Browser" and 3.7 under "Minefield 3.7 Web Browser" in Applications > Internet.
5. Back up your profile
+
This allows them to be distinguishable on the desktop and removes the need to alter any existing links.
 
+
== Installing from the Mozilla website ==
<pre><nowiki>
+
'''Medium difficulty, medium safety''': Sharing the same Firefox profile between different versions of Firefox (e.g., 3.0 and 3.5) may cause problems. As long as you avoid sharing a profile between versions (something which applies to all of the above methods, as well), Mozilla builds are safe to use, since they have undergone extensive QA prior to release.
cp -R ~/.mozilla ~/.mozilla.backup</nowiki></pre>
+
Please wait until the Ubuntu Mozilla Team make a stable version of Firefox available for your release. If you can't wait and want to use a Mozilla build of Firefox, see the [[UbuntuHelp:FirefoxNewVersion/MozillaBuilds|guide for installing Mozilla builds]].
6. Run Firefox.
+
== See Also ==
 
+
* This page was based largely on a [http://www.asoftsite.org/s9y/archives/160-FAQ-Where-can-I-get-firefox-3.5-for-Ubuntu.html blog post] by the head Ubuntu Firefox developer
<pre><nowiki>
+
* [http://www.asoftsite.org/s9y/archives/161-FAQ-Why-is-my-firefox-3.5-still-called-Shiretoko.html Another blog post] explains why new versions use codenames and different icons
cd /home/username/firefox/
+
./firefox</nowiki></pre>
+
That's all.
+
You can manipulate existing shortcuts to point to the newly installed Firefox, or create new shortcuts.  
+
==== Updating Firefox (If Installed Using Quick and Dirty guide) ====
+
1. Change permissions of Firefox so it can write to itself:
+
 
+
<pre><nowiki>
+
chown -R u+w /home/username/firefox</nowiki></pre>
+
2. Launch Firefox:
+
 
+
<pre><nowiki>
+
/home/username/firefox/firefox</nowiki></pre>
+
3. Go to Help > Check for updates and update as needed. As with any update, you may want to backup your profile beforehand.
+
4. Close Firefox.
+
5. Restore permissions:
+
 
+
<pre><nowiki>
+
chmod -R uog-w /home/username/firefox</nowiki></pre>
+
That's all.
+
==== Uninstalling Firefox (After a Quick and Dirty Install) ====
+
This is not too difficult:
+
1. Delete the Firefox directory
+
 
+
<pre><nowiki>
+
sudo rm -r ~/firefox</nowiki></pre>
+
2. Move your old profile back to its place:
+
 
+
<pre><nowiki>
+
mv ~/.mozilla ~/.mozilla.manual.download
+
mv ~/.mozilla.backup ~/.mozilla</nowiki></pre>
+
That's all.
+
=== References ===
+
* Discuss this page at http://ubuntuforums.org/showthread.php?t=79283
+
* Usefull information on font-sizes in the interface: http://www.mozilla.org/unix/dpi.html
+
----
+
[[category:CategoryDocumentation]]
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 22:21的最新版本

Introduction

When a new version of Firefox comes out, there is some delay until it can be downloaded and run. This page will explain how to install Firefox as soon as possible. The Check For Updates link in Firefox is disabled in Ubuntu. Firefox should only be updated through the package-management system.

Instructions for the impatient

Low difficulty, high safety: these packages are maintained and fully tested by the Ubuntu Project

  • Hardy - Karmic: Coming Soon
IconsPage?action=AttachFile&do=get&target=IconWarning3.png This section explains how to install packages that have not been fully tested. If you encounter bugs, please file against the firefox package and tag PPA.

Firefox-stable channel

Medium difficulty, medium safety: Firefox 3.6 completely replaces previous versions of Firefox and incompatibilities may arise. Mozilla team made Firefox 3.6 available to Ubuntu community for testing.

  1. Go to the mozilla-team firefox-stable personal package archive.
  2. Karmic 9.10 or later: Add ppa:mozillateam/firefox-stable to your system's Software Sources.
  3. Jaunty 9.04 or earlier: Follow the official instructions on how to use software from a PPA.
  4. Install the package for the new version of Firefox (e.g. package name is firefox)
  5. Report|any bugs that you experience - especially anything that previously worked, then stops working

Installing versions of Firefox in testing

Security-testing packages

Medium difficulty, medium safety: security-testing packages are halfway through the quality-assurance process. Although bugs are rare, no guarantees are given. Users of the most recent Ubuntu release can get new versions of Firefox a few days early from the semi-official ubuntu-mozilla-security archive. This archive holds updates to the Mozilla suite (including Firefox) while they're tested for security and stability. To get packages that have not yet been tested for security:

  1. Go to the ubuntu-mozilla-security personal package archive.
  2. Karmic 9.10 or later: Add ppa:ubuntu-mozilla-security/ppa to your system's Software Sources.
  3. Jaunty 9.04 or earlier: Follow the official instructions on how to use software from a PPA.
  4. Install the package for the new version of Firefox (e.g. this was firefox-3.5 when Firefox 3.5 was being released)
  5. A package without security testing will be made available a few days before general release
  6. Report|any bugs that you experience - especially anything that previously worked, then stops working

Daily updates

Medium difficulty, low safety: daily packages have not undergone any quality assurance. Daily packages are sometimes very safe, and sometimes don't work at all. Users of recent Ubuntu releases can get the latest development version of Firefox from the semi-official ubuntu-mozilla-daily archive. This archive holds updates to the Mozilla suite (including Firefox) that are under active development - for example, preview versions of Firefox 3.6.2pre and 3.7a1, were available at the time of writing. Although these packages will work well most of the time, you should expect crashes and other problems. To get packages that are only half-finished:

  1. Go to the ubuntu-mozilla-daily personal package archive.
  2. Karmic 9.10 or later: Add ppa:ubuntu-mozilla-daily/ppa to your system's Software Sources.
  3. Jaunty 9.04 or earlier: Follow the official instructions on how to use software from a PPA.
  4. Install the package for the new version of Firefox (e.g. this was firefox-3.6 when Firefox 3.6 was being released)
  5. A snapshot of a recent development version will be available immediately
  6. Report|any bugs that you experience
  7. To stop the ubuntu-mozilla-daily PPA riding roughshod over the Official Repositories consider Pinning.

As these packages install in their own directories and each use separate profiles, you can use 3.6/3.7 side by side. The new Firefox 3.6 will be found under the name "Namoroka Web Browser" and 3.7 under "Minefield 3.7 Web Browser" in Applications > Internet. This allows them to be distinguishable on the desktop and removes the need to alter any existing links.

Installing from the Mozilla website

Medium difficulty, medium safety: Sharing the same Firefox profile between different versions of Firefox (e.g., 3.0 and 3.5) may cause problems. As long as you avoid sharing a profile between versions (something which applies to all of the above methods, as well), Mozilla builds are safe to use, since they have undergone extensive QA prior to release. Please wait until the Ubuntu Mozilla Team make a stable version of Firefox available for your release. If you can't wait and want to use a Mozilla build of Firefox, see the guide for installing Mozilla builds.

See Also

  • This page was based largely on a blog post by the head Ubuntu Firefox developer
  • Another blog post explains why new versions use codenames and different icons