xdg-settings not setting default-web-browser in gentoo

陌路散爱 提交于 2019-12-11 03:06:02

问题


I'm trying to get xdg-open to using chromium to open urls instead of firefox. I noticed that xdg-settings get default-web-browser returns chromium.desktop when it should be chromium-browser-chromium.desktop.

Following the instructions here I tried xdg-settings set default-web-browser chromium-browser-chromium.desktop, which runs with no errors. However when I run xdg-settings get default-web-browser it stills shows chromium.desktop, and xdg-open "http://www.example.com" still uses firefox. I have confirmed that /usr/share/applications/chromium-browser-chromium.desktop is present. Rebooting the machine does not fix the problem.

For now, I've created a "chromium.desktop" sym-link to "chromium-browser-chromium.desktop", but it would be nice to know why xdg-settings is not working.


回答1:


xdg-* utilities are just quite simple POSIX shell scripts that try their best to handle simple common DE tasks in a seemingly standardized way. But the truth is, that every DE uses its own tools and knobs, and every installation uses different mix of them, so in this case it seems that you're using some non-standard desktop environment, which these poor utilities just cannot handle.

Anyway, if you want to debug your specific issue, run those scripts with sh -vx (eg. sh -vx /usr/bin/xdg-settings) and it will tell you exactly what those scripts are doing and at which point they fail.



来源:https://stackoverflow.com/questions/52209774/xdg-settings-not-setting-default-web-browser-in-gentoo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!