linux下安装Firefox

http://blog.csdn.net/pipisorry/article/details/39480227

一、ubuntu上升级firefox

一、重装升级

#修复或者只安装最新版本:

#apt-get --reinstall install packagename    #如果你的软件包被破坏了,或者你想要安装一个最新的软件

1. 如果您安装了Firefox 的早期开发版本。请先删除它:
sudo apt-get --purge remove firefox (清除式卸载)                       # -purge选项会删除掉Firefox原来的配置文件

Ubuntu 完全卸载Firefox 的办法

2. 添加Firefox稳定版PPA[安装Firefox stable版最合适的方法]
sudo add-apt-repository ppa:mozillateam/firefox-stable    #目前只适用于10.04

sudo add-apt-repository ppa:mozillateam/firefox-next      #这个源比the Mozilla Daily PPA好多了,因为他至提供alpha,beta,RC版本的,还是相对稳定的(要连网!)

sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa     #不要使用 Ubuntuzilla or the Mozilla Daily PPA,前者会对Firefox打一些补丁,不允许上报Firefox的bug,后者永远追新,不安稳

[UbuntuUpdates.org]

3. 更新软件列表
sudo apt-get update
4. 最后安装Firefox

apt-cache policy firefox    #看默认安装的版本

sudo apt-get install firefox     #=33.0+build2-0ubuntu0.14.04.1    根据policy中的版本选择,强制安装version33.0

用apt-get 安装软件包的时候,apt会从/etc/apt/sources.list里面将相应的软件包恢复出来,把它们存放在一个本地的文档库中(/var/cache/apt/archives/)然后才开始安装

或者:# apt-get -b source firefox=33.0

*下载的时候自动把源代码包编译:

$ apt-get -b source packagename    #可能是编译成.deb包

[ubuntu apt-get 总结 install xxx -d能下载安装包(含依赖)不安装]

[Ubuntu中用apt-get install安装特定版本的软件包]

[APT HOWTO (Obsolete Documentation)Chapter 3 - Managing packages]

5.firefox汉化

其实就是安上一个xpi,其实能显示中文,不汉化一样用.firefox扩展那个网站上搜索到的zh-cn.xpi安不上.特别是新版本的.
可以到这个页面去找: releases.mozilla.org/pub/mozilla.org/firefox/releases/
这个页面有firefox的各个版本,比如我现在用的是8.0进入8.0,选linux-i686,然后xpi,找到zh-cn.xpi,点击就可以安装了.
当然你也可以在linux-i686下进入zh-cn,源码安装里面的中文版.

·ubuntu 升级 FireFox

5. dash中打开firefox,并lock to lanuch

二、安装UbuntuZilla升级Firefox 

二、ubuntu上安装便捷版 firefox

和 Chrome 与 Opera 不同,Mozilla 的官方网站提供的 Firefox for Linux 并不是 deb 或 rpm 这样的安装包,而是一个 tar.bz2 的压缩文档。

把它下载下来,解压缩,你会在里面找到一个名字叫做 firefox 的文件(其实是一个可执行的 shell 脚本),就是真正的 firefox 可执行文件!

直接双击它(一般情况下系统会弹出一个对话框问你:firefox 是一个可执行的文本文件,你是要运行 firefox 还是显示它的内容?那么你就选择“运行”),新版的 firefox 就启动了,你可以直接把它拷在优盘里随身携带!


Firefox “整合” 到系统里(终端输入firefox finename.html,或者双击桌面上的图标,或者点击一个链接能直接使用 firefox 打开):
(1)把解压后的 firefox 目录移动到 /opt 目录,需要有系统管理员权限才能移动。

sudo su -
     mv /media/000.../firefox /opt
(2)删除 /usr/bin/firefox链接 文件(-f参数),再新建一个链接 /usr/bin/firefox ,链接到 /opt/firefox/firefox 。这也是需要系统管理员权限的
#sudo rm /usr/bin/firefox
 sudo ln -sf /opt/firefox5/firefox /usr/bin/firefox    =>使之在终端输入firefox能够调用正确的firefox程序
也可以手工操作:在 /opt/firefox/ 这个文件夹里,右键点击 firefox ,选择“创建链接”,然后把新生成的链接移到 /usr/bin/ 里面,重命名为 firefox ,就 OK 了。当然所有这些操作都得以管理员身份进行。

在linux桌面设置firefox启动器或者快捷方式

一、参见 【linux中设置桌面启动器(桌面快捷方式)】

解决启动器中火狐图标显示异常给Firefox创建一个快捷方式

打开终端,进入/usr/share/applications目录
sudo gedit firefox.desktop
在打开的文件编辑器中输入:

