{
    "mode": "man",
    "parameter": "tknewsbiff",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tknewsbiff/1/json",
    "generated": "2026-07-05T09:34:54Z",
    "synopsis": "tknewsbiff [ server or config-file ]",
    "sections": {
        "NAME": {
            "content": "tknewsbiff - pop up a window when news appears\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tknewsbiff [ server or config-file ]\n",
            "subsections": []
        },
        "INTRODUCTION": {
            "content": "tknewsbiff pops up a window when there is unread news in your favorite newsgroups and removes\nthe window after you've read the news.  tknewsbiff can optionally play a  sound,  start  your\nnewsreader, etc.\n\n",
            "subsections": []
        },
        "SELECTING NEWSGROUPS": {
            "content": "By  default, the configuration file ~/.tknewsbiff describes how tknewsbiff behaves.  The syn‐\ntax observes the usual Tcl rules - however, even if you don't know Tcl, all but the most eso‐\nteric configurations will be obvious.\n\nEach  newsgroup  (or  set of newsgroups) to be watched is described by using the \"watch\" com‐\nmand.  For example:\n\n\nwatch dc.dining\nwatch nist.*\nwatch comp.unix.wizard  -threshold 3\nwatch *.sources.*       -threshold 20\n\n\nFor each newsgroup pattern, any newsgroup that matches it and which  you  are  subscribed  to\n(according to your newsrc file) is eligible for reporting.  By default, tknewsbiff reports on\nthe newsgroup if there is at least one unread article.  The  \"-threshold\"  flag  changes  the\nthreshold  to the following number.  For example, \"-threshold 3\" means there must be at least\nthree articles unread before tknewsbiff will report the newsgroup.\n\nIf no watch commands are given (or no configuration file exists), all groups which  are  sub‐\nscribed to are watched.\n\nTo suppress newsgroups that would otherwise be reported, use the \"ignore\" command.  For exam‐\nple, the following matches all comp.* and nist.* newgroups except for nist.posix or .d  (dis‐\ncussion) groups:\n\n\nwatch comp.*\nwatch nist.*\nignore nist.posix.*\nignore *.d\n\n\nThe  flag  \"-new\"  describes a command to be executed when the newsgroup is first reported as\nhaving unread news.  For example, the following lines invoke the UNIX command \"play\" to  play\na sound.\n\n\nwatch dc.dining -new \"exec play /usr/local/sounds/yumyum.au\"\nwatch rec.auto* -new \"exec play /usr/local/sounds/vroom.au\"\n\n\nYou  can  cut  down  on the verbosity of actions by defining procedures.  For example, if you\nhave many -new flags that all play sound files, you could define  a  sound  procedure.   This\nwould allow the -new specification to be much shorter.\n\n\nproc play {sound} {\nexec play /usr/local/sounds/$sound.au\n}\n\nwatch dc.dining -new \"play yumyum\"\nwatch rec.auto* -new \"play vroom\"\n\n\nAs  an  aside,  you can put an \"&\" at the end of an \"exec\" command to get commands to execute\nasynchronously.  However, it's probably not a good idea to do this when playing  sound  files\nanyway.\n\n\"newsgroup\"  is  a  read-only variable which contains the name of the newsgroup that is being\nreported.  This is useful when the action is triggered by a pattern.  For example,  the  fol‐\nlowing line could run the newsgroup name through a speech synthesizer:\n\n\nwatch * -new {\nexec play herald.au\nexec speak \"New news has arrived in $newsgroup.\"\n}\n\n\nThe  flag  \"-display\" describes a command to be executed every time the newsgroup is reported\nas having unread news.  The special command \"display\" is the default command.   It  schedules\n$newsgroup  to  be written to tknewsbiff's display when it is rewritten.  For example, by ex‐\nplicitly providing a -display flag that omits the display command, you can disable  the  dis‐\nplay of newsgroups that are already reported via -new.\n\n\nwatch dc.dining -new {exec play yumyum.au} -display {}\n\n\nIf  you  want  to execute an action repeatedly and still display the newsgroup in the default\nmanner, explicitly invoke the display command via the -display flag.  For example:\n\n\nwatch *security* -display {\nexec play red-alert.au\ndisplay\n}\n\n\nActions associated with the -new and -display flags are executed only once for each  matching\nnewsgroup.  The command executed is the one associated with the first pattern in the configu‐\nration file that matches and observes the given threshold.\n\nAny command that is simply listed in the configuration file is executed each time before  the\nupdate  loop  in tknewsbiff.  The reserved (but user-defined) procedure \"user\" is run immedi‐\nately after the newsgroups are scheduled to be written to the display and before they are ac‐\ntually written.\n\nFor  example, suppose unread articles appear in several rec.auto groups and you play the same\nsound for each one.  To prevent playing the sound several times in a row, make the -new  com‐\nmand  simply  set a flag.  In the user procedure, play the sound if the flag is set (and then\nreset the flag).\n\nThe user procedure could also be used to start a newsreader.  This would avoid the  possibil‐\nity  of starting multiple newsreaders just because multiple newsgroups contained unread arti‐\ncles.  (A check should, of course, be made to make sure that a newsreader is not already run‐\nning.)\n\n",
            "subsections": []
        },
        "MORE VARIABLES": {
            "content": "The following example lines show variables that can affect the behavior of tknewsbiff\n\n\nset delay          120\nset server         news.nist.gov\nset servertimeout 60\nset newsrc         ~/.newsrc\nset width          40\nset height         20\nset activefile    /usr/news/lib/active\n\n\ntknewsbiff alternates between checking for unread news and sleeping (kind of like many under‐\ngraduates).  The \"delay\" variable describes how many seconds to sleep.\n\nThe \"server\" variable names an NNTP news-server.  The default is \"news\".  The \"server\"  vari‐\nable is only used if the \"activefile\" variable is not set.\n\nThe  \"servertimeout\" variable describes how how many seconds to wait for a response from the\nserver before giving up.  -1 means wait forever or until the server itself  times  out.   The\ndefault is 60 seconds.\n\nThe  \"newsrc\" variable describes the name of your .newsrc file.  By default, tknewsbiff looks\nin your home directory for a newsrc file.  A server-specific newsrc is used  if  found.   For\nexample,  if you have set server to \"cubit.nist.gov\", then tknewsbiff looks for ~/.newsrc-cu‐\nbit.nist.gov.  (This is the Emacs gnus convention - which is very convenient  when  you  read\nnews  from  multiple  servers.)   If  there  is  no  server-specific  newsrc, tknewsbiff uses\n~/.newsrc.\n\nThe \"width\" variable describes the width that tknewsbiff will use to display information.  If\nany  newsgroup  names  are long enough, they will be truncated so that the article counts can\nstill be shown.  You can manually resize the window to see what was truncated.   However,  if\nyour configuration file sets the width variable, the window will be restored to that size the\nnext time that tknewsbiff checks for unread news and updates its display.\n\nThe \"height\" variable describes the maximum height that tknewsbiff will use to display infor‐\nmation.   If  fewer newsgroups are reported, tknewsbiff will shrink the window appropriately.\nYou can manually resize the window but if your configuration file sets the  height  variable,\nthe window will be restored to that size the next time that tknewsbiff checks for unread news\nand updates its display.\n\nThe \"activefile\" variable describes the name of the news active file.  If  set,  the  active\nfile  is  read  directly  in preference to using NNTP (even if the \"server\" variable is set).\nThis is particularly useful for testing out new configuration files since you can edit a fake\nactive  file  and then click button 2 to immediately see how tknewsbiff responds (see BUTTONS\nbelow).\n\nIf the environment variable DOTDIR is set, then its value is used as a directory in which  to\nfind  all  dotfiles  instead  of  from  the  home directory.  In particular, this affects the\ntknewsbiff configuration file and the .newsrc file (assuming the newsrc variable is  not  set\nexplicitly).\n\n",
            "subsections": []
        },
        "WATCHING DIFFERENT NEWS SERVERS": {
            "content": "To  watch multiple servers, run tknewsbiff multiple times.  (Since you need different .newsrc\nfiles and the servers have different newsgroups and article numbers anyway, there is no point\nin trying to do this in a single process.)\n\nYou can point tknewsbiff at a different server with an appropriate argument.  The argument is\ntried both as a configuration file name and as a suffix to the string  \"~/.tknewsbiff-\".   So\nif  you  want to watch the server \"kidney\", store the tknewsbiff configuration information in\n~/.tknewsbiff-kidney\".  The following two commands will both use that configuration file.\n\n\ntknewsbiff kidney\ntknewsbiff ~/.tknewsbiff-kidney\n\n\nIn both cases, the actual server to contact is set by the value of the server variable in the\nconfiguration file.\n\nIf  no  configuration file is found, the argument is used as the server to contact.  This al‐\nlows tknewsbiff to be run with no preparation whatsoever.\n\nIf the argument is the special keyword \"active\" (or ends in \"/active\"), it  is  used  as  the\nname  of  an  active  file.  This is in turn used to initialize the variable \"activefile\" so\nthat tknewsbiff reads from the active file directly rather than using NNTP.\n\nCreating your own active file is a convenient way of testing your  configuration  file.   For\nexample,  after  running  the following command, you can repeatedly edit your active file and\ntrigger the update-now command (either by pressing button 2 or  setting  the  delay  variable\nvery low) to see how tknewsbiff responds.\n\nThe  active  file  must follow the format of a real active file.  The format is one newsgroup\nper line.  After the newsgroup name is the number of the highest article, the lowest article.\nLastly  is  the  letter  y or m.  m means the newsgroup is moderated.  y means posting is al‐\nlowed.\n\n",
            "subsections": []
        },
        "WINDOW": {
            "content": "When unread news is found, a window is popped up.  The window lists the names  of  the  news‐\ngroups  and  the  number of unread articles in each (unless suppressed by the -display flag).\nWhen there is no longer any unread news, the window disappears (although the process  contin‐\nues to run).\n\n",
            "subsections": []
        },
        "BUTTONS": {
            "content": "Button  or key bindings may be assigned by bind commands.  Feel free to change them.  The de‐\nfault bind commands are:\n\n\nbind .list <1> help\nbind .list <2> update-now\nbind .list <3> unmapwindow\n\n\nBy default button 1 (left) is bound to \"help\".  The help command causes tknewsbiff to pop  up\na help window.\n\nBy  default,  button  2  (middle)  is  bound  to \"update-now\".  The update-now command causes\ntknewsbiff to immediately check for unread news.  If your news server is slow or maintains  a\nvery large number of newsgroups, or you have a large number of patterns in your configuration\nfile, tknewsbiff can take considerable time before actually updating the window.\n\nBy default, button 3 (right) is bound  to  \"unmapwindow\".   The  unmapwindow  command  causes\ntknewsbiff  to  remove  the window from the display until the next time it finds unread news.\n(The mapwindow command causes tknewsbiff to restore the window.)\n\nAs an example, here is a binding to pop up an xterm and run rn when you hold down  the  shift\nkey and press button 1 in the listing window.\n\n\nbind .list <Shift-1> {\nexec xterm -e rn &\n}\n\n\nHere  is  a similar binding.  However it tells rn to look only at the newsgroup that is under\nthe mouse when you pressed it.  (The \"displaylist\" variable is described later in  this  man\npage.)\n\n\nbind .list <Shift-1> {\nexec xterm -e rn [lindex $displaylist [.list nearest %y]] &\n}\n\n\n",
            "subsections": []
        },
        "OTHER COMMANDS AND VARIABLES": {
            "content": "Built-in  commands already mentioned are: watch, ignore, display, help, update-now, unmapwin‐\ndow, and mapwindow.\n\nAny Tcl and Tk command can also be given.  In particular, the list of newsgroups is stored in\nthe  list widget \".list\", and the scroll bar is stored in the scrollbar widget \".scroll\".  So\nfor example, if you want to change the foreground and  background  colors  of  the  newsgroup\nlist, you can say:\n\n\n.list config -bg honeydew1 -fg orchid2\n\n\nThese  can also be controlled by the X resource database as well.  However, the configuration\nfile allows arbitrarily complex commands to be evaluated rather than simple assignments.\n\nCertain Tcl/Tk commands can disrupt proper function of tknewsbiff.  These  will  probably  be\nobvious  to  anyone  who knows enough to give these commands in the first place.  As a simple\nexample, the program assumes the font in the list box is of fixed width.  The newsgroups will\nlikely not align if you use a variable-width font.\n\nThe  following  variables  are accessible and can be used for esoteric uses.  All other vari‐\nables are private.  Private variables and commands begin with \"\" so you don't need to  worry\nabout accidental collisions.\n\nThe  array  \"db\"  is  a  database  which  maintains  information  about read and unread news.\ndb($newsgroup,hi) is the highest article that exists.  db($newsgroup,seen) is the highest ar‐\nticle that you have read.\n\nA  number  of  lists maintain interesting information. \"activelist\" is a list of known news‐\ngroups.  \"seenlist\" is a list of newsgroups that have been seen so far as the -new and -dis‐\nplay flags are being processed.  \"previousseenlist\" is \"seenlist\" from the previous cycle.\n\"ignorelist\" is the list of newsgroup patterns to ignore.  \"watchlist\" is the list of news‐\ngroup  patterns  to  watch.  \"displaylist\" is the list of newsgroup will be displayed at the\nnext opportunity.\n\n",
            "subsections": []
        },
        "UPDATING YOUR FILES": {
            "content": "tknewsbiff automatically rereads your configuration file each time it wakes up to  check  for\nunread  news.  To force tknewsbiff to reread the file immediately (such as if you are testing\na new configuration or have just modified your newsrc file), press button 2  in  the  display\n(see BUTTONS above).\n\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "tknewsbiff  defines  the  number of unread articles as the highest existing article minus the\nhighest article that you've read.  So if you've read the last article in the newsgroup but no\nothers, tknewsbiff thinks there are no unread articles.  (It's impossible to do any better by\nreading the active file and it would be very time consuming to do this  more  accurately  via\nNNTP  since servers provide no efficient way of reporting their own holes in the newsgroups.)\nFortunately, this definition is considered a feature by most people.  It allows you  to  read\narticles  and  then mark them \"unread\" but not have tknewsbiff continue telling you that they\nare unread.\n\n",
            "subsections": []
        },
        "UNWARRANTED CONCERNS": {
            "content": "Your news administrator may wonder if many people using tknewsbiff severely  impact  an  NNTP\nserver.   In  fact,  the impact is negligible even when the delay is very low.  To gather all\nthe information it needs, tknewsbiff uses a single NNTP query - it just asks for  the  active\nfile.  The NNTP server does no computation, formatting, etc, it just sends the file.  All the\ninteresting processing happens locally in the tknewsbiff program itself.\n\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The man page is longer than the program.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "\"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive  Programs\"  by  Don  Libes,\nO'Reilly and Associates, January 1995.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Don Libes, National Institute of Standards and Technology\n\n\n\n1 January 1994                              TKNEWSBIFF(1)",
            "subsections": []
        }
    },
    "summary": "tknewsbiff - pop up a window when news appears",
    "flags": [],
    "examples": [],
    "see_also": []
}