Open Source

Linux newsreaders

What's the best way to view that information mecca you like to call a newsgroup? With a newsgroup reader, of course! In this Daily Feature, Larry Mintz rates the Linux newsreaders PAN, XEmacs, SLRN, and tin.


When you need help with your systems, many times you seek out your favorite newsgroup for divine inspiration and a quick solution. But what is the best way to view this mecca for information junkies? With one of the powerful, practical Linux newsgroup readers. In this Daily Feature, I’ll explain how to install several different newsreaders for Linux. I’ll give you a good feel for the XEmacs newsreader, PAN, SLRN, and tin, and then I’ll rate them on my scale of penguins.

XEmacs newsreader
The XEmacs referred to here is xemacs-21.1.4-1. To set up the newsreader, go to Options | Customize | Emacs | Applications | News | Gnus | Gnus Select Method. In the Address field, enter the name of your news server. Click the Save button.

Next, go to your home directory and look for lines in your .emacs file that look like these:
'(gnus-select-method '(nntp "news.<newsserver>.<com|org|net|>"))
'(gnus-check-new-newsgroups\, nil)
(custom-set-faces)
(setq gnus-nntp-server nil)


If these lines don't appear in the .emacs file, then add them, substituting the name of your news server for <newsserver>.<com|org|net>.

For example, if your server is tux.net, then these lines would be
'(gnus-select-method '(nntp "news.tux.net"))
'(gnus-check-news-newsgroup\, nil)

This is the minimum setup for the XEmacs newsreader. You can go to Options | Customize | Emacs | Applications | News | Gnus | NNTP Server and check off the options to customize it. Once again, you should go the .emacs file and make sure that the actual lines are added to the file.

Next, click on the News icon. A screen will appear with the GNU icon in a new window. To subscribe to individual newsgroups, choose Groups | Subscribe | Subscribe To A Group. Enter the name of the newsgroup to which you want to subscribe. XEmacs will give the prompt Group below the main window. To see messages on a newsgroup, highlight the name of the newsgroup and press [Enter]. XEmacs will prompt you for the number of threads to be shown.

Message posting on XEmacs is rather tricky. There are a lot of options, and I’ve found that some of them don’t work. The best method I’ve found is to choose the Post | Follow Up option for any message. For instance, a screen with that particular option looks like this (I x’d out the user’s e-mail address here to keep the user anonymous.):
Newsgroups:
Subject: Re: DSL
References: <39D7E143.683DB9DB@brightdsl.net>
slrn8tfs58.b99.xxxxxxx@localhost.localdomain
—text follows this line—
<Enter message here>


Then, choose the Message | Send Message option and send your message. If there’s no newsgroup name in the Newsgroup header, enter it in, or your message won't be sent.

When you’ve finished, choose Misc | Exit From Gnus to quit the newsreader. If you go to your home directory, you should see the following news files:
  • .newssrc-news.<newsserver>.<net|com|org>
  • .newssrc-news.<newserver>.<net|com|org>-dribble
  • .newssrc-news.<newserver>.<net|com|org>.eld
  • .newssrc.eld

The first file lists your newsgroup with the current threads and messages read for each newsgroup. Here’s a sample of mine:
sci.op-research!
comp.os.linux.answers!
alt.cyberpunk.movement:
alt.cyberpunk.tech:
sci.systems!
sci.space.science!
alt.religion.shamanism!
alt.magick.ethics:
alt.philosophy.zen: 1-2260
comp.lang.modula:
sci.math: 1-303,310,312,314,317,321,329,336,338-339,342,
<snip>


