Article View: news.software.readers
Article #12712The trn newsreader FAQ, part 2: Advanced
From: Peter J. Kappesser
Date: Sun, 13 Nov 1994 10:50
Date: Sun, 13 Nov 1994 10:50
231 lines
10008 bytes
10008 bytes
Posted-By: auto-faq 3.1.1.2
Archive-name: trn-faq/part2
Posting-Frequency: Posted around the 11th of each month.
Please-Note: Submitted last week to the news.answers moderators, but
they're evidently backlogged as I have received no response,
so I am doing this manual posting because people are asking FAQs!
Last-modified: November 8, 1994
Version: 1
These articles summarize some frequently-asked questions (and answers)
about the trn family of newsreaders, and associated programs such as
Pnews and Rnmail.
Part 2 has information on more advanced usage questions and bug workarounds.
Subject: 50. Article selection problem in trn 3.4.1
Subject: 51. Slow performance with trn using SLIP
Subject: 52. trn 3.4.1 ignores some lines in big killfile
Subject: 53. TRN thinks certain newsgroups are bogus; TIN doesn't
Subject: 54. How can I run TRN non-interactively (e.g. as a cron job)?
------------------------------
Subject: 50. Article selection problem in trn 3.4.1
Question-From: <aguillon@netcom.com> (Jesus R. Aguillon)
When I do an article selection with 'A' and then '+' using trn 3.3 I get
the following in my kill-file:
/: *test/:++
Assuming the title is "test".
When I enter the newsgroup it does the selection properly.
With trn 3.4.1 I get:
/: *test/:I:++
When I enter the newsgroup I get:
Processing memorized commands...
/: *test/:I:++
9220 ???I:++
(Interrupted at article 9220)
And no articles get selected. If I remove the :I then it works just like
trn 3.3. Is there something different in this case between 3.3 and 3.4.1?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
This is a slight botch in 3.4.1 that got fixed in version 3.5 --
the 'I' is a modifier to ignore the THRU line and should have
read: "/: *test/I:++", but an extra ':' got stuck in there.
------------------------------
Subject: 51. Slow performance with trn using SLIP
Question-From: <jmk@maroon.tc.umn.edu> (Jim Kaufman)
I am running a Linux system that occassionally connects to the
University's machine so I can read news or mail. This is a 14.4Kbps
SLIP connection.
I notice that when trn starts up it reads the entire active file,
which is over 400K long. Also, when I then post news, the Pnews
script seems to want to do the same thing, as well as read the
newsgroups file. Is there some way to avoid this? Maybe point
trn at an older active file (or is this a really bad idea?)
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Yeah, this is a drag over a slip line. Version 3.6 will provide
support for the new line-at-a-time active file listing that will
be in nntp-t6 and inn 1.5, so as long as you're at a site that
can upgrade this will be a thing of the past soon.
If you post from within trn Pnews should be sharing the active
file that trn grabbed. If it's not, you probably have a trn/Pnews
combination that is either too old or out of sync.
As for the newsgroups file, people on a slip line would do well to
modify Pnews to point to a local copy that they update from time
to time (at least through version 3.5).
Trn 3.6 has an improved Pnews that defaults to not grabbing the
files (instead getting the info in an interactive session), but
since this is _slower_ over a fast net connection there is an
option to do things the old way that each user can specify.
------------------------------
Subject: 52. trn 3.4.1 ignores some lines in big killfile
Question-From: <bitbug@netcom.com> (James Buster)
I have a local killfile for news.answers, which is 772 lines long. It seems
that two or three patterns in the killfile are ignored each time that I
read news.answers (I read it once per day, usually). Exactly which
patterns is different each time, but the result is that I must (K)ill
that subject again, producing a duplicate entry in news/answers/KILL.
I use sort and uniq on the killfile to help me identify and delete those
duplicate entries. This on a Sun running SunOS Release 4.1.3_U1.
Is this a known bug that's been fixed in later releases?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
I've never heard of this problem before. Using 'K' to deposit the kill
commands in the killfile puts a fairly specific version of the subject
into the kill file -- are you sure that the subjects aren't changing
slightly, maybe in spacing or something minor so that the kill commands
look similar but aren't quite the same?
One thing you might do is to modify your kill file to make it more
generic on the subjects you want to kill. Another option is to switch
to using "Tj" (if you are using trn 3.5) to kill the subjects by
thread instead of subject. This is useful if you're trying to weed
out all the stuff you're not interested in in news.answers because
the thread-kill commands automatically expire after the discussion
dies.
>>>>> Suggestion From: <lvirden@cas.org> (Larry W. Virden)
What COULD be done is to split the kills up between all the smaller *.answer
groups so that no kill file is so large. After you get done doing all the
comp.answers, rec.answers , etc. then you can go into news.answers and see
what is left.
------------------------------
Subject: 53. TRN thinks certain newsgroups are bogus; TIN doesn't
Question-From: Daniel Jacobs <danielj@snark.wizard.com>
I have a user who just switched to trn from tin. Some groups that show up
fine in tin, trn calls bogus and marks them as unsubscribed in .newsrc,
so if he goes back into tin after not being able to read them in trn, he
has to resubscribe again. Any ideas?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
What version of trn are you using? In older versions trn used to
complain about redirected newsgroups as bogus (those with '=' in
the 4th field of the active file), but a modern trn reports the
redirection and allows the user to finish reading the remaining
articles before they expire. It might be that the groups are on
their last legs.
The only other thing I can think of is that you're not using the
same server for both tin and trn, but then you'd REALLY be messed
up using the same .newsrc file due to the lack of a common numbering
system.
------------------------------
Subject: 54. How can I run TRN non-interactively (e.g. as a cron job)?
Question-From: <mikey@waste.com> (Michael Owings)
Can TRN be run non-interactively (besides using the -c flag to check for
news)? I would like to have it run (from cron), process my kill file
entries for selected groups, and then exit.
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Run the "trnkill" script included below from cron and it will enter
every subscribed group you have just long enough to run the kill file,
and then exit.
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
#!/bin/sh
# trnkill - shell script to apply trn KILL files in the background
# 14 Mar 89 created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU>
# 10 Sep 93 modified for trn 3 (or 2) by Wayne Davison <davison@borland.com>
# Options: -d debug mode -- you see all gory action as it happens.
# Visit all newsgroups (if trn asks about anything else, just say no)
export TRNINIT TRNMACRO RNMACRO
TRNINIT='-q -s -T -t -x +X'
TRNMACRO=/tmp/trnkill$$
# support for trn 2.x
RNMACRO=$TRNMACRO
trap 'rm -f $TRNMACRO; exit' 1 2 3 15
echo "z %(%m=[nf]?.q^J:n)^(z^)" > $TRNMACRO
echo "^m ^(z^)" >> $TRNMACRO
echo "^j ^(z^)" >> $TRNMACRO
if test X$1 = X-d; then
echo "z" | trn
else
echo "z" | trn >/dev/null 2>&1
fi
rm -f $TRNMACRO
exit 0
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
>>>>> Note from Peter J. Kappesser <pjkappes@mailbox.syr.edu>:
I tried this script, but it refuses to run as a cron job, complaining it
'Can't open /dev/tty'.
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
This only happens on certain systems, and depends on your termio setup.
I've made a change for trn 3.6 that checks if the input is a terminal
and skips this code if it is not:
Index:term.c
@@ -149,10 +149,13 @@
/* do no delay reads on something that always gets closed on exit */
- devtty = open("/dev/tty",0);
- if (devtty < 0) {
- printf(cantopen,"/dev/tty") FLUSH;
- finalize(1);
+ devtty = fileno(stdin);
+ if (isatty(devtty)) {
+ devtty = open("/dev/tty",0);
+ if (devtty < 0) {
+ printf(cantopen,"/dev/tty") FLUSH;
+ finalize(1);
+ }
+ fcntl(devtty,F_SETFL,O_NDELAY);
}
- fcntl(devtty,F_SETFL,O_NDELAY);
#endif
#endif
My system doesn't use this code, however, so if [someone will] try it out and
let me know how it goes I'd appreciate it.
Technical Details
Message-ID:
<trn-faq-2-784723602@kong.syr.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!kong.syr.edu!pjkappesReferences:
<trn-faq-1-784723602@kong.syr.edu>Show Full Headers
Complete Article Headers
Message-ID: <trn-faq-2-784723602@kong.syr.edu> Subject: The trn newsreader FAQ, part 2: Advanced Date: Sun, 13 Nov 1994 10:50:28 +0000 From: pjkappes@mailbox.syr.edu (Peter J. Kappesser) References: <trn-faq-1-784723602@kong.syr.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!kong.syr.edu!pjkappes Newsgroups: news.software.readers Followup-To: news.software.readers Organization: Alumni account, Syracuse University, Syracuse, NY Lines: 231 Distribution: world Reply-To: pjkappes@mailbox.syr.edu (Peter J. Kappesser) NNTP-Posting-Host: kong.syr.edu Summary: Frequently-asked questions (and answers) about trn, a powerful, comand-based USENET newsreader, and associated utility programs. Keywords: FAQ TRN NEWS QUESTION ANSWER NEWSRC ENVIRONMENT VARIABLES PNEWS SLIP KILLFILE BOGUS NEWSGROUPS CRON Originator: pjkappes@kong.syr.edu