Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
The ONE Campaign to make poverty history

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 133 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       tknewsbiff [ server or config-file ]


       tknewsbiff  pops  up a window when there is unread news in
       your favorite newsgroups  and  removes  the  window  after
       you've  read  the  news.  tknewsbiff can optionally play a
       sound, start your newsreader, etc.


       By default, the configuration file ~/.tknewsbiff describes
       how tknewsbiff behaves.  The syntax observes the usual Tcl
       rules - however, even if you don't know Tcl, all  but  the
       most esoteric configurations will be obvious.

       Each  newsgroup  (or  set  of newsgroups) to be watched is
       described by using the "watch" command.  For example:

       watch dc.dining
       watch nist.*
       watch comp.unix.wizard  -threshold 3
       watch *.sources.*       -threshold 20

       For each newsgroup pattern, any newsgroup that matches  it
       and  which you are subscribed to (according to your newsrc
       file) is eligible for reporting.  By  default,  tknewsbiff
       reports  on  the newsgroup if there is at least one unread
       article.  The "-threshold" flag changes the  threshold  to
       the  following  number.  For example, "-threshold 3" means
       there must  be  at  least  three  articles  unread  before
       tknewsbiff will report the newsgroup.

       If  no  watch commands are given (or no configuration file
       exists), all groups which are subscribed to are watched.

       To suppress newsgroups that would otherwise  be  reported,
       use  the  "ignore"  command.   For  example, the following
       matches  all  comp.*  and  nist.*  newgroups  except   for
       nist.posix or .d (discussion) groups:

       watch comp.*
       watch nist.*
       ignore nist.posix.*
       ignore *.d

       The  flag  "-new"  describes a command to be executed when
       the newsgroup is first reported  as  having  unread  news.

       proc play {sound} {
            exec play /usr/local/sounds/$sound.au

       watch dc.dining -new "play yumyum"
       watch rec.auto* -new "play vroom"

       As an aside, you can put an "&" at the end  of  an  "exec"
       command  to  get commands to execute asynchronously.  How­
       ever, it's probably not a good idea to do this when  play­
       ing sound files anyway.

       "newsgroup"  is  a  read-only  variable which contains the
       name of the newsgroup that is  being  reported.   This  is
       useful  when  the  action  is triggered by a pattern.  For
       example, the following line could run the  newsgroup  name
       through a speech synthesizer:

       watch * -new {
            exec play herald.au
            exec speak "New news has arrived in $newsgroup."

       The  flag  "-display"  describes  a command to be executed
       every time the newsgroup  is  reported  as  having  unread
       news.   The  special command "display" is the default com­
       mand.  It schedules $newsgroup to be written  to  tknewsb­
       iff's  display  when  it  is  rewritten.   For example, by
       explicitly providing a -display flag that omits  the  dis­
       play  command,  you  can disable the display of newsgroups
       that are already reported via -new.

       watch dc.dining -new {exec play yumyum.au} -display {}

       If you want to execute an action repeatedly and still dis­
       play  the  newsgroup  in  the  default  manner, explicitly
       invoke the display command via  the  -display  flag.   For

       watch *security* -display {
            exec play red-alert.au

       rec.auto  groups and you play the same sound for each one.
       To prevent playing the sound several times in a row,  make
       the  -new  command  simply set a flag.  In the user proce­
       dure, play the sound if the flag is set  (and  then  reset
       the flag).

       The  user  procedure  could  also be used to start a news­
       reader.  This would avoid the possibility of starting mul­
       tiple  newsreaders  just  because multiple newsgroups con­
       tained unread articles.  (A check should,  of  course,  be
       made  to  make  sure that a newsreader is not already run­


       The following example lines show variables that can affect
       the behavior of tknewsbiff

       set delay          120
       set server         news.nist.gov
       set server_timeout 60
       set newsrc         ~/.newsrc
       set width          40
       set height         20
       set active_file    /usr/news/lib/active

       tknewsbiff alternates between checking for unread news and
       sleeping (kind of like many undergraduates).  The  "delay"
       variable describes how many seconds to sleep.

       The  "server"  variable  names  an  NNTP news-server.  The
       default is "news".  The "server" variable is only used  if
       the "active_file" variable is not set.

       The  "server_timeout" variable describes how how many sec­
       onds to wait for a response from the server before  giving
       up.   -1  means  wait  forever  or until the server itself
       times out.  The default is 60 seconds.

       The "newsrc" variable describes the name of  your  .newsrc
       file.  By default, tknewsbiff looks in your home directory
       for a newsrc file.  A server-specific newsrc  is  used  if
       found.    For   example,   if   you  have  set  server  to
       "cubit.nist.gov", then  tknewsbiff  looks  for  ~/.newsrc-
       cubit.nist.gov.   (This  is  the  Emacs  gnus convention -
       which is very convenient when you read news from  multiple
       servers.)  If there is no server-specific newsrc, tknewsb­
       iff uses ~/.newsrc.

       The "width" variable describes the width  that  tknewsbiff
       tknewsbiff checks for unread news and updates its display.

       The "active_file" variable describes the name of the  news
       active  file.  If set, the active file is read directly in
       preference to using NNTP (even if the "server" variable is
       set).   This  is  particularly  useful for testing out new
       configuration files since you can edit a fake active  file
       and  then click button 2 to immediately see how tknewsbiff
       responds (see BUTTONS below).

       If the environment variable DOTDIR is set, then its  value
       is  used  as  a  directory  in  which to find all dotfiles
       instead of from the home directory.  In  particular,  this
       affects  the tknewsbiff configuration file and the .newsrc
       file (assuming the newsrc variable is not set explicitly).


       To  watch multiple servers, run tknewsbiff multiple times.
       (Since you need different .newsrc files  and  the  servers
       have  different  newsgroups  and  article  numbers anyway,
       there is no point in trying to do this in  a  single  pro­

       You  can  point  tknewsbiff  at a different server with an
       appropriate argument.  The argument is  tried  both  as  a
       configuration  file  name  and  as  a suffix to the string
       "~/.tknewsbiff-".  So if you  want  to  watch  the  server
       "kidney",  store  the tknewsbiff configuration information
       in ~/.tknewsbiff-kidney".  The following two commands will
       both use that configuration file.

            tknewsbiff kidney
            tknewsbiff ~/.tknewsbiff-kidney

       In  both cases, the actual server to contact is set by the
       value of the server variable in the configuration file.

       If no configuration file is found, the argument is used as
       the  server  to contact.  This allows tknewsbiff to be run
       with no preparation whatsoever.

       If the argument is the special keyword "active"  (or  ends
       in  "/active"),  it is used as the name of an active file.
       This  is  in  turn  used  to   initialize   the   variable
       "active_file"  so  that  tknewsbiff  reads from the active
       file directly rather than using NNTP.

       Creating your own active file is a convenient way of test­
       ing  your  configuration file.  For example, after running
       window lists the names of the newsgroups and the number of
       unread articles in each (unless suppressed by the -display
       flag).  When there is no longer any unread news, the  win­
       dow disappears (although the process continues to run).


       Button  or  key bindings may be assigned by bind commands.
       Feel free to change them.  The default bind commands are:

       bind .list <1> help
       bind .list <2> update-now
       bind .list <3> unmapwindow

       By default button 1 (left) is bound to "help".   The  help
       command causes tknewsbiff to pop up a help window.

       By  default,  button  2 (middle) is bound to "update-now".
       The update-now command causes  tknewsbiff  to  immediately
       check  for  unread  news.   If your news server is slow or
       maintains a very large number of newsgroups, or you have a
       large  number  of  patterns  in  your  configuration file,
       tknewsbiff can  take  considerable  time  before  actually
       updating the window.

       By  default,  button  3 (right) is bound to "unmapwindow".
       The unmapwindow command causes tknewsbiff  to  remove  the
       window  from  the  display  until  the  next time it finds
       unread news.  (The mapwindow command causes tknewsbiff  to
       restore the window.)

       As  an  example,  here is a binding to pop up an xterm and
       run rn when you hold down the shift key and press button 1
       in the listing window.

       bind .list <Shift-1> {
            exec xterm -e rn &

       Here  is  a  similar binding.  However it tells rn to look
       only at the newsgroup that is under  the  mouse  when  you
       pressed  it.   (The  "display_list"  variable is described
       later in this man page.)

       bind .list <Shift-1> {
            exec xterm -e rn [lindex $display_list [.list nearest %y]] &

            .list config -bg honeydew1 -fg orchid2

       These can also be controlled by the X resource database as
       well.   However, the configuration file allows arbitrarily
       complex  commands  to  be  evaluated  rather  than  simple

       Certain  Tcl/Tk  commands  can  disrupt proper function of
       tknewsbiff.  These will probably be obvious to anyone  who
       knows  enough  to  give these commands in the first place.
       As a simple example, the program assumes the font  in  the
       list  box  is  of fixed width.  The newsgroups will likely
       not align if you use a variable-width font.

       The following variables are accessible and can be used for
       esoteric  uses.  All other variables are private.  Private
       variables and commands begin with "_" so you don't need to
       worry about accidental collisions.

       The  array  "db" is a database which maintains information
       about read and  unread  news.   db($newsgroup,hi)  is  the
       highest  article  that exists.  db($newsgroup,seen) is the
       highest article that you have read.

       A  number  of  lists  maintain  interesting   information.
       "active_list"  is a list of known newsgroups.  "seen_list"
       is a list of newsgroups that have been seen so far as  the
       -new  and  -display  flags  are  being processed.  "previ­
       ous_seen_list" is "seen_list"  from  the  previous  cycle.
       "ignore_list" is the list of newsgroup patterns to ignore.
       "watch_list" is the list of newsgroup patterns  to  watch.
       "display_list"  is the list of newsgroup will be displayed
       at the next opportunity.


       tknewsbiff automatically rereads your  configuration  file
       each  time it wakes up to check for unread news.  To force
       tknewsbiff to reread the file immediately (such as if  you
       are testing a new configuration or have just modified your
       newsrc file), press button 2 in the display  (see  BUTTONS


       tknewsbiff  defines  the  number of unread articles as the
       highest existing article minus the  highest  article  that
       you've  read.   So  if you've read the last article in the
       newsgroup but no others, tknewsbiff thinks  there  are  no
       unread  articles.   (It's  impossible  to do any better by
       single NNTP query - it just asks for the active file.  The
       NNTP  server does no computation, formatting, etc, it just
       sends the file.  All the  interesting  processing  happens
       locally in the tknewsbiff program itself.


       The man page is longer than the program.


       "Exploring  Expect:  A  Tcl-Based  Toolkit  for Automating
       Interactive Programs" by Don Libes, O'Reilly  and  Associ­
       ates, January 1995.


       Don Libes, National Institute of Standards and Technology

                          1 January 1994            TKNEWSBIFF(1)
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.06 Seconds