The next file is the dribble file, which is written in LISP. This is one of the configuration files used to load newsgroups, current threads, and message counts into the system. The difference between the first file in the list and the second is that the first is descriptive and the second is a configuration file. XEmacs occasionally asks to load this file into memory. The following is a sample of my dribble file:
(gnus-group-set-infomemory '("comp.lang.perl.tk" 3 ((1 . 9) 11)))
(gnus-group-change-level "alt.hackers" 3 9 "alt.anarchism" nil)
(gnus-group-set-info '("alt.hackers" 3 nil))
(gnus-group-set-info '("alt.hackers" 3 nil))
(gnus-group-set-info '("alt.hackers" 3 ((1 . 2))))
(gnus-group-set-info '("sci.math" 3 ((1 . 38) 55 67 (92 . 93) 234 449 461)))
<snip>


PAN
PAN is by far my favorite newsreader. It resembles FreeAgent under the Windows platform. It’s the one I’m using today. Previously, I used the XEmacs newsreader. I found XEmacs to be the runner-up to PAN as far as newsreaders are concerned.

The version of PAN I’m referring to here is PAN 0.8.0beta 5-1.This version requires gnome-libs-1.0.14 to install. The current version requires gnome-libs-1.0.16 or greater and libunicode to install. The current version is PAN 0.8.1 beta 5.

Setting up PAN is a snap. Upon booting PAN, you will be asked to create a group list for your news server. Answer Yes to the prompt, and PAN starts to upload all the news servers into its database. If you answer No to the prompt, you then have to choose Server | Get List Of All Groups to get it to load.

PAN is very customizable. It has a nice Log and Task Manager feature. The Task Manager allows you to kill newsgroups that take too long to load up. PAN uses the GNOME sound scheme, which is a nice feature. Another great feature is the ability to download whole groups for offline reading.

The method for reading, responding, and posting is nearly the same as with Free Agent for Windows. You simply highlight any newsgroup and press [Enter]. PAN then loads up the messages.

Another thing about PAN is that it installs some files onto your box. PAN creates a /home/users/.pan directory as well as three subdirectories: /data, /downloads, and /tmp. The /data subdirectory is the most interesting one. If you open it, you’ll see a number of database files marked .db and a sub-subdirectory labeled /<newsserver>. That’s where PAN stores all the newsgroup files. These files are not meant to be read or else they would have been put into a better format. Here’s one such file. It comes from the newsgroup alt.hackers.db.
<snip>
<8da8o4$sdm$1@news3.bu.edu>
0
15
0
0
2473
Re: ::: Cheating Workers out of Pay Now Business as Usual :::
petrich@netcom.com (Loren Petrich)
<38F7953F.70C4@columbia-center.org>
8d8668$d4ie$1@newssvr03-int.news.prodigy.com

<snip>


This is a cleaned-up version. If you look at the whole file, you’ll see that it is formatted in long lines.

SLRN
SLRN was the first independent newsreader I used outside of Netscape's News. It has a simple text-mode interface. As a newsreader, it’s quite simple to use, if you want to use a text-mode one. It can invoke the editor of your choice. The version I’m referring to is slrn -0.9.5.7.

Configuring it is quite easy. First, if you’re using ksh, you have to set the environmental variable NNTPSERVER=<newserver>.<net|org|com> in your .profile file.

Next, to invoke it for the first time, type the following at the prompt:
[root@goofy/]->slrn —create

Then the following will appear on your screen:
slrn 0,9.5.7(Jul 21 1999 14:38:46)
Reading startup file /usr/lib/slrn/slrn.rc
Using newssrc file .jnewssrc for server <server>.<net|org|com>
Connecting to host <server>.<net|org|com>...
Connecting to host Posting Ok.
—The next step may take a while if the NNTP connection is slow.—
Creating /home/goofy/.jnewsrc..............................
.......................................................
<snip>


You’ll end up with many rows of these dots!

To add newsgroups to a list, just type a anywhere in the program. By pressing the ? character, you get a Help menu that lists the key mapping for slrn. You can also customize slrn. The important information for customizing slrn is found in the slrn.rc file. The first two lines map servers to .newsrc files:
server goofy.net .jnewsrc-goofy
server news.goofy.net .jnewsrc-goofy


These lines map servers with users and passwords. If your news server requires passwords and usernames, use one of these three types of logins:
nnrpaccess "goofy" "pluto" "arf"
nnrpaccess "goofy" "pluto" "" % Prompt for password
nnrpaccess "goofy" "" "" % Prompt for
username and password

hostname "YOUR.HOSTNAME"
set username "pluto"

set realname "John Doe"
set replyto pluto@goofy.com
 Name of signature file to use
set signature "Got Game"


Use the set_mail_editor_command and post_editor_command and score_editor_command to change editors in slrn. The default values for these editors is JED and is set as:
set mail_editor_command "jed '%s' -g %d -tmp"
set post_editor_command "jed' -g %d -tmp"
set score_editor_command "jed '%s' -g %d -tmp"


The quotes around the %s are for single files, the %d is for line numbers, and the -g option is for showing the cursor.

You can change the color scheme in slrn. Use the color command to do this. For instance, to change the menu color, the command is
color menu "yellow" "blue"

You can also completely remap the keys using the setkey command. Thus, to remap a posting to a group, you could enter:
setkey group post 'p'

Tin
Another powerful newsreader with many options is tin. First, we’ll look at several initial start-up options. The version referred to here is pre-1.4.

To invoke tin for the first time, type the following at the prompt:
(root@dork\)->tin -r
which gives you the following readout:
tin pre-1.4 release 19990517("Psychonaut)[UNIX](c) Iain Lea
Connecting to <newsserver>.<net|org|com>
<newsserver>.<net|org|com> InterNetNews NNRP server INN 2.2.2 13 Dec-1999
(posting ok)
Reading groups from active file...\


This will create the newsgroup file .newsrc. To toggle color for tin on start-up, type:
(root@dork/)->tin -a -r

Next, you’ll see a blank screen. Use the [Goto] key to start entering newsgroups. The cursor will appear to be highlighted on a newsgroup. Choose any newsgroup and press [Enter] or click Subscribe. Then, tin starts loading the news. Once the articles are loaded into tin's database, you can scroll up and down the messages using the arrow keys. When you find a newsgroup that you like, press [Enter]. You can then read those threads at your leisure. To follow up on any threads, type followup. Type w to post new articles. To toggle color, type the & character.

If you have an active news file, you can invoke tin in other ways. To invoke tin using an alternative active news file, type
(root@dork/)->tin -f <file>

To invoke tin using ~/.newsrc, type
(root@dork/)->tin -n

Also, tin looks for your active news file in the /var/news/active directory. If this directory does not exist, you’ll have to create it. If tin doesn't find the active news file, it will exit and give you a message saying the /var/news/active/<file> contains no active newsgroups.

If you invoke tin after your news file is set up, it gives you these messages:
tin pre-1.4 release 19990517("Psychonaut)[UNIX](c) Iain Lea
Connecting to <newsserver>.<net|org|com>
<newsserver>.<net|org|com> InterNetNews NNRP server INN 2.2.2 13 Dec-1999
Reading input history file
Reading groups from active history file \


The last topic I want to discuss is the files that tin installs. If you go to your directory under ~/.tin, you’ll find that tin installs the following subdirectories: /.mail, /.news, and a ./save. These subdirectories are self-explanatory. There are also several files that tin installs: a posted file, a newsrctable file, the attributes and headers files, and the .inputhistory file. The .inputhistory file is not null, but it contains no characters, binary or otherwise. I find this very strange.

The newsrctable file is a configuration file. It has the following format:
<FQDN of newserver> <news source file name> <shortname>
Here is an example:
news.goofy.net .newsrc-goofy.net .newsrc


The attributes file is a configuration file for group attributes.

Wrap up
As far as text-based newsreaders go, I like SLRN better than tin because it’s easier and more attractive to use. SLRN is completely configurable. I found that tin couldn’t locate my active news file even when it was set in the proper directory. When I invoked SLRN with slrn -f news.dat, it ran fine. When I invoked tin with tin -f news.dat, it could not find any groups and crashed my system. I believe this could be a bug. So, as a text-mode newsreader, I give SLRN five penguins.

On the GUI side, PAN wins hands down. I also give it five penguins.

I hope that with this Daily Feature, I have demystified several newsreaders for you, and have made it easier for you to choose one that meets your needs.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.

Editor's Picks