From: emcguire@intellection.com (Ed McGuire)
Newsgroups: comp.sys.sun.admin
Subject: xdm FAQ information (was: xdm)
Date: 11 Nov 92 21:36:14 GMT
Article-I.D.: fuller.EMCGUIRE.92Nov11153614
Organization: Intellection, Inc.

In article <1992Nov10.010607.26431@ucc.su.OZ.AU> matth@extro.ucc.su.OZ.AU (Matthew Hannigan) writes:

   There seems to be a bit of interest in running xdm (I
   would recommend it myself - we ran xdm even before getting
   X terminals).  Is there interest in me posting a summary
   of what is required?  Or is this info posted elsewhere?
   (comp.windows.x FAQ?)

We run xdm and I've tried a couple of different startup methods with
good success.

But first, note that I link the /usr/openwin files to the canonical
MIT locations.  I wrote a script which maintains these links so that I
can NFS import /usr/openwin or MIT X11R4 and easily set up the
canonical paths on a client.  The same script also links in OSF/Motif.
The links maintained are:

	/usr/include/X11
	/usr/bin/{X11,mwm,uil}
	/usr/lib/{X11,Mrm,Xm,uil}
	/usr/lib/lib*.a (a link for each ar library)

Here is how to start xdm from /etc/rc.local If you don't create the
canonical links, you would need to edit the paths to go through
OPENWINHOME and also set LD_LIBRARY_PATH.

if [ -f /usr/bin/X11/xdm ]; then
	OPENWINHOME=/usr/openwin /usr/bin/X11/xdm -config /usr/lib/X11/xdm/xdm-config &&
				echo -n ' xdm (OpenWindows)'
fi

Or, init can spawn xdm as a replacement for the console getty; in that
case, the following line in /etc/ttytab will work, in conjunction with
the script which follows it.  The assumptions here are the same as for
the /etc/rc.local excerpt above.

console "/usr/local/admin/startxdm"	X		on local secure

#! /bin/sh
OPENWINHOME=/usr/openwin ; export OPENWINHOME
exec /usr/bin/X11/xdm -nodaemon -config /usr/lib/X11/xdm/xdm-config

Note that it should be unnecessary to use -config to locate the config
file, but Sun changed the default path from the standard one.

Several other changes were necessary in /usr/lib/X11/xdm:

  o  Sun added fancy custom colors to Xresources for some of the xlogin
     resources, and these needed to be removed again or a B/W terminal
     displayed fonts and backgrounds in the same color.

  o  Sun customized the standard MIT Xsession file, changing the name
     of the user startup file from .xsession to .xinitrc, which just
     confused people and caused problems with existing .xinitrc files
     breaking xdm, so I reverted it to .xsession (the name in the man
     page).

  o  Sun changed DisplayManager*authorize in xdm-config to true, which
     gratuitously breaks all X terminals unless you go to the trouble
     of setting up magic cookie authorization.

  o  Sun redirected the location of the authorization file to
     /usr/tmp/server-auth, a big no-no that flies directly in the face
     of the man page warning: "It should be kept in a directory which
     is not world-writable as it could easily be removed, disabling
     the authorization mechanism in the server."

If you put in the links I suggested above, you can just throw away the
Sun config files and replace them with standard MIT X11R4 ones,
avoiding all the crap.

Regards, Ed
-- 
Ed McGuire                   1603 LBJ Freeway, Suite 780
Systems Administrator/       Dallas, Texas 75234
 Member of Technical Staff   214/620-2100, FAX 214/484-8110
Intellection, Inc.           <ed@intellection.com>
Newsgroups: comp.sys.sun.admin