XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 NAME xmotd - message-of-the-day browser for X (and dumb terminals, VT100, etc.) SYNOPSIS xmotd [X-toolkit options] [-always] [-bitmaplogo bitmap-filename] [- browser web-browser] [-help] [-stampfile stamp-filename] [- showfilename] [-usedomains] [-wakeup sleep-period] [-warnfile warning- filename [-paranoid]] [-popdown timeout] motd-filename [motd-filename2 ... ] or xmotd xmotd-options motd-directoryname or (in text-mode) xmotd [-stampfile stamp-filename] [-wakeup sleep-period] motd-filename [motd-filename2 ...] DESCRIPTION xmotd is a message-of-the-day browser for X11 and dumb terminals. Under X11, it displays a customizable bitmap in the top-left corner. It provides for up to 3 lines of title-text (the length of the text depends on the size of the font chosen). It has a "Dismiss" button below the bitmap and a read-only text-widget that displays the message (or messages) of the day. The date of the message (and optionally, the filename) is displayed just above the text. xmotd can be configured to run in various modes: to always pop-up after login or to pop-up only when the motd changes; to pop-down automatically (without user-intervention) after a specified delay; to run in the background and periodically check if the motd has changed and display it. By default, xmotd displays a message only if the file(s) was updated since the last time the user read it. If xmotd has to display more than one file, the user is required to press the "Next Message" button to view subsequent messages; the text of the button changes to "Dismiss" when the last message is displayed. xmotd defaults to text-only mode (output to stdout) when it cannot connect to an X display. This mode is useful for running xmotd from user's ~/.login file in cases where they can also login via dialup. xmotd can display messages marked-up with HTML and xpm colour pixmap logos. Support for these must be configured at compile-time. - 1 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 OPERATION xmotd is usually run from the system Xsession file via xdm(1) and/or from the user's ~/.login file. At sites where xdm is not used, xmotd may be run from the user's ~/.xinitrc where a (possibly) malicious user may intentionally or accidently remove the xmotd invocation from the file. When xmotd first runs, it creates a timestamp file (by default called .xmotd) in the user's home-directory. On subsequent invocations, xmotd uses the date of this file to decide whether or not the message-of- the-day (motd) files have been updated. If the date of the motd file is later than the date on the ~/.xmotd file, then xmotd will display the motd file; otherwise it will silently exit (if there are no more files to be displayed and if -wakeup was not used). When invoked with -wakeup, xmotd daemonizes itself and goes to sleep for the specified sleep-period, periodically waking-up to see if the motds have changed and then displaying them. In cases where user's home-directories are shared (NFS mounted) across various (unique) domains, xmotd supports domain-name based time- stamping by creating timestamps with the appropriate domain-names appended and checks the dates of these timestamps with the date of the message-of-the-day file(s). By default, xmotd pops-down only when the "Dismiss" button is clicked; the rest of the login-procedure then continues. This interactive behaviour can be overriden so xmotd will pop-down without user intervention, after a specified timeout period. OPTIONS All the standard X options are valid. In addition, the following options, which may also be set as resources in the app-defaults file (See RESOURCES), are available: -always overrides xmotd's "smart" behavior; the ~/.xmotd time-stamp is ignored and the message (or messages) is always displayed. Zero-length (empty) files are displayed when this option is specified. -bitmaplogo bitmap-filename specifies that the bitmap bitmap-filename is to be displayed in place of the default bitmap, the "X" logo. Ideally, the specified bitmap should have a width and height of 100 pixels. If xpm support is compiled-in, xpm colour pixmaps may be substituted instead. See NOTES for additional details. - 2 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 -browser web-browser specifies the path and filename of a browser to be used when an URL is clicked (HTML version only). The default is "/usr/local/bin/netscape". See NOTES for additional details. -help prints detailed command-line usage. -paranoid (used with -warnfile) displays the warning message unconditionally at every login (even when there are no messages to be displayed). -popdown timeout indicates that xmotd should exit/pop-down without user intervention, timeout seconds after being invoked. The user can dismiss xmotd at any time before the timeout, by clicking on the "Dismiss" button. This option is only valid at the initial login; it is ignored on subsequent pop-ups when xmotd is invoked with -wakeup. -showfilename displays the filename (as it appears on the command-line), of the file currently being viewed, alongside the date. -stampfile stamp-filename overrides the default timestamp filename, ~/.xmotd and uses stamp-filename instead. -usedomains uses local domain-name based time-stamping in cases where user's home-directories are shared (NFS mounted) across various domains. Time-stamps are created (and checked) with appropriate domain-names appended. -warnfile warning-filename specifies a file containing a standard message used to warn - 3 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 users of the consequences of deviance and sundry unlawful things they should not even think of doing on your network; your network's rules of use, information about disk quotas, modem charges and printer accounting fees (used with -paranoid option). -wakeup sleep-period causes xmotd to run in the background and wakeup periodically every sleep-period hours to check whether the message(s) on the command-line have been modified and therefore need to be (re-)displayed. The sleep period is specified as a floating point number where the fractional portion indicates the number of minutes. For example, a sleep-period of 0.25 indicates 15 minutes (one quarter of an hour) and a sleep-period of 1.5 indicates one and one-half hours; the minimum (enforced) sleep-period is 1 minute. The -wakeup option is useful at sites where users have their own workstations never log-out. See NOTES for additional details. motd-filename [motd-filename2 ... ] one or more files to be displayed may be specified. The file(s) contain the text of the message(s) of the day. If HTML support is compiled-in the motd files should be marked-up with HTML. motd-directoryname Instead of supplying one or more files on the command-line, xmotd may be supplied a directory-name containing file(s) to be displayed. xmotd will scan the directory and display all the files contained therein, that need to be displayed. This feature is useful when used with the -wakeup option; upon waking-up, xmotd will re-scan the directory for any files (including new files that have been subsequently added) that need to be displayed. EXAMPLES Give xmotd a geometry option to tell it to pop-up at a location other than 0,0 and read-in the message-of-the-day from the file /usr/local/motd: xmotd -geometry +20+20 /usr/local/motd Use a bigger window (900x600) and automatically position it (at top- left corner at 20,20), always pop-up xmotd displaying the contents of /usr/local/motd, ignoring the user's ~/.xmotd timestamp-file and pop- - 4 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 down after 20 seconds: xmotd -geom 900x600+20+20 -always -popdown 20 /usr/local/motd Use a custom bitmap as the logo (the bitmap is in the file /usr/local/xmotd.bm): xmotd -geom +5+5 -bitmaplogo /usr/local/xmotd.bm /usr/local/motd In the following example, all the files in /usr/local/messages/ will be checked for modification times greater than the time-stamp and only those files will be displayed and every eight and a half hours, xmotd will check if any files have changed (or new ones added) and display them if necessary: xmotd -geom +5+5 -wakeup 8.5 /usr/local/messages/ To display a warning-message every time the user logs-in (even when no messages need to be displayed), and to display the filenames of the files being viewed, use: xmotd -geom +5+5 -warnfile /usr/local/WARNING -paranoid \ -showfilename /usr/local/motds/ X resources may be changed from the command-line using the -xrm option. This example (typed as a single line) illustrates how xmotd can be customized exclusively from the command-line: /usr/X11/bin/xmotd -always \ -xrm "*title.label: Top 10 Disk Hogs As of midnight " \ -xrm "*title.foreground: yellow" \ -xrm "*form.background: red" \ -xrm "*title.background: red" \ -xrm "*logo.background: pink" \ -xrm "*text*font: -adobe-times-bold-*-normal-*-*-180-*" \ -geometry 500x650-1-1 \ -bitmaplogo /usr/common/choke.xbm -popdown 10 \ /usr/common/accounting/top & RESOURCES The application class-name is XMotd. The resource: XMotd*Always (set to either True or False) is equivalent to the -always command-line option. The resource: XMotd*Popdown (set to the number of seconds) is equivalent to the -popdown command-line option. - 5 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 The resource: XMotd*Browser (set to the path and filename of the browser to be used when users click on an URL (HTML version only)) is equivalent to the -browser command-line option. The resource: XMotd*BitmapLogo (set to the path and filename of the bitmap/pixmap-file) is equivalent to the -bitmaplogo command-line option. The resource: XMotd*UseDomains (set to True/False) is equivalent to the -usedomains command-line option. The resource: XMotd*ShowFilename ((set to True/False) is equivalent to the -showfilename command-line option. The resource: XMotd*Paranoid ((set to True/False) is equivalent to the -paranoid command-line option. The resource: XMotd*Warnfile (set to the path and filename of the warning-file) is equivalent to the -warnfile command-line option. The resource: XMotd*Wakeup (set to an floating-point number representing hours) is equivalent to the -wakeup command-line option. The resource: XMotd*title.label (set to a possibly multi-line string) may be used to customize the title). By default, the title is the single line:"Message Of The Day\n\n\n" (the 2-character sequence, "\n", indicates a carriage-return). For example, if you want a 2 line title that reads: This is the Message of the Day the resource can be specified as: *title.label: \ This is the\nMessage of the Day\n\n Note that the first backslash quotes the leading spaces that indent the words, "This is the". WIDGET HIERARCHY The widget hierarchy is as follows (Class-name & object-name): XMotd xmotd Form form Label logo Label title Label hline Label info - 6 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 Command quit Text text OR Html text FILES $ProjectRoot/lib/X11/xdm/Xsession (where $ProjectRoot is /usr/X11R6 or, perhaps /usr/X11). $HOME/.xmotd (default stamp-file) $HOME/.login SEE ALSO X(1), xdm(1), login(1), xv(l), gimp(l), xpaint(l), cat(1), less(l) NOTES The -always option is considered fascist; it is provided merely for completeness and for testing purposes. If xpm support is compiled-in, xmotd -help will print the words "bitmap/pixmap" for the -bitmaplogo description instead of just "bitmap". Under dumb-terminal mode, all command-line options are ignored with the exception of -stampfile and -wakeup; the -always option is equivalent to cat'ing the motd from the ~/.login file; and -popdown is not really relevant. Both -warnfile and -paranoid may be simulated with appropriate cat(1) and more(1) commands. xmotd processes invoked with -wakeup will continue sleeping, "S" in the ps(1) status field, after the user has logged-out until the sleep timeout expires. Only when xmotd wakes-up, will it will detect that the user has logged-out and exit. xmotd's logout-detection routine relies on the xdm(1) support scripts GiveConsole and TakeConsole setting the correct permissions and ownership on /dev/console. When xmotd wakes-up, it attempts to open(2) /dev/console for reading; if this open fails, it indicates that the user has logged out because TakeConsole has changed ownership of the console. The -browser option was originally called -netscape; it was renamed to be more generic. When initially run, the browser is invoked as: "/usr/local/bin/netscape %s" where %s is replaced by the selected URL. Subsequent URLs will be displayed in the already running browser using the syntax: - 7 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 "/usr/local/bin/netscape -remote openURL(%s)" You may substitute a browser of your choice for netscape, if it supports this syntax. BUGS At least one. Also, there are no provisions for displaying embedded images in the HTML version of xmotd. QUOTES and our lives are forever changed we will never be the same the more you change the less you feel --Tonight, tonight, "Mellon Collie And The Infinite Sadness" Billy Corgan, The Smashing Pumpkins Omnia mutantur, nos et mutamur in illis. (All things change, and we change with them). --Matthias Borbonius: Deliciae Poetarum Germanorum, i. 685 To everything there is a season, And a time to every purpose under heaven. --Ecclesiastes 3:1-4 AUTHORS Luis Fernandes <elf@ee.ryerson.ca> is the primary author and maintainer. Richard Deal <rdeal@atl.lmco.com> contributed the directory-scanning code. Stuart A. Harvey <sharvey@primenet.com> contributed the URL support code for the HTML version. David M. Ronis <ronis@onsager.chem.mcgill.ca> contributed code to support xpm logos. - 8 - Formatted: December 5, 2024 XMOTD(8) X11 Release 6.3 XMOTD(8) Sep 12 1997 COPYRIGHT Copyright 1993 (as xbanner, no public release) 1994-97, Luis A. 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. This application 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. The HTML widget Copyright 1993, Board of Trustees of the University of Illinois. See the file libhtmlw/HTML.c for the complete text of the NCSA copyright. - 9 - Formatted: December 5, 2024