
Russ Allbery
April 10, 1995
trn is a news reader: a program that lets you read and respond to messages that have been organized into newsgroups. Each newsgroup is focused on a particular topic, and people from all over the world post information, comments, and discussion. Newsgroups are collectively referred to as Usenet. Using trn, you can select which newsgroups you want to read, organize the articles in a coherent fashion, read and respond to them, and filter out articles that you don't want to read.
In the following instructions, commands that should be typed at the Unix prompt are given in bold, like this, as are trn commands. Many trn commands are just single letters. Remember that trn is case-sensitive, so r is a different command than R. A summary of commands is in the Appendix.
In order to post articles to a newsgroup, you will have to be familiar with an editor such as emacs (the editor used by elm).
To start trn, type:
trn
trn has three separate modes: newsgroup selection, thread selection, and article reading. At any point, you can press h for a list of the commands available and a brief description of what they do. trn starts in newsgroup selection mode and changes to the other modes when you start reading a newsgroup.
If this is the first time you've run trn, you will be subscribed to every newsgroup. You will probably want to unsubscribe to all of them so that you can then just pick the ones that you are interested in. To do that, exit trn by pressing q and then type:
subscribe -ua
Now start trn again.
If you have just done the initial setup described above, it will tell you that there is no unread news in the subscribed-to newsgroups (because there are no subscribed-to newsgroups) and give you an "End of newsgroups" prompt. After you have subscribed to several newsgroups, it will list the first few and how many unread articles are in each, and then it will ask you if you want to read the first newsgroup you are subscribed to.
If this is your first time running trn, you will want to subscribe to some newsgroups. If you already know the name of a newsgroup, just type g and the name of the group. For example, to subscribe to news.announce.newusers, type:
g news.announce.newusers
It will ask you if you want to resubscribe and you should answer y for yes. You can also use g to go to a newsgroup you are already subscribed to.
If you don't know which specific group you are interested in, you can search the list of groups for a keyword. Type:
l keyword
where keyword is the word you want to search for. trn will first check for groups that aren't in your .newsrc file (it shouldn't find any since you just set up your .newsrc with all of the groups) and then it will search through your .newsrc. You can then go to any of the groups it finds with the g command.
After you have subscribed to a newsgroup, trn will ask you if you want to read it. At this point, you have a few options. Pressing n will skip it for now and move on to the next subscribed group (you will still be subscribed to the group and it will come back later). Pressing y will bring up the first article in the group and put trn in article reading mode. Pressing the space bar will bring up a list of the articles and put trn in thread selection mode. I'll come back to that in a second. You can also press q to exit trn.
When trn goes into article reading mode, it will bring up the first unread article in the newsgroup. trn keeps track of which articles you have read in each group so that you don't have to read them twice. At the top of the screen is the newsgroup name and the article number, followed by the headers of the article. Every article has certain standard headers such as the date the article was sent, the poster, and the subject line (which trn will highlight for you). On the right side of the screen is the thread display.
trn organizes all the articles into "threads." Each thread is an original article, followed by all the responses to it, followed by the responses to the responses, and so on. The first article is like the base of a tree, and the responses branch out from that. The tree is laying on its side, so the root article is on the left.
Below the header, there is a blank line and the actual text of the article begins. If the article is longer than one screen, there will be a "More" prompt at the bottom of the screen. Press the space bar to move down a screen, or b to move up a screen. When you reach the end of an article, pressing the space bar will move to the next article in the thread, or to the next thread if you have finished the current one.
There are also several commands to move between articles. Pressing n skips the rest of the current article, marks it read, and moves to the next article. Pressing - goes back to the last article you read. k marks the current article and any articles with the same subject as read (this is good if you get tired of a particular thread). Finally, the arrow keys (on most systems) let you move around in the thread display in the corner of the screen. At any time, you can press c to mark all the articles in the newsgroup read (this is handy if you are way behind or just subscribed and you only want to read new articles as they come in).
Most groups have a large number of articles (especially at first, when there is several days of backlog that you haven't read), and reading each article can take a long time, even using n to skip by things you don't want to read. One of trn's nicest features is the thread selector. Pressing the space bar instead of y when asked if you want to read the newsgroup, or pressing + while you are reading the newsgroup, will bring it up.
The selector is a list of all the threads in the newsgroup, the subject lines, the number of articles with each subject line, and the authors of the posts. Each thread has a letter (or number if you have a large screen) assigned to it. Here you can just mark the threads that have interesting subject lines and skip past everything else. To mark a thread for reading, press the letter next to it and it will be marked with a plus. When you are done with the current screen of articles, pressing D will mark all the articles you didn't select as read and let you read the ones you selected. After you finish, it will bring up the next screen. If you don't want to mark all the other articles as read (if you want to come back to them later for some reason), use the space bar instead. If you press the space bar while on the last screen of articles, trn will leave the thread selector and bring up the first article you selected.
There are other commands available in the selector. You can use the arrow keys to move up and down through the screen, and the left and right arrows go to the previous and next screens, respectively. Pressing k will mark the current thread as read. Pressing Enter will leave the selection screen and let you read the threads you have marked (or the thread the cursor is on if you haven't marked any), and then return you to the selection screen when done. There are many other useful commands; press h for a complete list.
Before posting to any newsgroup, you should read news.announce.newusers. There are a lot of informal standards on Usenet that you should understand. You should also read the group you are posting to for at least two weeks, and preferably a month. If you are posting a question, it may be one of the Frequently Asked Questions (also called FAQs) in that group. Lists of FAQs and their answers are usually posted once per month. In addition, you need to get a feel for the group and the kinds of questions that are appropriate.
Something else that you want to keep in mind is that e-mail is more appropriate for many responses. trn makes e-mail responses very easy. While reading the article you want to reply to, press r (or R if you want to include their article). trn will put in headers addressing the mail to the right person and bring up an editor.
If you want to post a follow-up article to one that has already been posted, press f while reading the article (if you want to include the text of the article in your article, press F instead). If you use f, it will ask you if you are starting an unrelated topic; answer n. The first time you post, you will be stepped through the process. If you included the original article, please remember to delete any lines that aren't important to your point.
If you want to start a new thread, press f anytime while reading the newsgroup and answer y to the question of whether you are starting an unrelated topic. The procedure after that is the same, except that you will be prompted for a subject line. It can take some time for your article to show up in the newsgroup, so if you don't see it immediately, be patient and don't just post it again.
You don't have to be in trn to post; when you post, trn actually runs another program called Pnews. You can run Pnews from the Unix prompt by just typing:
Pnews
(the capital P is important). It will prompt you for a newsgroup and a subject and start the editor for you.
After you read news for a while, you'll see that almost everyone ends their messages with a "signature," a one to four line standard ending that usually includes their e-mail address and various other information. If you post frequently, you may want to have a signature of your own. To use it with both your e-mail messages and posts, just type:
elmsig -e
at the Unix prompt. It will give you a chance to edit (create) your signature. If you don't want to use it with e-mail, just create a file called .signature in your home directory and put your signature in it, and your signature will now be automatically appended to any post you make.
If you'd prefer the signature be included in the post as you are editing it (so that you have the option to erase it), call the file .news_sig. To use it with e-mail as well, type:
elmsig -e -f ~/.news_sig
Don't make both a .news_sig and a .signature file.
Killfiles are essentially a filter. You can filter out articles by subject, by author, or by several other things. This can be extremely handy on some newsgroups, where you don't want to read anything on a topic that is popular with other people, or if there is one poster whose posts are annoying.
There is a separate killfile for each newsgroup. Pressing K while reading an article will put the subject of that article in your killfile for that group, and any future articles with that subject will be automatically marked as read. You can also edit the killfile for a group yourself by pressing Ctrl-K. Each line in the killfile (except for the THRU line if there is one) is a separate killfile command.
Killfile commands consist of a key phrase, surrounded by slashes, a modifier, a colon and a command. The most commonly used command is j (junk) which marks matching articles as read. If there are no modifiers, as in:
/key phrase/:j
trn will kill any article with a subject that has the key phrase in it. This phrase can include spaces. For example, /Green Card/:j will kill subjects like "Green Card," "I'm a Green Card," "Green Card lawyers," etc.
The modifier f says to search the from line instead of the subject. A command in the form:
/key phrase/f:j
will kill any articles with that key phrase (usually the address of a poster) in the from line. For example, /noone@anywhere\.edu/f:j will kill any article posted by noone@anywhere.edu. Note that you have to put a \ before any . in the address.
You may also want to use Tj instead of just j as the command. This marks as read the entire thread that the article is in, rather than just the individual article.
There is a companion document to this one available on-line that describes some of the more advanced features of trn and explains some of how trn works. To read it, type:
more ~consult/pub/news/trn.advanced
The man page for trn is the most comprehensive guide available on-line. To read it, type:
man trn
It lists all the commands and options, but it is a bit hard to read and understand in places, and the part on killfiles is particularly bad. For complete information on how to make a killfile, read the Killfile FAQ by typing:
more ~consult/pub/faq/killfile
You may also want to read the man page for Pnews---it has the details on the signature files.
Also, don't forget that you can press h at almost any trn prompt to get a quick-reference screen.
You can use most of the same commands in the middle of an article as you can at the end of an article, but there are a few extra commands as well.
Copyright, 1995, by The Board of Trustees of the Leland Stanford Junior University. Permission granted to copy for non-commercial purposes, provided we receive acknowledgment and a copy of the document in which our material appears. No right is granted to quote from or use any material in this document for purposes of promoting any product or service.
UNIX Documents/
Alphabetical List of Documents
Last modified: July 21, 1995