在新闻船中打开提要之后,我们可以选择使用o
键在浏览器中打开。
然而,当我按o键时,我得到了Browser returned error code 127
。
在线查看时,我被告知要将browser firefox
添加到新闻船的配置文件中。在其他地方,我被告知要添加browser "w3m %u"
。我试过这两种方法,但都不起作用,而且我仍然会发现上面的错误。
我能做些什么让o
在新闻船上工作呢?
我的操作系统是Ubuntu20.04。
$ which newsboat
/snap/bin/newsboat
$ echo $BROWSER
什么也不回
$ newsboat -v
newsboat r2.20.1-3-gb8c2a-dirty - https://newsboat.org/
Copyright (C) 2006-2015 Andreas Krennmair
Copyright (C) 2015-2020 Alexander Batischev
Copyright (C) 2006-2017 Newsbeuter contributors
Copyright (C) 2017-2020 Newsboat contributors
Newsboat is free software licensed under the MIT License.
(Type `/snap/newsboat/2764/usr/local/bin/newsboat -vv' to see the full text.)
It bundles:
- JSON for Modern C++ library, licensed under the MIT License: https://github.com/nlohmann/json
- optional-lite library, licensed under the Boost Software License: https://github.com/martinmoene/optional-lite
- expected-lite library, licensed under the Boost Software License: https://github.com/martinmoene/expected-lite
newsboat r2.20.1-3-gb8c2a-dirty
System: Linux 5.4.0-40-generic (x86_64)
Compiler: g++ 7.5.0
ncurses: ncurses 6.1.20180127 (compiled with 6.1)
libcurl: libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 (compiled with 7.58.0)
SQLite: 3.22.0 (compiled with 3.22.0) libxml2: compiled with 2.9.4
$ cat ~/.newsboat/config
cat: /home/user/.newsboat/config: No such file or directory
最后一个输出是因为我在目录~/snap/newsboat/2764/.newsboat/config
中进行了更改,当我输入其他配置行(如auto refresh
和refresh timer
)时,这个目录对我有用。所以也许这不是个问题?
发布于 2020-07-05 05:16:14
发布于 2021-02-08 03:42:05
可能有一个更优雅的答案,但由于我不想花太多时间在杂草上,一个对我有用的选择就是添加:
"browser "open -a safari '%u'"
..in配置文件。所有的功劳都归功于这个Reddit (https://www.reddit.com/r/newsboat/comments/ijm8yw/im_迷失_使用_浏览器/),它提供了一些想法和一些解释。
在Linux上(PopOS安装),添加了以下内容:
"browser "xdg-open '%u'"
发布于 2021-04-20 09:36:01
实际上并没有添加太多内容,但是将它添加到~/.newboat/config
中对我来说是有效的:
browser "$BROWSER %u"
显然,我的浏览器(目前是火狐)被设置为~/.profile
中的browser env变量。
https://askubuntu.com/questions/1256425
复制相似问题