Hi,
Thanks for the responses to this. I should note that under 4.1.3
it wasn't quite the same setup, and I indeed never had trouble then.
Now, thanks to one of the kind respondees, here is what worked for
getting the proper DISPLAY variable, and then getting logged with wtmp.
This assumes that there is at least one person in the same boat, though
I'm sure many of the more knowledgeable managers would have figured this
out already.
I needed to do a few things.
First I had to learn about /usr/openwin/sessreg.
Following the man page, I made up Xstartup and and Xreset files.
Then I also changed the DisplayManager._0.authorize resource to
true. I would have thought this obvious, but on SUNOS 4.1, I had
it 'false'.
Here is the xdm-config file - I added the last two lines as well.
/usr/local/lib/X11/xdm> more xdm-config
DisplayManager.errorLogFile: /var/adm/xdm-errors
DisplayManager.pidFile: /var/adm/xdm-pid
DisplayManager.keyFile: /var/adm/xdm-keys
DisplayManager.servers: /usr/local/lib/X11/xdm/Xservers
DisplayManager.accessFile: /usr/local/lib/X11/xdm/Xaccess
DisplayManager._0.authorize: true
#DisplayManager._0.setup: /usr/local/lib/X11/xdm/Xsetup_0
DisplayManager*startup: /usr/local/lib/X11/xdm/Xstartup
DisplayManager*reset: /usr/local/lib/X11/xdm/Xreset
DisplayManager*resources: /usr/local/lib/X11/xdm/Xresources
DisplayManager*session: /usr/local/lib/X11/xdm/Xsession
DisplayManager*authComplain: false
DisplayManager*daemonMode: true
DisplayManager*removeDomainname: false
This last line is what had been screwing up the DISPLAY variable.
You see, if just left to its own devices (no pun intended) the Xsession
file used to give DISPLAY as something like avocet:0.0. ANd of course,
I could never get that script from Sun to work (the one you and I stepped
through a while ago).
The Xstartup file is
#!/bin/sh
#
# Xstartup
#
# This program is run as root after the user is verified
#
#/etc/xdm/printenv >> log.environ
#/usr/bin/tty >> log.environ
#/etc/xdm/wtmp_update $USER login $DISPLAY
/usr/openwin/bin/sessreg -a -l $DISPLAY -x /usr/local/lib/X11/xdm/Xservers
$USER
while Xreset is;
#!/bin/sh
#
# Xreset
#
# This program is run at the end of a session
#
#/etc/xdm/printenv >> log.environ
#/usr/bin/tty >> log.environ
#/etc/xdm/wtmp_update $USER login $DISPLAY
/usr/openwin/bin/sessreg -d -l $DISPLAY -x /usr/local/lib/X11/xdm/Xservers
$USER
and now, the Xservers file is empty, whereas I used to list all of the
xterms.
pheeew.
Henry