= Newsboat FAQ
:toc: left
:sectnums:
:sectanchors:
:sectlinks:
:nofooter:

== I get errors like "`color01' is not a valid color"

Numbers that start with zero are treated as octal; starting with Newsboat
2.10, these are not allowed since
https://github.com/akrennmair/newsbeuter/issues/186[they only add confusion].

Convert octal numbers to decimal, and drop the leading zero. For example,
`color01` should be replaced with `color1`, `color016` with `color14` etc.

== I want to have a feed that contains all unread articles of all feeds

This is supported since Newsbeuter 0.7. All you need to do is add the following
line to your _urls_ file:

	"query:Unread Articles:unread = \"yes\""

For details, refer to the link:newsboat.html#_query_feeds[documentation on
query feeds].

== After I open a link in the browser, Newsboat stays unresponsive until the browser is closed

Newsboat has to behave like that in order to accommodate users of text-based
browsers like lynx and w3m. It has to relinquish the terminal and stay out of
the way, otherwise people won't be able to see their browsers.

If you're using a GUI browser like Firefox, you can do one of two things:

1. Start your browser beforehand. This way, Newsboat will only wait a fraction
   of a second (while a new tab is being opened).

2. Wrap your browser in a script and use the script as Newsboat's browser.
+
Put this in `~/bin/newsboat-browser.sh`:
+
    #/bin/sh
    /usr/bin/firefox "$@" &
+
Make it executable:
+
    $ chmod +x ~/bin/newsboat-browser.sh
+
Then add the following line to your Newsboat's config:
+
    browser "~/bin/newsboat-browser.sh"

== I can't connect to TT-RSS, Newsboat says: "Loading URLs from Tiny Tiny RSS...Authentication failed."

There are multiple reasons for this:

1. **wrong URL in `ttrss-url` setting, or wrong credentials**. Typos happen.
   Copy-and-paste the URL into the browser, then copy-and-paste the login and
   the password, and verify that they work;

2. **`ttrss-url` redirects somewhere**. Please use a URL that points directly
   at your TT-RSS instance, without any kind of HTTP redirects;

3. **double quotes not escaped in login and/or password**. Use `\"` instead of `"`;

4. **external API is disabled in TT-RSS**. You can enable it in user preferences;

5. **self-signed (or otherwise un-verifiable) SSL certificate**. If your TT-RSS
   instance is accessible from the Internet, consider
   https://letsencrypt.org/[Let's Encrypt]. It's a free and completely
   automated way to get a valid SSL certificate.
+
If you want to be your own CA, put your root certificate into a bundle
understood by cURL, save it somewhere, and set the `CURL_CA_BUNDLE` environment
variable with the path to the bundle.
+
Finally, if you understand what a "MITM attack" is, and are certain that it
can't happen in your setup, check out <<newsboat#_first_steps,a list of
Newsboat's configuration options>> for ways to entirely disable SSL
verification.

== Newsboat 2.18 complains that "Browser returned error code <some number>"

That Newsboat version misinterprets the browser's exit code. Please upgrade to
Newsboat 2.19 or newer.

If upgrading is not an option, wrap the browser in a script to hide its exit
code from Newsboat:

1. Put this in `~/bin/newsboat-browser.sh`:
+
    #/bin/sh
    /usr/bin/firefox "$@"
    exit 0
+
Replace `/usr/bin/firefox` with the path to your browser. The last line is the
important bit.

2. Make it executable:
+
    $ chmod +x ~/bin/newsboat-browser.sh

3. Add the following to your Newsboat's config:
+
    browser "~/bin/newsboat-browser.sh"

== Can't start browser (I'm using Newsboat's Snap package)

Newsboat's Snap uses strict confinement, so the only allowed browser is
`xdg-open`. Add the following to your Newsboat's config so that it can open
your default browser:

    browser "xdg-open %u"

== How can I fetch all items of the feed, not just the 10/15/100 latest ones?

You can't. Feeds only contain a few latest items, e.g. YouTube posts 15.

And no, `max-items` setting has nothing to do with this.

(Technically, this answer is a lie: https://www.ietf.org/rfc/rfc5005.txt[RFC
5005] describes a solution, but Newsboat doesn't implement it, and neither do
most publishers. https://github.com/newsboat/newsboat/issues/628[Get in touch]
if you'd like to add support to Newsboat.)

== How can I include tags when exporting to OPML?

In general, you can't. OPML is a hierarchy, i.e. each "category" is either
nested under some other category, or is at the root of the hierarchy. On the
other hand, Newsboat's tags are just labels, with no explicit relationships
between them. Since each feed can have multiple tags, it's not always possible
to represent the _urls_ file as a hierarchy. Thus, we don't even try.

However, if your feeds have one tag each, you can use
https://github.com/newsboat/newsboat/blob/master/contrib/exportOPMLWithTags.py[_contrib/exportOPMLWithTags.py_
script] which will do the job.
