I wanted a clock to appear on my xdm login screen, and to disappear
again when I logged in.
/etc/X11/xdm/{Xsetup,Xstartup} are conffiles, which makes it practical
to do this. But I wanted something more general, so I modified them
to invoke scripts found in xsetup.d and xstartup.d directories. The
patches are below.
The patches invoke the scripts with "setup" and "startup" arguments,
so that they know when they're being called, so that you can have a
single script be both setup and startup, and link it into both
directories.
Up to you if you use the patch, include a similar feature a different
way, or don't include the feature at all.
ttfn/rjk
--- Xsetup.orig Fri Oct 26 23:28:45 2001
+++ Xsetup Mon Oct 22 20:55:22 2001
@@ -22,6 +22,10 @@
echo $! > $PIDFILE
fi
+if [ -d /etc/X11/xdm/xsetup.d ]; then
+ run-parts --arg=setup /etc/X11/xdm/xsetup.d
+fi
+
exit 0
# vim:set ai et sts=2 sw=2 tw=0:
--- Xstartup.orig Fri Oct 26 23:28:59 2001
+++ Xstartup Mon Oct 22 20:58:27 2001
@@ -20,6 +20,10 @@
fi
fi
+if [ -d /etc/X11/xdm/xstartup.d ]; then
+ run-parts --arg=startup /etc/X11/xdm/xstartup.d
+fi
+
# insert a utmp entry for the session
if grep -qs ^use-sessreg /etc/X11/xdm/xdm.options && command -v sessreg > /dev/null 2>&1; then
exec sessreg -a -l $DISPLAY -u /var/run/utmp -x /etc/X11/xdm/Xservers $USER