Chapter 2
Tutorial

1 Tutorial

In order to use TkNewsII, you will need to create a ~/.TkNewsRc file. This file contains the preferences and configuration information for the news servers and BBS’s you read EchoMail on. See Section 3.3 for a detailed reference on the resources available.



Listing 2.1: Simple NNTP local mail server.
   *local*useServer: Yes
   *spoolList: local
   *autoSpools: local
   


To start with here is a minimal file for reading the local news server (eg talking to innd on the local machine), as shown in Listing 2.1.

The spoolList and autoSpools global resources list the spool name local and local is used in the resource for useServer. When TkNewsII starts up it will create not only its Main Window (see Section 3.1) but also a Spool Window (see Section 3.2) for the local news server.



Listing 2.2: Common global resource settings.
   *organization: Your Organization
   *from: Your name and <address>
   


The defaults will handle everything else, although you might want to include some additional global settings, as shown in Listing 2.2.



Listing 2.3: Typical resource settings for a QWK BBS.
   # Define our spools (only one for now).
   *spoolList: yoyobbs
   # Auto load our one spool.
   *autoSpools: yoyobbs
   # Directory where the group messages will reside.
   *yoyobbs*spoolDirectory: ~/YoyoBBS/spool
   # The file containing the counts of actual messages.
   *yoyobbs*activeFile: ~/YoyoBBS/active
   # File containing my subscribed groups and read messages.
   *yoyobbs*newsRc: ~/YoyoBBS/newsrc
   # Command to inject new public messages.
   *yoyobbs*injectProgram: $QWKREPLY public %spool %active %group
   # Command to inject new private messages.
   *yoyobbs*emailProgram: $QWKREPLY private %spool %active NetMail
   # The netmail group is really a private E-Mail group.
   *yoyobbs*netmail*isEmail: yes
   *yoyobbs*netmail*injectProgram: $QWKREPLY private %spool %active NetMail
   # Place to keep saved messages.
   *yoyobbs*savedNews: ~/YoyoBBS/Saved
   # Place to put unsent drafts.
   *yoyobbs*drafts: ~/YoyoBBS/Drafts
   # Yes, enable the Clean function.
   *yoyobbs*cleanFunction: Yes
   # Command to connect with the BBS to transfer QWK packets.
   *yoyobbs*qwkGetMailCommand: ~/bin/yoyobbs.sh
   # Location to store QWK packets.
   *qwkInSpool: /tmp/spool
   *qwkOutSpool: /tmp/spool
   


If you use a local BBS that uses QWK, you might include lines like those shown in Listing 2.3.

The script ~/bin/yoyobbs.sh needs to do the following:

  1. Connect to YoyoBBS (eg use /bin/chat if you dialing, or use ssh, ftp, telnet, or some other program if the BBS is network connected).
  2. Look in /tmp/spool/ and see if there is a file named yoyobbs.rep, and if there is, upload this file to to YoyoBBS and remove yoyobbs.rep from the local disk.
  3. Ask YoyoBBS for a fresh QWK packet (and process the uploaded yoyobbs.rep file).
  4. Download the fresh yoyobbs.qwk to /tmp/spool/.

The script should return an error status if it was not able to complete its processing. It might want to make a backup copy of an existing yoyobbs.qwk in /tmp/spool/ before it starts (just in case).



