XWATCH(1)
π XWatch(1) β The Logfiles Watcher π
okay bestie, gather round because this is the manual for XWatch, the logfile watcher, and it is lowkey iconic. It's giving 1996, it's giving X11, it's giving "I just want to see my logs scroll by in real time." Written by Karel Kubar (karel@icce.rug.nl), State University of Groningen, Westerhaven 16, 9718 AW Groningen, The Netherlands. Dated 1996. Periodt. π
β¨ Chapter 1: Introduction β¨
So XWatch is a small program that the author wrote to monitor logfiles and to see any changes directly β instead of having to read all the logs after a breakin or a crash (π the pain, the pain). XWatch is simply started with a few file arguments, and any information that appears on the files is displayed. With a slider you can see past information; i.e., lines that scroll in xwatch's window. That's all there is to it. The appearance of the xwatch window can furthermore be modified via command line flags or via an application defaults file.
Older versions of XWatch had a button to activate an options window. That code got removed β almost no-one uses it. rip bozo, you will not be missed πͺ¦
XWatch is incidentally the author's first application with the XForms GUI library for X, which he can highly recommend for developers who want to start X programming but who don't want to go through the hassle of having to learn about intrinsics. XForms is really excellent. Congrats, T.C. Zhao and Mark Overmars (the latter is rumored to bootleg at a soccer club in his free time ;). Instructions on where and how to get the XForms library are in the Makefile, contained in xwatch's distribution.
Debian maintainer note: XWatch doesn't have an active upstream maintainer. If you are interested in taking over this package, please see the file /usr/share/doc/xwatch/README.debian π
π¦ Chapter 2: Using xwatch π¦
You typically start xwatch when activating an X session; e.g., from the file which xdm uses to fire up a user's session (this file is normally /usr/X11/lib/X11/xdm/Xsession). The command that starts xwatch is something like
xwatch [options] files &
where options are optional flags, files are the files to watch, and the ampersand character is used to start xwatch in the background. The files to watch are typically in the directory /var/adm/: files which are created by the syslog daemon (see the file syslogd.conf.SAMPLE in the distribution for an example).
XWatch accepts only filenames which are:
- ordinary files, no sockets, directory names,
- which are not binary files.
Other files as stated on the commandline are not monitored. When any non-proper file is given on the commandline, xwatch warns about the file not being acceptable and deletes it from its list of names. like, blocked. removed from the group chat. π
πΈ 2.1: Options to the xwatch program πΈ
The options are many, start xwatch without arguments to see what is supported. All options can also be stated in the file /usr/lib/X11/app-defaults/XWatch as X resources (see the file XWatch.ap as an example). In the following enumeration, a nr denotes a number:
-border nrβ Specifies whether xwatch should start with a border. The nr must be0or1. When you start xwatch without a border, your window manager may not be able to resize or even recognize it. Incidentally, this may be what you want β the author uses it tohidethe presence of xwatch from his window managerfvwm. stealth mode, main character energy β¨-geometry geomβ Specifies the display geometry, a-la other X programs. You can express the geometry in terms ofWxH(width by height), optionally postfixed by+X+Y(x and y offset) or-X-Y(offsets relative to the lower right corner) and other combinations.
Note that previous switches that emulated the geometry specification, such as-xposand-height, are now obsolete. Use the geometry setting. they're done, they're over, move on bestie
-fg colorand-bg colorβ These options define the default foreground and background of the watch window.
Note that previous switches, such as-bredand-bblue, are now obsolete. πͺ¦
-printtime nrβ Defines whether xwatch should prefix any info on the watched files with a timestamp. The nr can be0or zero; the timestamp is printed when nr is1.-printname nrβ Defines whether xwatch should prefix any info on the watched files with the filename. The nr is again a flag,0or1.-newline nrβ Defines whether xwatch should let a newline follow the time and/or filename stamp, so that the actual information is displayed on its own line. clean layout, we love to see it π«Ά-interval nrβ Defines the scanning interval. Each nr seconds, xwatch will check if new information has arrived on the watched files. The nr may be between1and30seconds.-fontsize nrβ Defines the initial size of the display font. The nr may range from1to4;1being the smallest font and4being the largest.-fontstyle nrβ Defines the style of the used font. The nr is a number between0and15(0being the default). Start xwatch without arguments or read the application defaults file to see what fonts the numbers choose.-firstwarnings nrβ Defines whether xwatch should print initial warnings into the watch window. E.g., you might like to set firstwarnings to zero, and then start xwatch with the file argument/var/adm/*. Warnings about, e.g.,utmpbeing a binary file would then be suppressed. π-printversion nrβ Controls whether xwatch prints its version number and copyright notice upon startup in the watch window.-gag textβ This option, when present, prevents all lines with text in them from being shown in the display window. You can specify more than one string togag, in that case, separate the strings with|. silence them, we don't need that noise-colorstring col:stringβ This option causes lines that contain string to be displayed using the specified color. The string is matched literally. E.g., if you use the option-colorstring blue:connectionthen all lines containingconnectionare displayed in pure blue. π
You can specify several colorstrings by separating all options with a | character, as in -colorstring blue:connection|red:error. Note that, for reasons of shell expansion, you should quote such options on the commandline.
-title nameβ This option sets the window title of the watch window. Note that the title will only be visible when border is not0. This option may be useful if you have several XWatch windows, monitoring different things. one for each vibe, as you should π-ignore fileA|fileB|fileC|...β This option is handy if you start XWatch with a wildcard file argument, but when you want XWatch not to process some files. The-ignoreflag removes the stated files from the watchlist. Note that, for reasons of shell commandline expansion, you must quote the file specification (or the shell will interpret the|characters as pipes). (Thanks, Frank Brokken,frank@icce.rug.nlfor the code).
Debian Maintainer's note: Applications defaults are stored in/etc/X11/app-defaults/XWatch. System adminitrators who want to customize xwatch globally may also create a file/etc/X11/Xresources/xwatchfor these configurations by prefixing the entries withXwatch(see/usr/share/doc/xwatch/README.Debianfor an example). Individual users can make the same types of changes in their~/.Xdefaultsor~/.Xresourcesfiles.
Before you extensively use the options, create an application defaults file /usr/lib/X11/app-defaults/XWatch. You can do so by copying the file XWatch.ap, extracted from the archive, to /usr/lib/X11/app-defaults/XWatch. The comments in the distributed application defaults file explain what you can configure and show examples.
Some systems do not have the directory /usr/lib/X11/app-defaults. In that case, you should create the following links:
/usr/X11should point to your X11 distribution; e.g. to/usr/X11R6. That way, you always have e.g./usr/X11/bin, even after upgrading your X11 distribution. All that is needed is one new link./usr/lib/X11should point to/usr/X11/lib/X11.
Then edit the file XWatch in the application defaults directory, and follow the instructions therein to define your favorite settings. If you need to start xwatch incidentally with another setting, use a flag. π
π 2.2: File arguments π
The filename arguments can optionally be followed by a color specification that applies only to that particular file. E.g., say you want to see all the files in /var/adm normally in blue text; but you want to see /var/adm/critical (critical messages from applications) in yellow and /var/adm/auth (authentification messages) in red. In that case, the course to follow would be:
- The default foreground color would be blue. You could set this with the flags
-fg blue, or in the application defaults file. - The color for
/var/adm/criticalshould be yellow. Hence, the first file argument would be/var/adm/critical:yellow. - The color for file
/var/adm/authshould be red, hence the second file argument would be/var/adm/auth:red. - The following arguments would be the files, using the standard foreground (blue):
/var/adm/*, without any extra color specifications.
look at that color-coding glow-up π π
Such a commandline would cause xwatch to complain about the multiple presence of /var/adm/critical (once from the separate argument, and once from the wildcard argument) and similarly about /var/adm/auth. If this bothers you, turn off the initial warnings (e.g., using -firstwarnings 0 or in the application defaults file). it's not drama, it's just doing its job π
Note that besides the color specifications for filenames, you can also specify coloring for lines that match a given string in all files. See the above description of the switch -colorstring for more information.
β Chapter 3: Obtaining xwatch β
XWatch can be obtained at the ftp site ftp.icce.rug.nl, in the directory /pub/unix, as the file xwatch-X.YY.tar.gz. X.YY is the version number, e.g., 1.00. This site is the primary site, so check here for new versions. π₯
To unpack the archive, change-dir to your sources directory (e.g., /usr/local/src) and type
tar xvzf /where/ever/you/put/it/xwatch-X.YY.tar.gz
Next, change-dir to the unpacked subdirectory xwatch and check there. You will find a subdirectory src with the full sources. slay, go read the source bestie π¦
π οΈ Chapter 4: Compiling xwatch π οΈ
okay bestie, you wanna build this thing from source instead of just vibing with a binary? say less. here's the whole ritual, step by step, no skips, no shortcuts. π
startit()
- first things first β you NEED the XForms library and its include files to compile
xwatch, no way around it. go peek at theMakefilein thesrcsubdirectory, it lists two ftp sites that carry XForms for Linux. obtain the library, install it, done. and good news: XWatch will happily run with XForms version0.81or0.88β both are valid, both are iconic. β¨ - now slide into the
srcsubdirectory and edit theMakefileβ there's somedefinesat the top you're gonna wanna adjust. for example, amake installcopies the binary by default to/usr/local/X11/bin; if that's not your vibe, adjust it. your install, your rules. π«Ά - next: do a
make install, followed by amake clean. in that order, bestie. that's literally it. slay. π₯ - copy the file
XWatch.apfrom the source directory to/usr/lib/X11/app-defaults/XWatch. then edit that file and state your favorite settings. make it yours. π - finally, start the program
xwatchwith some file arguments in your logfiles directory. if you're satisfied with the appearance and workings ofxwatch, add the invocation to your script that starts an X session so it just... happens automatically. main character energy, fr fr. π¦
endit()
π Chapter 5: Copyright π
okay legal o'clock, but we're gonna make it cute. β¨
XWatch β a tool to monitor logfiles and display new logs in an X window.
Copyright (C) 1995 Karel Kubar. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
You may link this software with XForms (Copyright (C) by T.C. Zhao and Mark Overmars) and distribute the resulting binary, under the restrictions in clause 3 of the GPL, even though the resulting binary is not, as a whole, covered by the GPL. (You still need a separate license to do so from the owner (s) of the copyright for XForms, however). If a derivative no longer requires XForms, you may use the unsupplemented GPL as its license by deleting this paragraph and therefore removing this exemption for XForms.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
bestie, read that again. no warranty. zero. none. if it breaks, that's on the universe, not on anybody else. π
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
and that's a wrap on the whole page, bestie!! π the footer down at the bottom just says XWatch () β that's the source/version and the date doing their little signature, quiet but iconic, and honestly? they ate. go monitor some logfiles. i'm obsessed. πβ¨π¦
π¦ where this page comes from
- debian bookworm: xwatch 2.11-16.1
- debian trixie: xwatch 2.11-16.3
- ubuntu jammy: xwatch 2.11-16
- ubuntu noble: xwatch 2.11-16.1build1
- ubuntu questing: xwatch 2.11-16.3
- ubuntu resolute: xwatch 2.11-16.3build1
- ubuntu stonking: xwatch 2.11-17 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms