* Snownews 1.5.12

Snownews FAQ

Last updated: 2013-07-27

1. Configuration & Installation
1.1. How to compile on an unknown platform?
1.2. Why are you not using autoconf?
1.3. How can I open URLs in Mozilla browsers? Snownews puts single quotes around the URL which will make opening fail with the Lizard?
1.4. My Browser (Dillo) prints something on the console when is starts which messes up the interface.
1.5. How can I open links in browser XYZ under Mac OS X?
1.6. Dangerous default browser settings.
1.7. What's the charset Snownews uses to print text onto the screen?
1.8. How can I get full Unicode support?
2. Code
2.1. Why isn't there a full featured HTML renderer?
2.2. I really need to subscribe to HTTPS feeds
3. Feedback and bug reporting
3.1. Where to send fan emails and complaints?
3.2. What should I report?
3.3. What should I send in my bug report?
3.4. What's a tcpdump and how can I produce one?
4. Other stuff
4.1. Wtf is Santa Hunta?

1. Configuration & Installation

1.1. How to compile on an unknown platform?

If the configure scripts tells you that it doesn't know your system, there might be a chance that compiling fails. The code itself normally doesn't require any hacking if building fails. For different operating systems it's often just a question of adding the correct CFLAGS and LDFLAGS. You can edit them in the file platform_settings. If you've figured out a new one for a currently unknown system, I'd be happy to include it in the next release.

1.2. Why are you not using autoconf?

I really don't want to go into debating this all over again. Please do not contact me and demand autotools usage. I've decided against using it. If you have troubles compiling on a certain operating system, just let me know.

1.3. How can I open URLs in Mozilla browsers? Snownews puts single quotes around the URL which will make opening fail with the Lizard?

Use the following shell script and put the executable somewhere on your disk:

#!/bin/sh
URL=`echo $1|tr -d \'\"\)`
/PATH_TO/mozilla -remote "openURL($URL, new-tab)"quot;

Change Snownews' default browser to "scriptname %s". The single quotes around the URL ensure that no shell escapes or other nasty stuff is possible when you open an URL. Unfortunately it breaks with Mozilla. Alternatively you can use gnome-moz-remote which is also a wrapper for the Mozilla command line.

Another alternative for mozilla, use the following for the browser string:

echo %s | xargs -r -i -- mozilla -remote "openurl({}, new-window)"

Or you can just use backslash quoting:

firefox -remote openURL\(%s,new-window\)

avoids the need for an error-prone wrapper script.

1.4. My Browser (Dillo) prints something on the console when is starts which messes up the interface.

All program output on stderr is redirected to /dev/null when Snownews launches an external application. Some browser however print debug and errors to stdout. To get rid of this use "browser_name %s >/dev/null" as your default browser.

1.5. How can I open links in browser XYZ under Mac OS X?

Set the default browser to "open %s". This launches the system's default browser and opens the URL. Usually Safari or whatever you've set in the system preferences. Note: As of OS X 10.3 (I think) you can only set the default browser within Safari's preferences.

1.6. Dangerous default browser settings.

If you have been sent here by an error message when opening a link in Snownews, please read the description very carefully!

The default browser of Snownews is usually something like »command %s«. A shell will execute the command and pass the URL to it as an argument. %s will be replaced with the URL. There will be put single quotes around the URL string, before it is passed to the command. If an URL contains single quotes, Snownews will not allow opening it.

Example: You are using the default browser »lynx %s« and you open the URL »http://foo.bar/« from within snownews. The call that will be executed is »lynx 'http://foo.bar/'«.

A problem arises if you use single quotes in your browser string. This is needed to make it work with Mozilla/Firefox for example if you want to call the browser directly. You would normally use »mozilla -remote 'openURL(%s,new-tab)'« to make it work. If you inspect the command close you'll see the danger this imposes. It will be expanded to »mozilla -remote 'openURL('%s',new-tab)'«. %s is your URL again and since it is not protected by quotes anymore, the shell will execute any command in the URL after the semicolon. Imagine an URL "http://foo.bar/blah; rm -rf ~/". This will end up as »mozilla -remote 'openURL('http://foo.bar/blah; rm -rf ~/ ;',new-tab)'« which is then passed to a shell for execution. For the shell this looks like three seperate commands, first call the mozilla binary which will fail, because the options are not valid, then run "rm -rf ~/" to wipe the user's home directory. Needless to say that you really don't want this to happen. ;)

So once again: Never use single quotes in your browser string! Snownews will complain (as of version 1.5.3) if you open links with such a browser string.

1.7. What's the charset Snownews uses to print text onto the screen?

The used charset is determined by your locale setting. If that doesn't work, use the command line option "--charset" to override. Older versions defaulted to ISO-8859-1 or whatever charset was given via the configure script.

1.8. How can I get full Unicode support?

Snownews picks up the used charset from your terminal automatically. If that does not work use the "--charset UTF-8" command line option. You can use any charset, that iconv on your system understands (see "iconv --list").

If it doesn't work correctly you need to tweak a few things. Type "make clean" in snownews' code and run ./configure again. Before you run make edit the file "platform_settings" and find the string "-lncurses". Change that one to "-lncursesw". Compile and it should now work correctly.

Earlier versions had a compiled-in default. Run "./configure --charset=UTF-8" for this. This will link Snownews against libncursesw, make sure you have an ncurses with wide char support installed. If your configure script does not have that version the documentation above applies.