Listing 2.4: Resource settings for two QWK BBSes, continued.
   # Global definations.
   # Define our spools.
   *spoolList: yoyobbs buckaroobbs
   # Auto load one of them.
   *autoSpools: buckaroobbs
   # Location to store QWK packets and replys.
   *qwkInSpool: /tmp/qwkfiles
   *qwkOutSpool: /tmp/qwkreplies
   # Buckaroo Banzi's BBS
   # Our Id on Buckaroo Banzi's BBS.
   *buckaroobbs*from: Banzi Group Leader 777 <BGL777@BuckarooBBS.org>
   *buckaroobbs*organization: Banzi Group of Grover's Mills, NJ
   # Directory where the group messages will reside.
   *buckaroobbs*spoolDirectory: ~/BuckarooBBS/spool
   # The file containing the counts of actual messages.
   *buckaroobbs*activeFile: ~/BuckarooBBS/active
   # File containing my subscribed groups and read messages.
   *buckaroobbs*newsRc: ~/BuckarooBBS/newsrc
   # Command to inject new public messages.
   *buckaroobbs*injectProgram: $QWKREPLY public %spool %active %group
   # Command to inject new private messages.
   *buckaroobbs*emailProgram: $QWKREPLY private %spool %active NetMail
   # The netmail group is really a private E-Mail group.
   *buckaroobbs*netmail*isEmail: yes
   *buckaroobbs*netmail*injectProgram: $QWKREPLY private %spool %active NetMail
   # Place to keep saved messages.
   *buckaroobbs*savedNews: ~/BuckarooBBS/Saved
   # Place to put unsent drafts.
   *buckaroobbs*drafts: ~/BuckarooBBS/Drafts
   # Yes, enable the Clean function.
   *buckaroobbs*cleanFunction: Yes
   # Command to connect with the BBS to transfer QWK packets.
   *buckaroobbs*qwkGetMailCommand: ~/bin/buckaroobbs.sh
   # Yoyodyne's  BBS
   # Our Id on Yoyodyne's  BBS.
   *yoyobbs*from: John Warffin  <John.Warffin@Yoyodyne.com>
   *yoyobbs*organization: Yoyodyne Corporation
   # Directory where the group messages will reside.
   *yoyobbs*spoolDirectory: ~/YoyoBBS/spool
   # The file containing the counts of actual messages.
   *yoyobbs*activeFile: ~/YoyoBBS/active
   # File containing my subscribed groups and read messages.
   *yoyobbs*newsRc: ~/YoyoBBS/newsrc
   # Command to inject new public messages.
   *yoyobbs*injectProgram: $QWKREPLY public %spool %active %group
   # Command to inject new private messages.
   *yoyobbs*emailProgram: $QWKREPLY private %spool %active NetMail
   # The netmail group is really a private E-Mail group.
   *yoyobbs*netmail*isEmail: yes
   *yoyobbs*netmail*injectProgram: $QWKREPLY private %spool %active NetMail
   # Place to keep saved messages.
   *yoyobbs*savedNews: ~/YoyoBBS/Saved
   # Place to put unsent drafts.
   *yoyobbs*drafts: ~/YoyoBBS/Drafts
   # Yes, enable the Clean function.
   *yoyobbs*cleanFunction: Yes
   # Command to connect with the BBS to transfer QWK packets.
   *yoyobbs*qwkGetMailCommand: ~/bin/yoyobbs.sh
   


It is possible to use multiple BBSs as shown in Listing 2.4.


/usr/local/bin/TkNewsII &

Figure 2.1: Invoking TkNewsII.


Once you have your .TkNewsRc file set up, you can start TkNewsII, as shown in Figure 2.1.

TkNewsII takes one option, -iconic, which will start TkNewsII with its toplevel windows in iconic mode - this is useful if you are starting TkNewsII as part of your desktop startup and want TkNewsII to be started, but not pasted on the screen until a later time.

If you are using a local spool or a NNTP server, it will automatically fetch the active group list from the server on startup. For QWK BBSs it won’t. For these you will need to use the File menu on the main window. There are three possible options:

Open QWK File
Open a listed QWK file that has already been downloaded to the QWK in spool.
Get QWK File
Fetch a QWK file for a selected spool.
Get All QWK Files
Fetch all available QWK files for all spools that have a QWK get mail command.

Once the messages have been fetched, you will have a group list showing the available messages in the top part of the spool window. Double clicking on a group opens that group, with displays a list of available articles (messages) in the lower part of the spool window. Double clicking on an article line opens and displays that article (message).

To open any spools not opened automatically (listed in the autoSpools resource) or opened by the Open QWK File, Get QWK File, or Get All QWK Files, the Review Spool menu item on the File menu can be used.