以常规用户身份获取此错误:
~$ xdg-open http://www.google.com/
xdg-open: no method available for opening 'http://www.google.com/'
~$
~$ xdg-mime query default text/html
~$代码来自/usr/bin/xdg-打开
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"chromium" ]; then
BROWSER=links2:elinks:links:lynx:w3m
if [ -n "$DISPLAY" ]; then
BROWSER=firefox:mozilla:epiphany:konqueror:chromium:google-chrome:$BROW$
fi
fi
open_envvar "$1"
exit_failure_operation_impossible "no method available for opening '$1'"
}操作系统: Ubuntu 16.04 Gnu/Linux
发布于 2020-04-11 15:49:03
MIME类型xdg对URI的开放使用是x-scheme-handler/,在您的例子中是x-scheme-handler/http和x-scheme-handler/https。您可以为那些使用所需.desktop文件的用户在
${XDG_CONFIG_HOME:-$HOME/.config}/mimeapps.list文件。
https://unix.stackexchange.com/questions/579409
复制相似问题