XDMCP is X Display Manager Control Protocol
1. install xdm
(If you installed xdm before, pass this step)
#apt-get install xdm2. Edit /etc/gdm/custom.conf as follow: (If custom.conf is not exist, make it)
#vim /etc/dgm/custom.conf
[daemon]
User=gdm
Group=gdm
[security]
DisallowTCP=true
[xdmcp]
Enable=true
DisplaysPerHost=2
HonorIndirect=false
MaxPending=4
MaxSessions=16
MaxWait=30
MaxWaitIndirect=30
PingIntervalSeconds=60
Port=177
[greeter]
[chooser]
Multicast=false
[debug]
Enable=false
Group=gdm
[security]
DisallowTCP=true
[xdmcp]
Enable=true
DisplaysPerHost=2
HonorIndirect=false
MaxPending=4
MaxSessions=16
MaxWait=30
MaxWaitIndirect=30
PingIntervalSeconds=60
Port=177
[greeter]
[chooser]
Multicast=false
[debug]
Enable=false
3. restart gdm or restart linux