Getting started with the Tin newsreader

Legacy Reader


Spartan, but functional - the Tin newsreader does without optical gadgets and concentrates on core Usenet-related functionality.

By Andreas Kneib

Andrew Olscher, Fotolia

The Tin program is one of the oldest newsreaders around, and it is still an attractive program for today's users. The Tin newsreader takes some getting used to, but it does continue running when more recent tools have given up, and it performs well when you are working with the console or on machines that are low on resources. If you are looking for a program that manages your contacts and to-do list, includes a text editor with a spellchecker, will log you on to ICQ, and will make you a cup of coffee [1] while you're surfing Usenet, Tin is not what you need. On the other hand, if you are looking for a trusted tool that is custom-built for surfing Usenet, give Tin a try.

If your distribution does not include the Tin newsreader, which would be surprising, you can download the program from the project website [2]. The installation is fast and easy; check out the "Installing from the Source Code" box, for assistance.

If you type tin at the command line to launch the newsreader, you will probably get a disappointing message. The program will try to poll newsgroups locally from /usr/lib/news/active, which is unlikely to work. Tin will just quit if you don't run a news server or if your news server uses a different directory for file management.

To read Usenet groups, you need tin -r or rtin. The reader checks the $NNTPSERVER variable to discover the name of the news server to which it should connect. If this doesn't work, the reader checks the /etc/nntpserver file. To see whether the file actually contains an entry, you can enter cat /etc/nntpserver; or type echo $NNTPSERVER to view the content of the variable.

If the variable does not contain a hostname, add the following lines to the configuration file for your favorite shell (~/.bashrc, for example):

export NNTPSERVER=Newsserver.Provider.tld

Or you can pass in the name of an NNTP server when you launch Tin:

$ tin -g news_server.com

After Tin has connected to the server, you typically will see a selection of available newsgroups (Figure 1).

Figure 1: Tin showing a monochrome group overview.
Installing from the Source Code

The first step when installing from the source code is to unpack the tarball and change to the new directory this step creates, tin-1.8.3.

tar xvzf tin-current.tar.gz
cd tin-1.8.3

Next, check the optional parameters for the build. ./configure --help | less calls the help function and pipes the output to the less pager.

If you do not need any other parameters to install the newsreader in your home directory, you can just launch the configure script. The script will drop the program files into /usr/local.

To build the program, enter make build, then enter su and type your password to become root. Next, enter make install to install the binary and the man page in /usr/local/. To place the global configuration in the /etc/tin directory, enter the make install_sysdefs command. Tin is now ready for use.

Configuration

A list of keyboard shortcuts is at the bottom of the screen, including a note that you can press H for help. If you do so, you will see an overview of commands and functions. For example, pressing Shift+M takes you to a menu of User configurable options, or just the Options menu in more recent versions. To go there, close the help function by pressing Q and press Shift+M in the group overview. This takes you to a list of more than 120 settings.

Don't worry about the sheer numbers. For the time being, you only need a couple of options to set Tin up. After getting to know the newsreader better, you can go on to a more granular configuration. The first option you need to set concerns the settings for outgoing mail and news. Enter your mail address, followed by your first and last name in parentheses. Press Enter to open the line, enter the data, and press Enter again to confirm:

65. Mail address (and name): Username@Provider.tld (firstname familyname)

Because the number of configuration options continues to grow, this option is number 86 in version 1.9. If you fail to find the option, press / and search for a keyword. The arrow keys take you farther down through the menu until you find the MM_NETWORK_CHARSET entry. Again, press Enter to open the line and then press the Space bar to select the right character set for your machine, for example, ISO-8859-15 or UTF-8:

77. MM_NETWORK_CHARSET: ISO-8859-15

Finally, you need a parameter called Use ANSI colors in the color settings section. Again press Enter to open the line, and then press the Space bar to enable the color display. Tin will now use colors and the menu will give you another 20 or so options for setting up the colors. Pressing the & key will change back to the monochrome display at any time.

The User configurable options menu is not the only way to set up the newsreader. If needed, you can edit the ~/.tin/tinrc configuration file in an editor of your choice.

Reading the News

After setting Tin up with sensible values, the next step is reading groups and postings. Reading and subscribing to individual newsgroups is fairly simple - press Y to display all the groups on the server. To go directly to a specific newsgroup, press the / key to use the search function and type the group name in the search mask, comp.os.linux.x, for example. Tin supports wildcards such as the asterisk (*) in the search pattern.

