Google Chrome 如何更改konsole打开url的默认浏览器?

分享于 

3分钟阅读

ubuntu

  繁體

问题

在使用konsole时,所有链接都以konqueror打开,而不是google-chrome打开!

我尝试用以下方法设置默认浏览器:sudo update-alternatives --config 'x-www-browser'

谁知道在使用gnome时设置kde设置的方法?


grep 'chrome' ~/.local/share/applications/mimeapps.list



x-scheme-handler/http=google-chrome.desktop;firefox.desktop;


x-scheme-handler/https=google-chrome.desktop;firefox.desktop;


x-scheme-handler/http=google-chrome.desktop


x-scheme-handler/https=google-chrome.desktop


x-scheme-handler/chrome=firefox.desktop


text/html=google-chrome.desktop


application/x-extension-htm=google-chrome.desktop;firefox.desktop;


application/x-extension-html=google-chrome.desktop;firefox.desktop;


application/x-extension-shtml=google-chrome.desktop;firefox.desktop;


application/xhtml+xml=google-chrome.desktop;firefox.desktop;


application/x-extension-xhtml=google-chrome.desktop;firefox.desktop;


application/x-extension-xht=google-chrome.desktop;firefox.desktop;


x-scheme-handler/about=google-chrome.desktop


x-scheme-handler/unknown=google-chrome.desktop



grep 'chrome' /usr/share/applications/defaults.list



text/html=firefox.desktop;google-chrome.desktop


text/xml=firefox.desktop;google-chrome.desktop


application/xhtml_xml=google-chrome.desktop


x-scheme-handler/http=firefox.desktop;google-chrome.desktop


x-scheme-handler/https=firefox.desktop;google-chrome.desktop


x-scheme-handler/ftp=google-chrome.desktop



没有对konqueror的引用:


grep -i 'konqueror' /usr/share/applications/defaults.list


grep -i 'konqueror' ~/.local/share/applications/mimeapps.list


grep -i 'kon' /usr/share/applications/defaults.list


grep -i 'kon' ~/.local/share/applications/mimeapps.list




答案1

我遇到了在Ubuntu/Unity中运行konsole的问题,编辑了~/.kde/share/config/kdeglobals


[General]


BrowserApplication[$e]=!google-chrome



注销,登录-- 可以了!


答案2

传统方法称为$BROWSERmailcap文件。

但最近,许多图形程序已经开始依赖.desktop文件,并且有一组xdg-*工具用于操作和检索一些默认值。

尝试以下方法:


xdg-settings get default-web-browser



如果这显示konqueror


xdg-settings set default-web-browser google-chrome.desktop



它应该已经设置为xdg-settings



bro  浏览  CHR  chrome  DEF  URL