XMOTD(8)
π XMOTD π (section 8, System Manager's Manual)
okay bestie, sit down, hydrate, and let me tell you about xmotd β the message-of-the-day browser for X (and dumb terminals, VT100, etc.). yes she does both. versatile queen. π
β¨ NAME β¨
xmotd β message-of-the-day browser for X (and dumb terminals, VT100, etc.)
π¦ SYNOPSIS π¦
xmotd [X-toolkit options] [xmotd-options] file [file2 ... ]
xmotd [X-toolkit options] [xmotd-options] directory
or (in text-mode)
xmotd [-stampfile stamp-file] [-wakeup sleep-period] file [file2 ...]
πΈ DESCRIPTION πΈ
So xmotd is a utility program (for X11 and dumb terminals, we love an inclusive icon) that you can run during the login process to show people pertinent messages β aka the message of the day β or to periodically check, while the user is logged in, whether one or more message files have been modified, and display them if they have. lowkey a little babysitter for your motd files. π
Under X11, it displays a customizable bitmap in the top-left corner. It provides for up to 3 lines of title-text (and just so you know, the length of the text depends on the size of the font you chose β pick wisely). 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. cute layout honestly. π
xmotd can be configured to run in various modes, and the range is giving versatility:
- 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. no spam, only freshness. β¨
If xmotd has to display more than one file, the user is obliged to press the "Next Message" button to view subsequent messages; the text of the button changes to "Dismiss" when the last message is displayed. so you always know when you're at the end. periodt.
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. dialup besties, we see you. π«Ά
This version of xmotd cannot display messages marked-up with HTML and xpm colour pixmap logos, because the code that provided that functionality does not comply with Debian Free Software Guidelines. not a bug, a whole licensing moment. π
π OPERATION π
xmotd is usually run from the system Xsession file via xdm(1), CDE login 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 accidentally remove the xmotd invocation from the file. π the way that one line is the only thing standing between you and chaos.
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. nap era but make it productive. π€
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 overridden so xmotd will pop-down without user intervention, after a specified timeout period. consent-based pop-down, we respect it. π
π 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β overridesxmotddefault behavior; the~/.xmotdtime-stamp is ignored and the message (or messages) is always displayed. Zero-length (empty) files are displayed when this option is specified. yeah even the empty ones. she said no skips. π-atom atom-nameβ registerxmotdwith name atom-name. By default, only onexmotdis allowed to run (per user). You can permit multiple instances ofxmotdto run by giving each instance an unique name.xmotdwill intern an atom with the X server, that combines the atom-name and the user's login-id (e.g."xmotd.elf"; the default atom name is"xmotd"); subsequent invocations ofxmotdwill check if this atom exists and exit if it does. one-at-a-time by default, but you can collect them like pokΓ©mon if you want. π¦-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. glow-up your corner logo fr fr.-helpβ displays command-line options usage. bestie behaviour, honestly.-paranoidβ (used with-warnfile) displays the warning message unconditionally at every login (even when there are no messages to be displayed). every single time. no exceptions. the vibe check never sleeps. π€-popdown timeoutβ exit or pop-down without user intervention, timeout seconds after being invoked. The user can dismissxmotdat 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 whenxmotdis invoked with-wakeup. important: initial login only, she ghosts the wakeup pop-ups. π-showfilenameβ displays the filename of the file currently being viewed (as it appears on the command-line), alongside the date. receipts, always. π§Ύ-stampfile stamp-filenameβ overrides the default timestamp filename,~/.xmotd, and uses stamp-filename instead. rename your timestamp, it's your world.-tailβ display the end of a file; the text is automatically scrolled so the end of the file is visible. always read the last page first, iconic. π₯-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. NFS girlies, this one's for you. πΈ-warnfile warning-filenameβ specifies a file containing a standard message used to warn 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). the official "we saw what you did" letter. π-wakeup sleep-periodβ causesxmotdto run in the background and wakeup periodically every sleep-period hours to check whether the files 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 of0.25indicates 15 minutes (one quarter of an hour) and a sleep-period of1.5indicates one and one-half hours; the minimum (enforced) sleep-period is 1 minute. The-wakeupoption is useful at sites where users with personal workstations never log-out. See NOTES for additional details. math girlies rise, the decimal point is the minutes. β¨file [file2 ... ]β 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. (reminder: this build doesn't do HTML, see above π« )directoryβ Instead of supplying one or more files on the command-line,xmotdmay be supplied a directory containing file(s) to be displayed.xmotdwill scan the directory and display all the files contained therein, that need to be displayed. This feature is useful when used with the-wakeupoption; upon waking-up,xmotdwill re-scan the directory for any files (including new files that have been subsequently added) that need to be displayed. whole-directory energy, she'll find the new ones too. π
π 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-down after 20 seconds:
xmotd -geom 900x600+20+20 -always -popdown 20 /usr/local/motd
Use a custom bitmap 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:
xmotd -always \
-xrm "*title.label: Top 10 Disk Hogs\n As of midnight\n " \
-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 &
and that's the whole command-line-customization fantasy, bestie β she's doing full drip from flags alone. π
β¨ RESOURCES β¨
okay bestie, so you can also configure xmotd through X resources instead of screaming flags at it every time π
editres(1) is your girl for editing these. The application class-name is XMotd.
Every single one of these maps straight onto a command-line option, so if you already read the OPTIONS section you're basically done here, but let's run it back anyway because thoroughness is a personality trait:
XMotd*Alwaysβ set it toTrueorFalse, does the exact same thing as the-alwayscommand-line option.XMotd*Atomβ set it to the name of the atom xmotd is registered with; same deal as-atom.XMotd*BitmapLogoβ set it to the path and filename of the bitmap/pixmap-file; same as-bitmaplogo.XMotd*Browserβ set it to the path and filename of the browser to be used when users click on an URL (HTML version only); same as-browser.XMotd*Paranoidβ set it toTrue/False; same as-paranoid.XMotd*Popdownβ set it to the number of seconds; same as-popdown.XMotd*UseDomainsβ set it toTrue/False; same as-usedomains.XMotd*ShowFilenameβ set it toTrue/False; same as-showfilename.XMotd*Warnfileβ set it to the path and filename of the warning-file; same as-warnfile.XMotd*Tailβ set it toTrue/False; same as-tail.XMotd*Wakeupβ set it to a floating-point number representing hours; same as-wakeup.XMotd*title.labelβ set it to a possibly multi-line string and you can customize the title π
By default the title is the single line:
"Message Of The Day\n\n\n"
and just so we're clear, that 2-character sequence, "\n", means carriage-return.
So like, say you want a 2 line title that reads:
This is the
Message of the Day
you'd specify the resource as:
*title.label: \ This is the\nMessage of the Day\n\n
and note that the first backslash quotes the leading spaces that indent the words, "This is the". sneakyyyy π«Ά
π¦ WIDGET HIERARCHY π¦
here's the whole family tree, class-name & object-name style:
XMotd xmotd
Form form
Label logo
Label title
Label hline
Label info
Command quit
Text text OR Html text
look at that structure. iconic. organized. main character energy π
πΈ FILES πΈ
$ProjectRoot/lib/X11/xdm/Xsession
(where $ProjectRoot is /usr/X11R6 or, perhaps /usr/X11.)
- For systems running CDE, put a script that invokes xmotd in
/etc/dt/config/Xsession.d/ $HOME/.xmotd(default timestamp filename)$HOME/.login
π SEE ALSO π
X(1), xdm(1), editres(1), login(1), xv(l), gimp(l), xpaint(l), cat(1), less(l)
π NOTES π
ngl bestie, some of these are important so don't skim:
- The
-alwaysoption is considered fascist; it is provided merely for completeness and for testing purposes. not me quoting the manpage directly but fr, that's what it says π - If xpm support is compiled-in,
xmotd -helpwill print the words"bitmap/pixmap"for the-bitmaplogodescription instead of just"bitmap". - Under dumb-terminal mode, all command-line options are ignored with the exception of
-stampfileand-wakeup; the-alwaysoption is equivalent tocat'ing the motd from the~/.loginfile; and-popdownis not really relevant. Both-warnfileand-paranoidmay be simulated with appropriatecat(1)andmore(1)commands. - xmotd processes invoked with
-wakeupwill continue sleeping,"S"in theps(1)status field, after the user has logged-out until the sleep timeout expires. Only when xmotd wakes-up, will it detect that the user has logged-out and exit. xmotd's logout-detection routine relies on thexdm(1)support scriptsGiveConsole(whichchown's/dev/consoleto the user) andTakeConsole(whichchown's/dev/consoleback to root) setting the correct permissions and ownership on/dev/console. When xmotd wakes-up, it attempts toopen(2)/dev/consolefor reading; if this open fails, it is an indication that the user has logged out becauseTakeConsolehas changed ownership of the console.
like, the whole detection thing is basically "can I still open the console? no? guess they left π€·" β cute but a lil cursed, we love it anyway.
π BUGS π
- There are no provisions for displaying embedded images in the HTML version of xmotd (until a stable XmHTML widget is available, or perhaps when xmotd is ported to the GTK).
- At least one other.
the "at least one other" is sending me. author said you'll find out π
π 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
the manpage said poetry section and meant it β¨
π 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.
four whole legends fr fr π
π COPYRIGHT π
- Copyright 1993 (as xbanner, no public release)
- Copyright 1994-97, 1999, 2001, 2003 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.
NOTE: THE HTML WIDGET IS NOT DISTRIBUTED IN THE "LITE" VERSION OF THE xmotd DISTRIBUTION, WHICH IS THEREFORE FULLY COMPLIANT WITH THE GPL.
and that's a wrap bestie π«Ά this lil page came from X11 Release 6.4, dated Nov 24 1999, and it's page XMOTD(8) β go touch some grass, then come back and cat your motd like the icon you are π
π¦ where this page comes from
- debian bookworm: xmotd 1.17.3b-10+b1 Β· GPL-2.0-or-later
- debian trixie: xmotd 1.17.3b-12 Β· GPL-2.0-or-later
- ubuntu jammy: xmotd 1.17.3b-10 Β· GPL-2.0-or-later
- ubuntu noble: xmotd 1.17.3b-11build2 Β· GPL-2.0-or-later
- ubuntu questing: xmotd 1.17.3b-13
- ubuntu resolute: xmotd 1.17.3b-13build1 Β· GPL-2.0-or-later
- ubuntu stonking: xmotd 1.17.3b-13build1 Β· 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