2. Code

2.1. Why isn't there a full featured HTML renderer?

I neither want to write, nor to maintain a (simple) HTML rendering engine. Snownews tries to remove all HTML elements from feed descriptions and converts some elements (like <p>,
tags) into newlines so that total HTML messes look readable. Decoding more complex structures like tables is beyond the scope of the implementation. RSS feeds are no replacement for webpages and authors should not expect the clients render their stuff via an HTML engine. If you have a feed that is just one big blob of text or otherwise totally unreadable, because of excessive HTML usage, you can report it to me and I can see if there is anything that can be done.

2.2. I really need to subscribe to HTTPS feeds

Snownews does not support HTTPS natively. This might change in the future, if I have the time to add it to the current version in C or maybe rewrite it in Go. You can get it to work nevertheless via filters. Subscribe to the feed via an external downloader like wget. To subscribe to the feed https://example.com/feed add the the following as a feed: "exec:wget -q -O - https://example.com/feed". See your download application's help for more details on how to use SSL with it.

You can, of course, combine this with additional filters in Snownews.

If the HTTPS feed you want to subscribe to also uses authentication you must let the download manager handle it. With wget you can either specify the login data in the URL itself as you would do in snownews or add the options "--http-user" and "--http-passwd" to wget’s command line. wget handles basic and digest authentication schemes. See your download manager’s documentation for details.

3. Feedback and bug reporting

3.1. Where to send fan emails and complaints?

Post them in this Wiki. (Kiza: Hmmm, wiki? There was a wiki?) I guess sending e-mail will do it.

3.2. What should I report?

Well, anything you want. ;) Quoting from the BUGS section in the manpage: "If you think you found a bug in Snownews, please report it. Anything that makes the program crash, regardless what you're doing is a bug and needs to be fixed." So crashbugs are a good candidate. The next FAQ entry provides details on how to send a useful bug report. If you do not provide the information mentioned there I'll likely respond by asking you to do so if I cannot easily reproduce the problem.

3.3. What should I send in my bug report?

That depends entirely on the bug itself. Obviously the operating system you're running on is an important thing. Also versions of libxml2 and ncurses. Below is a list with type of bugs and what I need to know. In all cases a detailed description about what you where doing is always helpful. For example "Started program, added feed http://foo, read an entry, returned to the main menu, reloaded the feed, crashed" is a good start.

Rendering/Display bugs

This is probably the most difficult thing to report as they can sometimes be difficult to reproduce. I need to know every little step to reproduce it. If you cannot reproduce it, tell me anyway what happened. Sending along a screenshot could be helpful and explain more than thousand words.

Problems with feeds

If you have a feed that does not work, send me its URL. Snownews logs errors from the XML parser to ~/.snownews/error.log. You can look at there to get an idea what may be wrong with the feed. Snownews uses libxml2 and will only parse "Well Formed" XML files (RSS feeds are XML) and "slightly" broken feeds. The parser will not forgive structural errors on the XML, but will tolerate wrong character encodings for example.

Crashes

If it is easy to reproduce, for example you add a certain feed and it crashes, send me the URL and it should be enough. However, I would really appreciate it if you could send me more information about the crash. Specifically a backtrace with gdb.

You have to compile Snownews yourself for this. Get the current version and enable debug compilation. Run ./configure in the source directory and after it is finished edit the file platform_settings. Find the line that starts with CFLAGS, remove the option "-O2" and add "-g" instead. Compile it with "make", but do not use "make install". Just leave it there once compiling is done.

After that in the same directory where you typed "make" run: gdb ./snownews

The GNU debugger (gdb) will start and put you at a prompt: (gdb) _

Type "run" there and crash the program. You will be back in the gdb shell. Then type "bt" at the prompt and send me all the output that follows.

This will tell me exactly what the program was doing when it crashed.

3.4. What's a tcpdump and how can I produce one?

If you have network related problems I'll most likely ask you to send a tcpdump of the connection. Here's how to generate such a dump.

The easiest tool for the job is [ethereal]. It's a point'n'click network analyzer and included with most Linuxes and BSDs. Ethereal must be run as root so you'll most likely want to start it by typing "sudo ethereal" in a console.

Once you have started it go to the menu "Capture" and click on "Options". In the first line, choose the network interface that connects you to the internet. For DSL users it's most likely "eth0", for dialup it's "ppp0".

In the box "Display options", check the boxes "Update list of packets in real time" and "Automatic scrolling in live capture". These options provide a bit more visual feedback while ethereal is capturing packets so you'll see immediately if it works fine. In the box "Name resolution" below check the box "Enable network name resolution". Click on the "Capture" button.

Let in run in the background and do whatever in Snownews that causes the problem. You should see a couple of lines scroll by in ethereal. If you're done reproducing the problem, click on "Stop" in ethereal. Now you need to find the connection Snownews<->Remote server in the list. If you found one piece of the conversation, right click on it and choose "Follow TCP stream".

You'll get a window that shows the conversation between Snownews and the remote server. Save this output to a file and send it to me.

4. Other stuff

4.1. Wtf is Santa Hunta?

Santa Hunta was the christmas easter egg of 2004. A mini arcade shoot'em up that was playable from Dec 24th through 26th. If you want to play again, crate a file santa_hunta "~/.snownews/santa_hunta" and go to the about screen in snownews.

<- back

FAQ & Support