[comp.unix.ultrix] what am I doing wrong with xdm

carson@tron.UUCP (Dana Carson) (09/22/90)

   I am trying to use xdm instead of the DEC session manager as my X
startup.  It looks good at first but after logging in and logging out
I get two login boxes!  I fiddled with it for a while and have tried
using the simplest possible xdm configuration files I can thing of and
it's still happening.

   It looks like it starts going wrong right away since I tried
rebooting my workstation and a ps-ax | grep xdm from a dumb terminal 
without ever logging in as an X user gives three xdms running.

   After a login, logout cycle I have three but two of them have new
PIDs.  I get a normal login box.  Another cycle and I get two login
boxes that want me to click to place (I'm using uwm).  A ps shows four
xdms running.  The PIDs are different for four of them.
	example
	first time before login
	PIDs 83, 86, 110
	after login logout
	PIDs 83, x, y
	after next login logout
	PIDs 83, 1043, 1046, 1050

  I am using DECwindows X not MIT X.

  Any answers, questions, suggestions?

  Thanks in advance.

--
Dana Carson
Westinghouse Electronic Systems Group  Mail Stop 1615
UUCP:carson@tron.UUCP 
     carson@tron.bwi.wec.com
     ...!uunet!tron!carson
AT&T: (301) 765-3513
WIN: 285-3513

envbvs@epb2.lbl.gov (Brian V. Smith) (09/22/90)

In article <646@tron.UUCP>, carson@tron.UUCP (Dana Carson) writes:
|> 
|>    I am trying to use xdm instead of the DEC session manager as my X
|> startup.  It looks good at first but after logging in and logging out
|> I get two login boxes!  I fiddled with it for a while and have tried
|> using the simplest possible xdm configuration files I can thing of and
|> it's still happening.

How are you starting xdm?  It should NOT be started by /etc/ttys, which
would start a new one everytime you log out.  Is should be started once
in, say /etc/rc.local and never again.

--
Brian V. Smith    (bvsmith@lbl.gov)
Lawrence Berkeley Laboratory
I don't speak for LBL; they don't pay me enough for that.

jmg@cernvax.UUCP (mike gerard) (09/22/90)

In article <646@tron.UUCP> carson@tron.UUCP (Dana Carson) writes:
>
>   I am trying to use xdm instead of the DEC session manager as my X
>startup.  It looks good at first but after logging in and logging out
>I get two login boxes!  I fiddled with it for a while and have tried
>using the simplest possible xdm configuration files I can thing of and
>it's still happening.
>
>   It looks like it starts going wrong right away since I tried
>rebooting my workstation and a ps-ax | grep xdm from a dumb terminal 
>without ever logging in as an X user gives three xdms running.
>
>   After a login, logout cycle I have three but two of them have new
>PIDs.  I get a normal login box.  Another cycle and I get two login
>boxes that want me to click to place (I'm using uwm).  A ps shows four
>xdms running.  The PIDs are different for four of them.
>  I am using DECwindows X not MIT X.

By a peculiar coincidence I spent yesterday afternoon trying to get
xdm running as the display manager to use with an NCD X-terminal which
we are trying. I may later also try to use xdm locally on the DECstation
(when I understand what other startups it replaces). However, having
defined the terminal in the Xservers file as foreign and starting up
xdm with
	     xdm -server "ncdxt1:0 NCD-19 foreign"
I indeed get communication between the DECstation and the NCD, plus a
logon window on the NCD, but I cannot login, probably because I keep
getting multiple copies of xdm running, each of which puts a new logon\
window onto the NCD. In fact, even if I kill the DEC session manager
I keep getting more xdm copies: I have to reboot my station to stop
this happening.

Trouble-shooting is, of course, made more difficult by having no
documentation of the xdm on my DECstation: I guess it is probably X11
release 3 but (unlike Suns) there are no man pages nor hard-copy DEC
documentation.

I have looked to see if there are any error logs in /var/adm: nothing.

I too am running DECwindows X on my station, but I prefer twm to uwm.

All help gratefully received, and I shall continue to scan this
bulletin board!
-- 
 _ _  o |            __                    |    jmg@cernvax.uucp
| | |   |     _     /  \  _   __  _   __  _|    jmg@cernvax.bitnet
| | | | |_)  /_)    |  __/_) | (___\ | (_/ |  J. M. Gerard, Div. DD, CERN,
| | |_|_| \_/\___   \__/ \___|   (_|_|   \_|_ 1211 Geneva 23, Switzerland

meissner@osf.org (Michael Meissner) (09/23/90)

In article <7148@dog.ee.lbl.gov> envbvs@epb2.lbl.gov (Brian V. Smith) writes:

| In article <646@tron.UUCP>, carson@tron.UUCP (Dana Carson) writes:
| |> 
| |>    I am trying to use xdm instead of the DEC session manager as my X
| |> startup.  It looks good at first but after logging in and logging out
| |> I get two login boxes!  I fiddled with it for a while and have tried
| |> using the simplest possible xdm configuration files I can thing of and
| |> it's still happening.
| 
| How are you starting xdm?  It should NOT be started by /etc/ttys, which
| would start a new one everytime you log out.  Is should be started once
| in, say /etc/rc.local and never again.

I would get two or more xdm's occansionally when I was using xdm and
the DECwindows server (and yes, xdm was always started in
/etc/rc.local).  It seemed to happen whenever I left any X clients
running before terminating the toplevel xterm.  I have since switched
to a complete X11R4 (ie, no DEC supplied X software), and the problem
has gone away.  I suspected that because the ICCCM became offical in
X11R4, the session manager is properly telling the clients to
terminate, and with the DEC clients which are X11R3 based, one or more
didn't understand xdm.  One thing that the DEC session manager did was
capture /dev/console output.  Using xdm, you need to run something
like xconsole (or the XView program contool, or the Andrew equivalent
whose name escapes me).
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Do apple growers tell their kids money doesn't grow on bushes?

carson@tron.UUCP (Dana Carson) (09/26/90)

In article <646@tron.UUCP> carson@tron.UUCP (Dana Carson) writes:
>
>   I am trying to use xdm instead of the DEC session manager as my X
>startup.  It looks good at first but after logging in and logging out
>I get two login boxes!  I fiddled with it for a while and have tried
>using the simplest possible xdm configuration files I can thing of and
>it's still happening.
>
>   It looks like it starts going wrong right away since I tried
>rebooting my workstation and a ps-ax | grep xdm from a dumb terminal 
>without ever logging in as an X user gives three xdms running.
                                             ^
                                         this was explained as correct
>

    This is a long message since the shorter one a few days didn't give enough
for anyone to come up with a answer.  I thank everyone who tried however and
maybe with more details you can figure it out.

   First the xdm config files, and then ps -l listings of what happened with
comments.

Xstartup

#!/bin/sh
#
# Xstartup
#
# This program is run as root after the user is verified
#
------------------------------------------------------------
Xservers

:0 local /usr/bin/Xqvsm :0

------------------------------------------------------------
Xsession

#!/bin/sh

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

startup=$HOME/.xsession
resources=$HOME/.Xresources

if [ -f $startup ]; then
	if [ -x $startup ]; then
		exec $startup
	else
		exec /bin/sh $startup
	fi
else
	if [ -f $resources ]; then
		xrdb -load $resources
	fi
	uwm &
	exec xterm -geometry 80x24+10+10 -ls
fi

------------------------------------------------------------
Xreset

#!/bin/sh
#
# Xstartup
#
# This program is run as root after the session terminates but
# before the display is closed
#
------------------------------------------------------------
Xresources

DisplayManager.DISPLAY.userPath: /bin:/usr/bin:/usr/bin/X11:usr/ucb:.
DisplayManager.DISPLAY.systemPath: /etc:/usr/bin:/usr/bin/X11:/usr/ucb
xlogin*login.translations: #override\
	<Key>F1: set-session-argument(failsafe) finish-field()\n\
	<Key>Return: set-session-argument() finish-field()
xlogin*borderWidth: 3
#ifdef COLOR
xlogin*greetColor: #f63
xlogin*failColor: red
xlogin*Foreground: black
xlogin*Background: #fdc
#else
xlogin*Foreground: black
xlogin*Background: white
#endif
------------------------------------------------------------
xdm-config

DisplayManager.servers:      /usr/lib/X11/xdm/Xservers
DisplayManager.errorLogFile: /usr/lib/X11/xdm/xdm-errors
DisplayManager*resources:    /usr/lib/X11/xdm/Xresources
DisplayManager*startup:      /usr/lib/X11/xdm/Xstartup
DisplayManager*reset:        /usr/lib/X11/xdm/Xreset
DisplayManager*session:      /usr/lib/X11/xdm/Xsession
------------------------------------------------------------
xdm-errors  after I did all the things below.  Was empty at the start.

test: argument expected
usage:  dxmail [display] [=geometry]
XIO:  fatal IO error 32 Broken pipe on X server ":0.0"
      after 655 requests (655 known processed) with 0 events remaining.
      The connection was probably broken by a server shutdown or KillClient.
XIO:  unable to open connection 
      after 0 requests (0 known processed) with 0 events remaining.
      The connection was probably broken by a server shutdown or KillClient.
XIO:  fatal IO error 32 Broken pipe on X server ":0.0"
      after 133 requests (109 known processed) with 0 events remaining.
      The connection was probably broken by a server shutdown or KillClient.
Binding TCP socket: Address already in use
test: argument expected
usage:  dxmail [display] [=geometry]
Binding TCP socket: Address already in use
-------------------------------------------------------------------
.xsession

dxclock -analog -g =157x90-0-0 &
dxmail -iconic &
uwm &
exec xterm -ls

-------------------------------------------------------------------

    When I started before I tried to login the first time on the workstation I
had pids 1, 83, 86, 87, 138 from the listing below running, along with all the 
routine things I deleted from each ps
listing.

    After I logged in on hyde (the workstation)  the first time I had this.

      F UID   PID  PPID CP PRI NI ADDR  SZ  RSS WCHAN STAT TT  TIME COMMAND
10000000   0     1     0 39   5  0    0 256    0 758dc IW   ?   0:02 init
   8001   0    83     1 11   5  0 20f0 134   52 75ff8 I    ?   0:00 /usr/bin/X11/xdm
   8001   0    86    83 11   5  0 1ff4 134   54 75cec I    ?   0:00 /usr/bin/X11/xdm
10008001   0    87    86  9   1  0 286e 525  275 ea594 I    ?   0:29 /usr/bin/Xqvsm :0
   8001   0   138    86 14   5  0 1e44 212   48 7691c I    ?   0:02 /usr/bin/X11/xdm
10008001 269   169   138  7   1  0 27b4 228   92 ea594 I    ?   0:02 xterm -ls
10008001 269   172   169  1   1  0 25d8 531  143 ea594 I    ?   0:03 dxclock -analog -g =157x90-0-0
10008401 269   173   169  0  30  0 28d4   0    0       Z    ?   0:00 <exiting>
10008001 269   174   169 33   1  0 28d4 131   35 ea594 I    ?   0:04 uwm
10008001 269   175   169 58   3  0 1b7c 101   51 521a0 I    p0  0:02 -csh (csh)

I then logged out and had this.  When I logged out 
the clock went away the screen went black and then back to plain grey, and a
login box appeared normally. 

      F UID   PID  PPID CP PRI NI ADDR  SZ  RSS WCHAN STAT TT  TIME COMMAND
10000001   0     1     0  0   5  0 26ae 256  208 758dc I    ?   0:02 init
   8001   0    83     1  9   5  0 20f0 134   52 75ff8 I    ?   0:00 /usr/bin/X11/xdm
10008001   0    87     1 55   1  0 140a 589  449 ea594 S    ?   0:39 /usr/bin/Xqvsm :0
   8001   0   188    83  5   5  0 200c 134   54 75cec I    ?   0:00 /usr/bin/X11/xdm
10008001   0   189   188  0  15  0 2206  87   34 fe400 S    ?   0:00 /usr/bin/Xqvsm :0
   8001   0   190   188 14   1  0 22ea 187  146 ea594 S    ?   0:00 /usr/bin/X11/xdm

I then logged in again giving this.  Notice the extra X server.

      F UID   PID  PPID CP PRI NI ADDR  SZ  RSS WCHAN STAT TT  TIME COMMAND
10000000   0     1     0  0   5  0    0 256    0 758dc IW   ?   0:02 init
   8001   0    83     1  9   5  0 20f0 134   52 75ff8 I    ?   0:00 /usr/bin/X11/xdm
10008001   0    87     1107   1  0 140a 589  348 ea594 S    ?   0:49 /usr/bin/Xqvsm :0
   8001   0   188    83  5   5  0 200c 134   54 75cec I    ?   0:00 /usr/bin/X11/xdm
10008001   0   189   188  0  15  0 2206  87   15 fe400 S    ?   0:00 /usr/bin/Xqvsm :0
   8001   0   190   188 35   5  0 22ea 211   44 77240 I    ?   0:01 /usr/bin/X11/xdm
10008001 269   198   190  9   1  0 219c 228  108 ea594 I    ?   0:01 xterm -ls
10008001 269   201   198 12   1  0 1b16 531  175 ea594 S    ?   0:03 dxclock -analog -g =157x90-0-0
10008401 269   202   198  0  32  0 2a48   0    0       Z    ?   0:00 <exiting>
10008001 269   203   198 27   1  0 2a48 131   37 ea594 I    ?   0:03 uwm
10008001 269   204   198 73   3  0 26f4 101   46 521a0 I    p0  0:02 -csh (csh)

Logout again and have this.  Uwm is still around now owned by init as is the
clock, one of the X servers, and two of the xdms.  I had two login boxes
appear and I had to position them so uwm was handling them.

      F UID   PID  PPID CP PRI NI ADDR  SZ  RSS WCHAN STAT TT  TIME COMMAND
10000001   0     1     0  4   5  0 1c74 256  203 758dc S    ?   0:02 init
   8001   0    83     1 10   5  0 20f0 134   50 75ff8 I    ?   0:00 /usr/bin/X11/xdm
10008001   0    87     1 71   1  0 140a 629  367 ea594 S    ?   0:58 /usr/bin/Xqvsm :0
10008001 269   201     1  9   1  0 1b16 531   98 ea594 S    ?   0:03 dxclock -analog -g =157x90-0-0
10008001 269   203     1 21   1  0 2a48 131   35 ea594 S    ?   0:03 uwm
   8001   0   211     1  9   1  0 207c 195   93 ea594 I    ?   0:00 /usr/bin/X11/xdm
   8001   0   212    83  8   5  0 201e 134   27 75cec I    ?   0:00 /usr/bin/X11/xdm
10008001   0   213   212  0  15  0 2400  87   15 fe400 S    ?   0:00 /usr/bin/Xqvsm :0
   8001   0   218   212 12   1  0 1d78 195  130 ea594 S    ?   0:00 /usr/bin/X11/xdm

What am I doing wrong!

--
Dana Carson
Westinghouse Electronic Systems Group  Mail Stop 1615
UUCP:carson@tron.UUCP 
     carson@tron.bwi.wec.com
     ...!uunet!tron!carson
AT&T: (301) 765-3513
WIN: 285-3513