I never thought of forcing people to try to make a connection on the actual box itself.
I ran the same command on my linux box and confirmed that it does work.
I then edited (for my display manager and distribution, this will be different for you) /etc/kde3/kdm/kdmrc, changed the following:
[XDMCP] Enable=true
to
[XDMCP] Enable=false
Then I restarted kdm ('/etc/init.d/kdm restart' for my dist), and ran 'X -query %hostname% :1' again and waited about five minutes. Before five minutes, I saw nothing: nothing special in the log files and no login screen on Ctrl-Alt-F8. Then, after about five minutes, I saw that the /var/log/XFree86.1.log file (and the console from which I started X) both said:
XDM: too many retransmissions
Well you see that's sorta the problem. In my distro (SuSE 8.2) it's at /opt/kde/share/config/kdm/kdmrc but the problem is that it already says true! In mine is says:
[Xdmcp] Enable=true
kdm != xdm
kdm has a distinct configuration file from xdm's configuration file.
xdm.config lives in either /etc/X11/xdm/xdm.config or /usr/X11R6/lib/X11/xdm/xdm-config, where you will see something like the following:
! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0
So, you have to change that to:
! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm ! DisplayManager.requestPort: 0
Then restart xdm and it should work.
Harold