如何更改 Xubuntu/XFCE 中 http(s):// 链接的默认程序

Sel*_*vel 5 configuration browser mime-type xdg-open

我在 Xubuntu 上使用 XFCE。我希望我的默认浏览器是 Chromium。

“设置管理器”>“首选应用程序”中, Web 浏览器设置为 Chromium。

在 gconf-editor: 中/desktop/gnome/url-handlers/http/desktop/gnome/url-handlers/https command密钥设置为exo-open --launch WebBrowser %s. exo-open --launch WebBrowser https://google.com启动 Chromium。

note:~$ xdg-mime query default x-scheme-handler/http
chromium.desktop
note:~$ xdg-mime query default x-scheme-handler/https
chromium.desktop
Run Code Online (Sandbox Code Playgroud)

但是程序会用 Firefox 打开 http(s) 链接。例如,xdg-open https://google.com启动 Firefox。

我该如何解决?

UPD1:Chromium 设置:“Chromium 无法确定或设置默认浏览器。”

Zan*_*nna 7

使用update-alternatives --config x-www-browser以下命令更改默认浏览器:

$ update-alternatives --config x-www-browser

There are 2 choices for the alternative link group x-www-browser \
(providing /usr/bin/x-www-browser).

  Selection    Path                Priority        Status
------------------------------------------------------------
* 0            /usr/bin/firefox         50        auto mode
  1            /usr/bin/chromium        10       manual mode

Press <enter> to keep the current choice[*], or type selection number:
Run Code Online (Sandbox Code Playgroud)

当前选择有一个*. 只需按您要使用的浏览器的编号即可。在此示例中,我将键入1以将 Chromium 设为默认浏览器。

  • 就我而言,ubuntu 18.04,xfce 4.12,运行此不起作用,需要在字段“x-scheme-handler/http=chromium-browser.desktop x-scheme-handler”上编辑“~/.config/mimeapps.list” /https=chromium-browser.desktop` (2认同)
  • @Tiana987642 谢谢!我建议发布一个包含这些有用信息的新答案 (2认同)