Linux System Administrator's Survival Guide lsg41.htm

Previous Page TOC Next Page



Chapter 41


Configuring Newsreaders trn and tin


A newsreader is a user interface to the newsgroups stored by a news download program such as NNTP or C News. Newsreaders let users read, print, save, and perform many other actions on newsgroups, including replying to an article. At the newsgroup level, newsreaders let users examine newsgroup lists and subjects, subscribe or unsubscribe to newsgroups, and generally manage their news access.

Newsreaders vary considerably from the simple to the very complex, from character-based to graphic, and from useful to atrocious. Many newsreaders are currently available with Linux distributions, and more newsreaders are appearing as programmers convert their favorite UNIX or DOS-based newsreaders to work under Linux.

Although this chapter can't look at every newsreader currently available, it can show you the basic configuration requirements for the most commonly used newsreaders. This information, coupled with the documentation that accompanies new newsreaders, should help you set up your Linux system for optimum behavior of the news system. Because most Linux systems are supplied with trn and tin (both threaded newsreaders), they are the primary packages that this short chapter examines.

Configuring trn


The trn newsreader is widely used by UNIX users. It is based on the classic newsreader rn (read news). The primary advantage to trn over rn is its capability to follow threads (articles that are related by subject). Most systems can run trn without any modifications to the files, unless they want to use threads.

To enable threads to be followed, trn needs to be able to construct a thread database that shows the interrelationships between articles. The trn newsreader relies on a program called mthreads (usually stored as /usr/local/bin/rn/mthreads) to help it create this database. The mthreads utility is best run in a crontab file at regular intervals (usually as often as you download full newsfeeds)., You can use trn without mthreads, but you cannot then follow threads.

Without any arguments, mthreads generates index files for the thread databases only for newly arriving articles in all newsgroups. To index all the newsgroups from scratch, issue the command:


mthreads all

This command examines the /usr/lib/news/active file and reindexes every newsgroup in that file.

If you want to index only a few newsgroups, you can supply the newsgroup names as arguments either in the crontab file or at the shell prompt. For example, the command


mthreads rec.auto.antique

reindexes the rec.auto.antique thread database. You can reindex more than one newsgroup at a time by separating the names with a comma. You can also force entire hierarchies to be reindexed by specifying only the hierarchical name. For example, the command


mthreads alt

reindexes all the alt newsgroups. To exclude certain newsgroups, preface them with an exclamation mark. For example, this command:


mthreads rec.auto,rec.audio,!rec.audio.tech

reindexes all the rec.auto newsgroups, as well as all the rec.audio newsgroups except rec.audio.tech.

If your site has very heavy news traffic, you can run mthreads in daemon mode. In daemon mode, mthreads doesn't have to be started at regular intervals and immediately processes arriving articles. However, it does take system resources away. To set mthreads in daemon mode, use the -d option. By default, mthreads checks the newsgroups every 10 minutes. You can place this command in the rc startup files, if you want.

Configuring tin


Unlike trn, the tin newsreader doesn't need to be told to reindex the thread databases at intervals. The tin newsreader generates the thread indexes every time a user enters a newsgroup. The reindexing is quite fast, unless the newsgroup has more than 500 articles or so.

When tin reindexes a newsgroup, it stores the index file under the user's home directory as .tin/index/newsgroup_name. The total size of all these index files can become quite large if a user reads a lot of newsgroups or if there are many users on the system. The easy way to prevent the growth of index files is to force tin to keep a single master index in one location that all users can access. To set up a single index, set the owner of tin to news with the following command (when you are in the tin directory, of course):


chown news.news tin

This way, tin stores the index files under /usr/spool/news/.index (or /var/spool/news/.index).

You can install a daemon called tind that keeps the index files constantly updated. Some versions of Linux supply the tind daemon source code, but few have a compiled version. You need a compiler and the make utility to build a version for your system.

Summary


Most newer newsreaders have simple configuration requirements that are explained in accompanying README files, although not all distributions of Linux offer any other newsreaders than tin and trn. A few add nn, which is also a threaded newsreader. X-based newsreaders vary in their quality and requirements, although a few distributions are offering a version of xrn (an X-based tn newsreader). For the most part, newsreaders require little interaction from a system administrator other than watching for excessive bloat in log files.

Previous Page Page Top TOC Next Page