# xdm and xdmcp

## aleskandro

Hi, i'm trying to configure xdm as xdmcp server in a vps server.

I installed xdm and some software like xterm and fluxbox in the server.

This is /etc/X11/xdm/xdm-config

```
DisplayManager.authDir: /var/lib/xdm

DisplayManager.errorLogFile:    /var/log/xdm.log

DisplayManager.pidFile:         /var/run/xdm.pid

DisplayManager.keyFile:         /etc/X11/xdm/xdm-keys

DisplayManager.servers:         /etc/X11/xdm/Xservers

DisplayManager.accessFile:      /etc/X11/xdm/Xaccess

DisplayManager*resources:       /etc/X11/xdm/Xresources

DisplayManager.willing:         su nobody -s /bin/sh -c /usr/lib64/X11/xdm/Xwilling

! All displays should use authorization, but we cannot be sure

! X terminals may not be configured that way, so they will require

! individual resource settings.

DisplayManager*authorize:       true

!

DisplayManager*chooser:         /usr/lib64/X11/xdm/chooser

DisplayManager*startup:         /usr/lib64/X11/xdm/Xstartup

DisplayManager*session:         /usr/lib64/X11/xdm/Xsession

DisplayManager*reset:           /usr/lib64/X11/xdm/Xreset

DisplayManager*authComplain:    true

! The following three resources set up display :0 as the console.

DisplayManager._0.setup:        /usr/lib64/X11/xdm/Xsetup_0

DisplayManager._0.startup:      /usr/lib64/X11/xdm/GiveConsole

DisplayManager._0.reset:        /usr/lib64/X11/xdm/TakeConsole

DisplayManager*loginmoveInterval:       10

! 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

```

And this is /etc/X11/xdm/Xaccess

```
#

# Access control file for XDMCP connections

#

# To control Direct and Broadcast access:

#

#       pattern

#

# To control Indirect queries:

#

#       pattern         list of hostnames and/or macros ...

#

# To use the chooser:

#

#       pattern         CHOOSER BROADCAST

#

# or

#

#       pattern         CHOOSER list of hostnames and/or macros ...

#

# To define macros:

#

#       %name           list of hosts ...

#

# To control which addresses xdm listens for requests on:

#

#       LISTEN          address [list of multicast groups ... ]

#

# The first form tells xdm which displays to respond to itself.

# The second form tells xdm to forward indirect queries from hosts matching

# the specified pattern to the indicated list of hosts.

# The third form tells xdm to handle indirect queries using the chooser;

# the chooser is directed to send its own queries out via the broadcast

# address and display the results on the terminal.

# The fourth form is similar to the third, except instead of using the

# broadcast address, it sends DirectQuerys to each of the hosts in the list

# The fifth form tells xdm which addresses to listen for incoming connections

# on.  If present, xdm will only listen for connections on the specified

# interfaces and/or multicast groups.

#

# In all cases, xdm uses the first entry which matches the terminal;

# for IndirectQuery messages only entries with right hand sides can

# match, for Direct and Broadcast Query messages, only entries without

# right hand sides can match.

#

*                                       #any host can get a login window

#

# To hardwire a specific terminal to a specific host, you can

# leave the terminal sending indirect queries to this host, and

# use an entry of the form:

#

#terminal-a     host-a

#

# The nicest way to run the chooser is to just ask it to broadcast

# requests to the network - that way new hosts show up automatically.

# Sometimes, however, the chooser can't figure out how to broadcast,

# so this may not work in all environments.

#

#*              CHOOSER BROADCAST       #any indirect host can get a chooser

#

# If you'd prefer to configure the set of hosts each terminal sees,

# then just uncomment these lines (and comment the CHOOSER line above)

# and edit the %hostlist line as appropriate

#

#%hostlist      host-a host-b

#*              CHOOSER %hostlist       #

#

# If you have a machine with multiple network interfaces or IP addresses

# you can control which interfaces accept XDMCP packets by listing a LISTEN

# line for each interface you want to listen on.  You can additionally list

# one or more multicast groups after each address to listen on those groups

# on that address.

#

# If no LISTEN is specified, the default is the same as "LISTEN *" - listen on

# all unicast interfaces, but not for multicast packets.  If any LISTEN lines

# are specified, then only the listed interfaces will be listened on.

#

# IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned

# multicast addresses for XDMCP, where X in the prefix may be replaced

# by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local,

# 5 for Site-Local, and so on.  The default is equivalent to the example shown

# here using the Link-Local version to most closely match the old IPv4 subnet

# broadcast behavior.

#

# LISTEN                * ff02:0:0:0:0:0:0:12b

# This example shows listening for multicast on all scopes up to site-local

#

# LISTEN        * ff01:0:0:0:0:0:0:12b ff02:0:0:0:0:0:0:12b ff03:0:0:0:0:0:0:12b ff04:0:0:0:0:0:0:12b ff05:0:0:0:0:0:0:12b

```

So I started /etc/init.d/xdm from server and trying to connect from a client with  Xnest -query myserver.tld :1, I have this error:

```
Initializing built-in extension Generic Event Extension

Initializing built-in extension SHAPE

Initializing built-in extension XInputExtension

Initializing built-in extension XTEST

Initializing built-in extension BIG-REQUESTS

Initializing built-in extension SYNC

Initializing built-in extension XKEYBOARD

Initializing built-in extension XC-MISC

Initializing built-in extension XINERAMA

Initializing built-in extension XFIXES

Initializing built-in extension RENDER

Initializing built-in extension RANDR

Initializing built-in extension DAMAGE

Initializing built-in extension MIT-SCREEN-SAVER

Initializing built-in extension DOUBLE-BUFFER

Initializing built-in extension RECORD

Initializing built-in extension Present

Initializing built-in extension DRI3

Initializing built-in extension X-Resource

Initializing built-in extension XVideo

Initializing built-in extension XVideo-MotionCompensation

(EE) 

Fatal server error:

(EE) (EE) BUG: triggered 'if (f[f_idx])'

(EE) BUG: /tmp/portage/x11-base/xorg-server-1.15.0/work/xorg-server-1.15.0/os/log.c:467 in pnprintf()

(EE) Unsupported printf directive '*'

(EE) 

(EE) Backtrace:

(EE) 0: Xnest (xorg_backtrace+0x40) [0x508130]

(EE) 1: Xnest (LogVMessageVerbSigSafe+0x818) [0x512df8]

(EE) 2: Xnest (FatalError+0xd3) [0x513023]

(EE) 3: Xnest (0x400000+0x1154c1) [0x5154c1]

(EE) 4: Xnest (0x400000+0x1156cd) [0x5156cd]

(EE) 5: Xnest (WakeupHandler+0x67) [0x4d9f07]

(EE) 6: Xnest (WaitForSomething+0x1a4) [0x505d04]

(EE) 7: Xnest (0x400000+0xd5351) [0x4d5351]

(EE) 8: Xnest (0x400000+0xd938a) [0x4d938a]

(EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7feaa1be2db5]

(EE) 10: Xnest (0x400000+0x1d5a1) [0x41d5a1]

(EE) 

XDMCP fatal error: Session failed %*.*s

(EE) 

```

Where am I doing wrong?

----------

## katfish

I cant help you with that issue. 

However, did you ever try x2go?

----------

