[comp.windows.x] motd under xdm?

uk1@spacsun.rice.edu (Paul A. Scowen) (02/18/91)

Hi,

since xdm has effectively turned off the function, does anyone know how to
put in a way for the motd to still be displayed at login?  It would be handy
for it to come up in it's own dismissable window, or the quick and dirty is
to do a -e on the main xterm as its started but I can't get the syntax right:

I try:		xterm ... -e "more /etc/motd"

I get:		xterm: Can't execvp more /etc/motd

any ideas?  Or do I have to go and put the window together?  Thanks all.

-- 
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
-							  __________	      -
|	Paul A. Scowen					 / ___  ___ \ 	      |
-	Department of Space Physics and Astronomy	/ / @ \/ @ \ \        -
|	Rice University, Houston TX 77251	        \ \___/\___/ /\       |
-	(713) 527-8101 x2433, x3534			 \____\/____/||       -
|							 /     /\\\\\//       |
-	Internet:	uk1@spacsun.rice.edu		 |     |\\\\\\	      -
|			scowen@vega.rice.edu		  \      \\\\\\       |
-							   \______/\\\\	      -
|	Span:		RICE::SCOWEN			    _||_||_	      |
-							     -- --	      -
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|

garyc@hobbes.wv.tek.com (Gary Combs) (02/20/91)

Here is what I use:

	In my .x11init (.Xsession or others) I put

		/usr/local/bin/checkmotd

	It then checks /usr/local/bin/Motd. Here are the scripts.

------------- /usr/local/bin/checkmotd --------------------
#!/bin/sh
if [ ! -f $HOME/.motd ]
then
	touch $HOME/.motd
	sleep 5
	xterm -geometry 70x24+110+120 -title "Message Of The Day" -fn LucidaV2RT14 -e /usr/local/bin/Motd &
else
	whic="`ls -lt /etc/motd $HOME/.motd`"
	file="`echo $whic | awk ' { print $9 } '`"
	if [ "$file" = "/etc/motd" ]
	then
		touch $HOME/.motd
		sleep 5
		xterm -geometry 70x24+110+120 -title "Message Of The Day" -fn LucidaV2RT14 -e /usr/local/bin/Motd &
	fi
fi
------------- /usr/local/bin/Motd --------------------
#!/bin/sh
cat /etc/motd
echo "Press return when done reading ..."
read ans

stumpf@Informatik.TU-Muenchen.DE (Markus Stumpf) (02/21/91)

There is also my xlogin program available on expo.lcs.mit.edu:contrib.
It has also been posted in comp.sources.x, Volume 08 Issue 51.

It's typically started in xdm's Xstartup and it handles quotas, lastlogin,
utmp, wtmp, /etc/motd, /etc/nologin and $HOME/.hushlogin

However, there is a little bug in it, which I haven't already fixed (i.e.
sent out a patch for). You have to add the line

	exit(!do_login);

as the last statement in xlogin.c:main().
Otherwise the exit-code is 1, if a user has a $HOME/.hushlogin file and that
is interpreted as "deny login".

If you can't get it on either place, drop me a note and I'd be glad to send
you a copy by mail!

	\Maex

-- 
+- Markus Stumpf                           Technische Universitaet Muenchen   -+
|                                              Institut fuer Informatik        |
|  stumpf@informatik.tu-muenchen.de                Postfach 202420             |
+-   ...@{unido.uucp,relay.cs.net}          D-8000 Muenchen 2, West Germany   -+