如何使应用程序出现在更新替代方案中?


16

我分别安装了Firefox Beta和Alpha通道,并在中拥有指向它们的桌面配置文件~/.local/share/applications。但是,系统将稳定的Firefox用作我的默认浏览器。(Firefox Beta一直使用,直到我弄乱了未列出的“系统设置”中的“默认应用程序”。)

我尝试运行sudo update-alternatives --config x-www-browser以手动更改它,但它只是识别Chromium和Firefox(稳定)并将它们显示为选择。

我该怎么做才能将自定义桌面配置文件~/.local/share/applications视为默认替代品?我想我可能不得不摆弄桌面配置文件,还是mimeinfo.cache或mimeapps.list?

运行Oneiric。

这是我创建的firefox-beta.desktop文件的内容:

[Desktop Entry]
Name=Firefox Beta
Exec=firefox-beta -P Beta -no-remote
Icon=firefox
Terminal=false
X-MultipleArgs=false
Type=Application
StartupNotify=true
StartupWMClass=Firefox
Categories=GNOME;GTK;Network;WebBrowser;
Comment[en_US]=Firefox Beta Channel
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;
Name[en_US]=Firefox Beta

[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox-beta -new-window about:blank
TargetEnvironment=Unity

Answers:


23

您正在寻找以下命令:

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /path/to/firefox-beta 100

这样会将/ path / to / firefox-beta添加到优先级为100的x-www-browser替代品中(自动切换到它,除非有其他优先级更高的东西)。然后,您可以update-alternatives --config照常使用。要删除它,请运行以下命令:

sudo update-alternatives --remove x-www-browser /path/to/firefox-beta

这将从x-www-browser的替代项中删除该特定条目。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.