xdg设置未在gentoo中设置default-web-browser [英] xdg-settings not setting default-web-browser in gentoo

查看:111
本文介绍了xdg设置未在gentoo中设置default-web-browser的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让xdg-open使用铬而不是Firefox打开URL.我注意到xdg-settings get default-web-browser当应为chromium-browser-chromium.desktop时返回chromium.desktop.

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.

按照说明此处我尝试了,它运行无误.但是,当我运行xdg-settings get default-web-browser时,它仍然显示chromium.desktop,而xdg-open "http://www.example.com"仍使用firefox.我已经确认存在/usr/share/applications/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.

目前,我已经创建了指向"chromium-browser-chromium.desktop"的"chromium.desktop"符号链接,但是很高兴知道为什么xdg-settings无法正常工作.

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.

推荐答案

xdg-*实用工具是相当简单的POSIX shell脚本,它们会尽最大努力以看似标准化的方式处理简单的常见DE任务.但事实是,每个DE都使用自己的工具和旋钮,并且每个安装都使用不同的工具和旋钮,因此在这种情况下,您似乎正在使用某些非标准的桌面环境,而这些差劲的实用程序无法处理这些环境.

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.

无论如何,如果要调试特定问题,请使用sh -vx(例如sh -vx /usr/bin/xdg-settings)运行这些脚本,它会准确告诉您这些脚本在做什么以及它们在什么时候失败.

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.

这篇关于xdg设置未在gentoo中设置default-web-browser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