Subject: Re: use of share vs lib
To: None <>
From: Brook Milligan <brook@trillium.NMSU.Edu>
List: tech-pkg
Date: 08/03/1998 13:18:59

   Send a patch for our x configs and I'll apply it.

See patch below.  Note that this patch also puts the auth files under
/var/spool/xdm, so a new set of directories must be created for this
to work.

	mkdir -p /var/spool/xdm/authdir/authfiles
	chmod 700 /var/spool/xdm/authdir /var/spool/xdm/authdir/authfiles

Note that the authfiles could be put in /var/run, but the necessary
subdirectories must be created fresh in the rc scripts since that
directory is cleaned out on bootup.  /var/log is another option, but
it didn't seem particularly appropriate to me as these are not really

I am not entirely convinced that I understand the role of the
authfiles, since I can log on even when they are not created by xdm.
Perhaps someone better acquainted with the internals of X can comment
on whether this aspect of the patch is even necessary.  It seemed
safer to me to have the authfiles written to a machine-dependent spot
outside the X tree, though.  Otherwise, they may collide among servers
running in the same shared tree.  A side-benefit is that X can be run
on a read-only filesystem when these files are directed somewhere else
(although, again, it seems to work fine if only the log/pid files are
somewhere else).

   Brook Milligan writes:
   >    The convention for /usr is coincidental at best; it's definitely not true
   >    that /usr/X11R6 is shareable, and /usr/{local,pkg}/etc is somewhat annoyin
   > Actually, /usr/X11R6 can be made shareable easily enough by changing
   > /usr/X11R6/lib/X11/xdm/xdm-config to point its errorLogFile and
   > pidFile to /var/log and /var/run (or whatever) as appropriate.  As far
   > as I can tell, these are the only files that get written into the X11
   > hierarchy by X itself, and shouldn't really be buried in the X11
   > filesystem anyway because of their machine-dependent nature.  I've run
   > with shared X11 trees using this approach and the systems work fine.
   > Perhaps it makes sense to change this in the X11 package we distribute
   > so that the X11 tree _would_ be sharable.
   > Cheers,
   > Brook

--- /usr/X11R6/lib/X11/xdm/xdm-config.orig	Fri Jan  2 09:04:28 1998
+++ /usr/X11R6/lib/X11/xdm/xdm-config	Mon Aug  3 12:42:56 1998
@@ -1,6 +1,7 @@
 ! $XConsortium: xdm-conf.cpp /main/3 1996/01/15 15:17:26 gildea $
-DisplayManager.errorLogFile:	/usr/X11R6/lib/X11/xdm/xdm-errors
-DisplayManager.pidFile:		/usr/X11R6/lib/X11/xdm/xdm-pid
+DisplayManager.authDir:		/var/spool/xdm
+DisplayManager.errorLogFile:	/var/log/xdm-errors
+DisplayManager.pidFile:		/var/run/xdm-pid
 DisplayManager.keyFile:		/usr/X11R6/lib/X11/xdm/xdm-keys
 DisplayManager.servers:		/usr/X11R6/lib/X11/xdm/Xservers
 DisplayManager.accessFile:	/usr/X11R6/lib/X11/xdm/Xaccess