Cha*_*ist 10 user-default defaults debian firefox
如何将手动下载的 Firefox 设置为我的默认 Web 浏览器,以便单击另一个应用程序中的链接将在此 Firefox 中打开该链接?
我尝试了这些命令,但它们似乎不起作用:
update-alternatives --install /usr/bin/x-www-browser x-www-browser /home/user/firefox/firefox 100
update-alternatives --set x-www-browser /home/user/firefox/firefox
Run Code Online (Sandbox Code Playgroud)
我需要做什么?
update-alternatives
更改用于打开 Web 浏览器的应用程序,而不是用于打开网页的应用程序。两者没有直接关系:“我想浏览网页”与“我想浏览这个网页”不同,不同种类的内容碰巧都在网页浏览器中打开。
您需要更改的是哪个应用程序与MIME 类型 相关联text/html
,也可能是其他应用程序。这些是通过/etc/mailcap
文件配置的。
在 Debian 上,/etc/mailcap
由您安装的应用程序自动生成。当多个应用程序可以打开同一个类型时,就有了一个优先级系统(与替代优先级系统相似,但又不同)。您可以通过向 中添加条目来覆盖这些优先级/etc/mailcap.order
。例如,以下行将导致 Firefox 优先于它支持的所有类型的任何其他应用程序使用:
firefox:*/*
Run Code Online (Sandbox Code Playgroud)
更改后/etc/mailcap.order
,/usr/sbin/update-mime
以 root 身份运行以更新/etc/mailcap
。
如果您想使用不是来自 Debian 软件包的程序,请直接/etc/mailcap
在User Section
.
# ----- User Section Begins ----- #
text/html; /home/user/firefox/firefox '%s'; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html
# ----- User Section Ends ----- #
Run Code Online (Sandbox Code Playgroud)
如果要为自己的帐户设置首选项,请在 中定义它们~/.mailcap
:该文件中的条目覆盖/etc/mailcap
. 您必须在那里放置完整的 mailcap 行,例如
text/html; /home/user/firefox/firefox '%s'; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7560 次 |
最近记录: |