From: gaissmai@xwini.rz.uni-ulm.de (Karl Gaissmaier)
Subject: Re: xdm error messages >> /usr/adm/messages
Keywords: xdm      
Organization: Universitaet Ulm
Date: Thu, 1 Oct 1992 10:19:54 GMT


In article <23474@hacgate.SCG.HAC.COM>, you write:
|> I tried setting up xdm, but error messages splat across the
|> login screen and users see this totally garbaged window.
|> How do you deal with it?  There should be some mechanism
|> for redirecting those messages to /usr/adm/messages.
|> 
|> Mike Howard
|> Hughes Research Labs
|> 
|> 
|> 


hello mike

which error messages do you mean, the console errors or what else.
when you claim about console messages try this:

1. create an file: Xsetup-console  with the following content
=============================================================

#
# this file is run as root before the login window
#
xconsole &
xrefresh

=============================================================

2. change the xdm-config file
=============================

DisplayManager.servers:         /usr/local/lib/xdm/config/Xservers
DisplayManager.errorLogFile:    /usr/local/lib/xdm/config/xdm-errors
DisplayManager*resources:       /usr/local/lib/xdm/config/Xresources
DisplayManager*startup:         /usr/local/lib/xdm/config/Xstartup
DisplayManager*setup:           /usr/local/lib/xdm/config/Xsetup
DisplayManager._0.setup:        /usr/local/lib/xdm/config/Xsetup-console 
DisplayManager*reset:           /usr/local/lib/xdm/config/Xreset
DisplayManager*session:         /usr/local/lib/xdm/config/Xsession
.
.
.
=======================================================================
you see the difference in DisplayManager*setup for all X-Terminals
connecting to the workstation and DisplayManager._0.setup for the setup script
for the workstation itself. The Xsetup file for the terminals is empty at our site.


the xconsole in Xsetup-console catches all console errors, and the root
window doesn't get destroyed.

when you are speaking about the errors of xdm and Xsession scripts,
look at the line:
DisplayManager.errorLogFile:            /usr/local/lib/xdm/config/xdm-errors

all errors from xdm and xsession scripts go to this file.
we log all errors from xsession scripts in the HOME-directory of the
users, to find xsession errors easier from all various user-own .xsession-scripts.

our Xsession looks like this
============================
#!/bin/sh

case $# in
1)
        case $1 in
        failsafe)
                exec xterm -geometry 80x24+50+50 -title "Hilfsterminal"
                ;;
        esac
esac

startup=$HOME/.xsession
resources=$HOME/.Xresources
errorlog=$HOME/.xsession-errors

#======================================================================
#   xsession  starten
#======================================================================

if [ -f $startup ]; then
        if [ -x $startup ]; then
                exec $startup 2>>$errorlog
        else
                exec /bin/sh $startup 2>>$errorlog
        fi
else
        if [ -f $resources ]; then
                xrdb -load $resources 2>>$errorlog
        fi

#======================================================================
# starten des richtigen lokalen wm fuer ncd's 
#======================================================================

        case $DISPLAY
        in xterm[12456]:0*) rsh `echo $DISPLAY | \
                                 sed -e 's/:.*//'` wm 2>>$errorlog
        ;; *)             mwm 2>>$errorlog &
        esac

        xclock -geometry -5+5 2>>$errorlog &
        xterm -sb +sf -geometry 80x24+100+100 -ls -title xterm -n xterm \
              -xrm "*input: true" &
        exec xmessage  -g +0+0 -title "Session Control" -n "Logout" \
                       -iconic "Session beenden ? " 2>>$errorlog
fi




hope i could help you
charly

=========================================================================
Karl Gaissmaier                      gaissmai@rzmain.rz.uni-ulm.de
Rechenzentrum Uni Ulm               
Albert Einstein Allee 11             Telefon: (Germany) 0731/5022499
W-7900 Ulm / Germany                 Telefax: (Germany) 0731/5022471
=========================================================================
Newsgroups: comp.windows.x,comp.unix.sysv386,comp.unix.bsd,comp.os.linux,comp.os.mach,comp.unix.sys5.r3,comp.unix.sys5.r4,comp.unix.pc-clone.32bit