[Desktop Entry]  
Name=firefox  
Name[zh_CN]=火狐浏览器  
Comment=firefox  
Exec=/opt/firefox/firefox                           =>这个也不能出错
Icon=/opt/firefox/browser/icons/mozicon128.png      =>修改图标
Terminal=false  
Type=Application  
Categories=Application;  
Encoding=UTF-8  
StartupNotify=true
在Dash中找到火狐图标,然后拖动到启动器即可,或者看Applications--->Network里面是不是出来了图标,右键点击它,选择发送到面板或者桌面

二、
    cd /usr/share/applications  
    vi firefox.desktop  
然后在VI中编辑firefox.desktop文件内容如下(可以使用任何编辑器,比如nano或者gedit):
    [Desktop Entry]  
    Name=Firefox  
    Comment=火狐浏览器  
    GenericName=火狐浏览器-中国版  
    Exec=/usr/lib/firefox/firefox  
    Icon=/usr/lib/firefox/browser/icons/mozicon128.png  
    Terminal=false  
    Type=Application  
    Categories=Application;Network;  
保存退出后/usr/share/applications中就会出现Firefox的快捷方式,双击即可启动Firefox浏览器了。

可以将它复制到桌面或者固定到Unity的启动器中。


注:这样升级的火狐,因为没有在ubuntu的软件包管理器里面注册,所以不受软件包管理,不能通过系统升级来升级,但可以手动在软件中升级(要root权限运行)。

·Ubuntu中升级Firefox


ubuntu下解压Firefox后点击firefox没反应,提示没有为可执行文件文件类型安装应用程序

因为没有可执行权限,添加x权限:(若修改权限失败参见【 root执行/media可执行文件权限不够,chmod修改权限无效】)

root@ubuntu:~# cd /opt/firefox5
root@ubuntu:/opt/firefox5# ls -l firefox
-rw------- 1 pipi pipi 131904 Sep 18 13:23 firefox
root@ubuntu:/opt/firefox5# chmod +x firefox
root@ubuntu:/opt/firefox5# ls -l firefox
-rwx--x--x 1 pipi pipi 131904 Sep 18 13:23 firefox


双击文件系统中的html文件没反应

安装了这个绿色版的firefox(.tar解压出来而不是.deb安装文件)

但是右键不能将其添加为默认打开方式,每次都cd到安装目录下然后terminal下启动open文件太麻烦了


pipi@ubuntu:~/.local/share/applications$cd ~/.local/share/applications/
pipi@ubuntu:~/.local/share/applications$ls
mimeapps.list   userapp-Firefox-82HDMX.desktop
mimeinfo.cache  userapp-Firefox-UPJTMX.desktop
pipi@ubuntu:~/.local/share/applications$vim userapp-Firefox-82HDMX.desktop    修改=>Exec=/opt/firefox/firefox %u<pre name="code" class="plain">pipi@ubuntu:~/.local/share/applications$vim userapp-Firefox-UPJTMX.desktop    修改=>Exec=/opt/firefox/firefox %u
pipi@ubuntu:~/.local/share/applications$cat mimeapps.list                     这个可以查看个人文件关联
...
application/x-extension-html=userapp-Firefox-82HDMX.desktop;userapp-Firefox-UPJTMX.desktop;firefox.desktop;
...

从这可看出打开html文件与三个文件有关

个人文件关联  ~/.local/share/applications/mimeapps.list

[Default Applications] 下面就是默认打开方式

[Added Associations] 下面就是文件关联的程序

只要有相应程序的.desktop就行了...添加到对应的关联项里,.desktop程序都放在/usr/share/applications/ 目录下 没有相应程序的.desktop文件可以仿造一个cd 到/usr/share/applications/  下...随便打开一个比如gvim.desktop,参照格式自建一个

PS:

Use the Profile Manager to create and remove Firefox profiles

Firefox saves your personal information such as bookmarks, passwords, and user preferences in a set of files called yourprofile, which is stored in a separate location from the Firefox program files.

1 Starting the Profile Manager    Important: Before you can start the Profile Manager, Firefox must be completely closed.    #If Firefox is already included in your Linux distribution or if you have installed Firefox with the package manager of your Linux distribution:    Click the menu button and then click Exit

2 In Terminal run:   firefox -P    #windows“C:\Program Files\Mozilla Firefox\firefox.exe” -P “Profile Name”

#If the Profile Manager window does not open, Firefox may have been running in the background, even though it was not visible. Close all instances of Firefox or restart the computer and then try again.

    The Profile Manager allows you to create, remove, rename, and switch profiles.

    profiles文件相关信息保存在 /home/pi/.mozilla/firefox/profiles.ini文件中,添加信息就可以将任一个profile文件加入the Profile Manager中

    profiles文件默认保存在Path=76dxybld.default

3 Recovering important data from an old profile.

https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

4 Mozilla firefox的Profile目录的位置:

Windows 95/98/Me:C:\Windows\Application Data\Mozilla\Firefox\Profiles\\

Windows 2000/XP:C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\\

Windows Vista/7:C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\\

Linux/*nix:~/.mozilla/firefox//

copy /media/pi/softwares/LinuxInstalls/Internet/firefox/firefox_linux.default 到~/.mozilla/firefox//

修改profiles.ini : Path=firefox_linux.default

就可以使用原来保存的profiles

Mac OS X:~/Library/Mozilla/Firefox/Profiles//~/Library/Application Support/Firefox/Profiles//

5  可以从Windows下面拷贝到Linux下面去用

http://blog.cathayan.org/item/1534

相关插件:

addons manager 1.2.17     #by mozilla online limited

easy screenshot 1.2.3     #by mozilla online

Tab Improvement Lite 2.1.34.1     #by mozilla online

webpage translator 0.8 #[http://mozilla.com.cn/thread-52722-1-1.html]

firefox home page 0.10.18     #by mozilla online limited

Easy Access 1.1.3    # by mozilla online

flashplayerhttp://blog.csdn.net/zhyh1986/article/details/9674327

开机就自动启动火狐浏览器

右上方的菜单>启动应用程序>添加

名称:firefox

命令:/opt/firefox/firefox

重装firefox(放在/opt/firefox5/firefox中),将firefox原来所在路径/opt/firefox5/firefox中的目录改为/opt/firefox/firefox后双击html文件没反应

原因:系统路径(双击html文件,系统会自动到路径中寻找相应程序快捷方式)/usr/bin中记录的firefox快捷方式路径还是原来的,要修改成现在的

可以先查看终端输入的firefox在哪,type -a firefox

<span style="color:#CCCCCC;">root@ubuntu:/usr/bin#ls -l firefox
lrwxrwxrwx 1 root root 21 Sep 22 18:40 firefox -> /opt/firefox5/firefox

root@ubuntu:/usr/bin#ln -sf /opt/firefox/firefox firefox
root@ubuntu:/usr/bin#ls -l firefox
lrwxrwxrwx 1 root root 20 Oct  2 21:26 firefox -> /opt/firefox/firefox</span>
这样在当前普通用户终端输入firefox打开的是新下载的firefox

root用户终端输入firefox好像是包管理器安装版本的 Firefox(其实就是新下载的firefox,只是配置文件不一样,显示的跟普通用户不一样而已)

解决:/home/pipi/.mozilla/firefox覆盖复制到/root/.mozilla/firefox文件夹下修改profile.ini为一样就可以了,主要是*.default  profiles.ini两个文件(夹)导致firefox打开样子不同

<span style="color:#CCCCCC;">root@ubuntu:~/.mozilla/firefox#cat profiles.ini  
[General]  
StartWithLastProfile=1  

[Profile0]  
Name=default  
IsRelative=1  
Path=6oxwrmip.default   =>区别  

pipi@ubuntu:~/.mozilla/firefox$ls  
60houhar.default  Crash Reports  profiles.ini  
pipi@ubuntu:~/.mozilla/firefox$cat profiles.ini  
[General]  
StartWithLastProfile=1  

[Profile0]  
Name=default  
IsRelative=1  
Path=60houhar.default </span>

其它:

1.怎么可以重新安装firefox 每次升级都带有以前设置的痕迹,要原生的:

/home目录下面的.mozilla(一个隐藏文件夹)删除

2.如果放在有权限的目录, 会自动升级的...

3.便捷版相比之下第一个方法至少有三个优点:

(1)下载速度快。firefox 软件包大约有15M左右,ppa 蜗牛般的网速足以让你失去耐心。
(2)中文界面。通过 ppa 安装的 firefox 一定是英文的,你还得找中文语言包。
(3)不会覆盖老版本。通过 ppa 安装 firefox 肯定会把之前的版本覆盖掉。你可以在 /opt 目录下同时放 firefox4 (解压后重命名)和 firefox5 等文件夹,唯一要做的就是更改 /usr/bin/firefox 链接的目标。

4. firefox 下载页面:
中文官方网站:http://firefox.com.cn/
英文官方网站:http://www.mozilla.com/en-US/firefox/all.html

两者区别在于:中文网站下载的 firefox 会打上 “北京谋智技术网络有限公司”的标签,还会预先安装一堆扩展(可以拒绝安装)

6.下载的火狐无法固定到启动器上(可能看到固定上了,但是根本无法运行,似乎仍然指向的是已经卸载了的版本,并且图标似乎分辨率比较低,看起来比较模糊。),删除:/home/qiyo/.mozilla/目录,然后才能固定上。

再去修正Ubuntu启动器火狐图标显示异常的问题


from:http://blog.csdn.net/pipisorry/article/details/39480227

ref:support.mozilla在Linux中安装Firefox

Linux 设置文件默认打开方式

【介绍】Firefox 的安装

 


转载于:https://my.oschina.net/u/3579120/blog/1508223

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值