XMOTD 1.15 README December 1997, Luis Fernandes, <firstname.lastname@example.org> Toronto, Canada xmotd is a message-of-the-day browser for X11 and dumb-terminals. Briefly, it features: o customizable bitmap/pixmap and title text; o multiple messages displayed sequentially; o sleep and periodically wake-up to check if the motd(s) change and display them; o builds for either Motif or Athena toolkits; o displaying messages with HTML mark-up REQUIREMENTS Xmotd requires, at minimum, X11R5 including Xt (the X Toolkit) for the resource and command-line parsing functions, and the Athena widget (Xaw) libraries. Optionally, Xm (the Motif toolkit) should be installed if you wish to compile the Motif version; the Xpm library should be installed if you wish to compile-in support for colour logos. The HTML library is not included with the 'lite' distribution. xmotd is available in different flavours: - with the Athena widget library (default), or; - with Athena & HTML widget, or; - with the Motif widget library, or; - with Motif and HTML widget. All the flavours can be built from the single distribution. It's just a matter of defining the correct parameters in the Imakefile and compiling. First, unpack the distribution with: zcat xmotd-1.15.tar.gz | tar xvf - A directory called xmotd-1.15 will be created; cd into that directory. To build the default flavour type: xmkmf -a; make all Note: If your xmkmf does not support the -a option (e.g. /usr/openwin/bin/xmkmf), type: xmkmf; make makefiles The default build is the bare bones xmotd. Refer to the commentary in the Imakefile for details on customizing the build for HTML, Motif and XPM support. After the compilation is complete (there will be some compilation warnings when the HTML widget is being compiled; ignore them) and if you wish to install xmotd automatically, type: make install PLATFORMS xmotd was developed on a Sun SPARCstation under X11R6.3 using gcc 2.7.1 and emacs 19.34 and gdb. It has been sucessfully compiled under SunOS 4.1.4, Solaris 2.5.1 and Linux 2.30. xmotd has also been successfully compiled on the following platforms: HP 9000/735 running HP-UX 9.03 (X11R5). IBM RS/6000 model C10 (PowerPC) running AIX v3.2.5. Silicon Graphics INDY running Irix 5.3 (X11R5) Mips/CDC (running EPIX) and PCS/M68030 (running MUNIX/SysV). MANIFEST This distribution contains the following files: README (this file) ACKNOWLEDGEMENTS (contributors to xmotd) GNU (Terms of GPL) Imakefile (X Consortium's gift to humanity) Makefile (...3 guesses) XMotd (app-defaults) XMotd_motif (Motif app-defaults) xmotd.8 ([nt]roff man-page) xlogo.bm (default bitmap, the "X"-logo) xlogo.xpm (default pixmap used w/ xpm support) *.c, *.h (source) patchlevel.h (version tag) browser (shell script) libhtmlw/ (NCSA HTML widget; not in 'lite' version) OPERATION When xmotd runs (under both X11 and dumb-terminals), it creates a time-stamp file (called ".xmotd", by default) in the user's home-directory. It uses the date of this file to check whether the message of the day (motd) file has changed since the user last read it. If the date of the motd is later than the date on the ~/.xmotd time-stamp-file, then xmotd will display the message; otherwise it will silently exit. EXAMPLES xmotd is meant to be run from the system Xsession file by xdm. One or more message-of-the-day files are passed to xmotd as the last option after any other command-line options: xmotd -geometry +20+20 /usr/local/motd When xmotd is supplied with more than one file (or a directory (see next example)) on the command-line, it will selectively display only those files which have a modification date later than that of the time-stamp. A "Next Message" button is available to proceed forward through the list of messages; the button changes to "Dismiss" when the last message is displayed. With the -warnfile option, xmotd is capable of displaying a file containing a standard warning message used to warn users of the consequences of deviance and sundry unlawful things they should not even think of doing on your network. This file can be displayed only when xmotd has a new message to display or optionally, at every login. In the following example, all the files in the directory /usr/local/messages/ will be checked for changes and only those files will be displayed: xmotd -geom 900x600+20+20 -wakeup 1 /usr/local/messages/ & After all the files are displayed, and the user presses "Dismiss" xmotd will sleep for one hour (indicated by "-wakeup 1"), then wakeup and check the directory for changes and pop-up again if any of the files have changed (or new files have been subsequently added). The "-geom" (abbreviated form of "geometry") option specifies a wider window and automatic placement of the window's top-left corner at 20,20. xmotd has many other options. Refer to the man-page for further details on customizing and more examples showing xmotd in use. You can read the man-page, without installing it, with the following command: nroff -man xmotd.8 | less RUNNING xmotd FROM .login xmotd can also be run from a user's ~/.login file. xmotd defaults to text-mode mode when it fails to connect with an X server (i.e. the DISPLAY environment variable is not set, login via dialup-lines, etc.). Note that -stampfile and -wakeup are the only two command-line options recognized in text-only mode. CUSTOMIZING THE BITMAP By default, xmotd displays the X-logo as the bitmap (colour pixmap if xpm support is compiled-in) in the top-left corner. Your organization's logo, rendered as an X-bitmap/pixmap may be specified, either via a command-line option (-bitmaplogo) or as an app-defaults resource. APP-DEFAULTS Reasonably adequate application defaults are compiled into xmotd so it is NOT necessary to install the supplied app-defaults file. You can customize the resources with the supplied app-defaults file, XMotd (XMotd_motif, for the Motif version; rename it XMotd before installing and comment-out appropriate resources if building with HTML support), and install it in: $ProjectRoot/lib/X11/app-defaults/XMotd All resources are available as command-line option equivalents so xmotd may be customized completely via the command-line. COPYRIGHT (xmotd) xmotd Copyright 1993 (as xbanner), 1994-97 Luis Fernandes Permission to use, copy, hack, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. xmotd IS PRESENTED AS IS, WITHOUT ANY IMPLIED OR WRITTEN WARRANTY. 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. 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. 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., 675 Mass Ave, Cambridge, MA 02139, USA. COPYRIGHT (HTML widget) libhtmlw is copyright (C) 1993, Board of Trustees of the University of Illinois. See the file libhtmlw/HTML.c for the complete text of the NCSA copyright.