To subscribe to this group and receive new postings at regular intervals, press S for subscribe. The next time you see the welcome screen, de.comp.os.unix.x11 will be shown in the group overview as well. The arrow keys let you select a group and read its entries. Pressing the Right arrow key changes to a thread overview for the newsgroup (Listing 1).

Listing 1: Thread Overview
1 + 6  9  X11 is slow     Loreley Linux
2 + 8 19  Laptop resolution    Tux Tuxson
3 + 5  8  Black screen of death  Thomas Terminal

The lines at this level show you the thread numbers in column 1, a plus sign for unread postings in the thread in column 2, the number of postings in column 3, the lines of the first article in the thread in column 4, the subject line in column 5, and the author of the original posting at the end.

Selecting a thread by pressing the Right arrow key takes you to the level below the thread; the columns tell you the number of the article within the thread, whether you have not read the article (i.e., a plus sign), and the line length; various arrows show the flow of the thread (Listing 2).

Listing 2: Below the Thread
1   [   8]  Black screen of death  Thomas Terminal
2 + [  10]  `->                Sebastian Shell
3 + [  17]    +->              Ernst Olaf Emacs
4 + [  30]    `->              Conrad Console
5 + [  24]      `->            Veronika Vim

Pressing the Right arrow key takes you down to the last level, which contains the individual postings (Figure 2). To navigate from one new article to the next, simply press Tab. However, it is more likely that you will want to contribute your own postings, and the next pitfall is just around the corner.

Figure 2: Tin showing an article with colored highlighting.

Editors Please!

To compose a new article for the selected newsgroup, press W (write). Pressing F (follow up) responds to a posting within the group. See Table 1 for some additional shortcuts.

Tin will now open the text editor set in your $EDITOR or $VISUAL environment variable. If the variables do not exist, the newsreader will launch the editor hiding behind your vi link (some kind of vi clone, such as Nvi, Vim, or Elvis). If you prefer not to use one of these editors, you might want to set up your shell configuration to use your favorite editor [3] via the variables mentioned above:

export EDITOR=<editor and options if needed>

Now that Tin knows which editor you prefer, there is nothing to stop you from posting on Usenet. However, you might see an Invalid Sender Header message after writing your article, and Tin will refuse to send your message to the news server because your machine does not have a fully qualified domain name (FQDN) [4]. The "FQDN" box explains how to resolve this issue.

FQDN

RFC 2822 (Internet Message Format) from April 2001 recommends that the hostname or domain name be used to establish a unique message ID. This only makes sense if the machine has a FQDN. The name is located in the /etc/hostname file; alternatively, you can type hostname -f to query the name.

The FQDN is made up of the labels at various domain levels, separated by dots - for example, www.linux-magazine.com, in which com is the top-level domain for companies and linux-magazine is the publishing company's domain.

A machine in the domain has a hostname of www. Many machines on private networks do not have a hostname for the Domain Name System to query. A name such as mycomputer.home is not a valid FQDN because you would be unable to locate the machine via DNS with this name.

Don't worry if you don't have a FQDN; many Internet service providers will give you one to ensure that everyone has the ability to contribute to Usenet.

Alternatively, you could become root, edit the /etc/tin.defaults file, and add a line for disable_sender=ON.

The Tin maintainers advise against doing this, and you should not use it unless you are absolutely sure that your provider's news server generates correct message IDs.

Conclusions

Besides the points I have looked at, Tin has many other capabilities, such as article scoring or X-header definitions. For the complete story, check out the man pages, which you can view by entering man tin or man 5 tin. The documentation in the program archive also contains useful information.

Overall, Tin still puts in a good performance in our age of graphical interfaces. The reader has everything you need for convenient reading of a medium that distinguishes itself from the world of Web 2.0 by virtue of its simplicity.

INFO
[1] Coffee.el: http://packages.debian.org/oldstable/editors/emacs-goodies-el
[2] Tin website: http://www.tin.org/
[3] Current, stable version of Tin: ftp://ftp.tin.org/pub/news/clients/tin/stable/tin-current.tar.gz
[4] FQDN article on Wikipedia: http://en.wikipedia.org/wiki/Fully_Qualified_Domain_Name