-->

Previous | Table of Contents | Next

Page 185

Hour 12

Configuring Internet News

This hour shows you how to set up your Linux system to handle electronic newsgroups. You'll learn about Usenet news, the world's largest international electronic bulletin board. You'll also explore various programs you can use to read, post, and respond to Usenet posts or messages.

Reading Usenet News

This section introduces you to Usenet news and shows you how to set up and use the tin and slrn newsreader programs during your PPP connection. Reading news can be an endless source of amusement, help, and even frustration (especially if the "signal-to-noise" ratio is low).

Usenet newsgroups are organized in a hierarchy, usually by topic or type of discussion. For example, the Linux newsgroups are generally organized under the comp topic. Here is a partial list of Linux newsgroups:

comp.os.linux.announce

comp.os.linux.hardware

comp.os.linux.misc

comp.os.linux.networking

comp.os.linux.setup

comp.os.linux.x

Page 186

This shows that Linux subjects, such as setup, hardware, and X11 are organized under the topics of computers, operating systems, and Linux. You'll find many other subjects organized the same way.

Although there's no guarantee you'll find the exact subject you're looking for, chances are you'll easily find a newsgroup discussing a subject you're interested in.

Today, there are dozens of different Usenet software transport programs and newsreaders, and more than 30,000 different newsgroups.

All newsreaders offer the basic functions of

Both tin and slrn read a newsgroup index file called .newsrc, which is normally located in your home directory. Although you can start both tin and slrn, and tell the programs to retrieve a complete list of active newsgroups from your ISP's news server, you'll waste lots of time while the programs retrieve the list (nearly 30,000 at the time of this writing). Instead, create the .newsrc file with your favorite text editor, and then enter the newsgroups you want to browse, for example:


news.announce.newusers:

comp.os.linux.announce:

comp.os.linux.development.apps:

comp.os.linux.development.system:

comp.os.linux.hardware:

comp.os.linux.misc:

comp.os.linux.networking:

comp.os.linux.setup:

comp.os.linux.x:

comp.windows.x:

comp.windows.x.i386unix:

rec.autos.antique:

alt.humor.best-of-usenet:

rec.humor:

Notice that the list does not have to be in alphabetical order. You must have a colon following the newsgroup. If you type in a newsgroup not supported by your ISP, both tin and slrn will ignore the name, and both programs will display the list of newsgroups in the same order in which you typed them in the .newsrc file.

Developing your own list of newsgroups will speed up your newsreading considerably. Read on to learn more about tin and slrn.

Page 187

Reading Usenet News with the tin Newsreader

Iain Lea's news reader, tin, which is found under the /usr/bin directory, is a full-screen newsreader that reads a list of newsgroups from the .newsrc file in your home directory. The tin reader is easy to use (see Figure 12.1). You can navigate through its display with cursor keys, read messages with the Enter key, and reply with a single keystroke.

In order to read Usenet news with tin, you must tell the program the name of your ISP's NNTP, or news server. You should have received this information when you signed up for

Figure 12.1.
The tin newsreader
displays newsgroup
messages in a cursor-
driven list.


service. Once you have the name, you can tell tin the NNTP server name in at least two ways, one of which will work with tin and slrn.

First, make sure you're logged in as root. Then, using a text editor, either edit or create a file called nntpserver under the /etc directory. There's no special format to the file, and all you have to do is put in the name of the news server, for example:


# cat /etc/nntpserver

news.staffnet.com

Then, connect with your ISP, and call tin with this command line:


# tin -nqr

This tells the tin program that you want it to only load newsgroups from your .newsrc file, do a quick start without checking for any new newsgroups, and finally, to read your news

Page 188

remotely from your ISP's NNTP server. Once tin reads the groups, and gathers any new news, it will display the groups (see Figure 12.2). You can read a group by using the cursor to select a group, and hitting the Enter key.

You can also tell tin your ISP's NNTP server by using an environment variable, NNTPSERVER.

Figure 12.2.
Reading a newsgroup's messages
with the tin
newsreader.


Creating environment variables is discussed in Hour 6, "Using the Shell." One way to create the NNTPSERVER variable, if you always use the bash shell, is to log in as root, then edit a file named profile in the /etc directory. Enter the following into the file, and make sure the NNTPSERVER variable is placed in the export statement, for example:


NNTPSERVER='news.staffnet.com'

export NNTPSERVER

You can then try to read the variable into your environment with


# source /etc/profile

After trying to source this file, you can check for the NNTPSERVER variable by using the printenv command, or you can log out and log back in, and check again. Once you've defined NNTPSERVER, this will work for tin and slrn.

You can configure other aspects of tin, such as the default editor to use while posting or

Page 189

replying to messages. See the tinrc file under the .tin directory in your home directory for details, and read the tin manual page for the options.

Reading Usenet News with the slrn Newsreader

The slrn newsreader, by John E. Davis, found under the /usr/bin directory, is a newsreader like tin. But slrn has some nifty features not supported by the tin program:

Figure 12.3 shows the slrn screen.

Figure 12.3.
The slrn newsreader
features mouse-aware
menus and split-screen
viewing of messages
and message contents.


The slrn program features a split display once you're reading messages in a newsgroup. You can also run slrn without specifying an NNTPSERVER variable with the -h command-line option, for example:


# slrn -h news.staffnet.com

Previous | Table of Contents | Next