How to Enable XDMCP Service (GDM)

GDM can be configured to allow remote access via XDMCP (X Display Manager Control Protocol). We can use Cygwin-X or Exceed, to connect remotely to a server and get a complete desktop GUI.

1. Edit the file /etc/gdm/custom.conf and make sure below parameters are added/set.

1
2
3
4
5
6
7
8
9
10
11
% cat /etc/gdm/custom.conf
# GDM configuration storage
[daemon]
[security]
DisallowTCP=false
AllowRemoteRoot=true
[xdmcp]
Enable=true
[greeter]
[chooser]
[debug]

2. Restart the gdm service.

1
2
% sudo systemctl restart gdm
% sudo systemctl status gdm

3. Additionally, it will be required to allow connections from remote clients’ tcp ports in the 6000 range (since the clients will be acting as an X server, using port 6000/tcp and above).

1
2
3
% sudo firewall-cmd --permanent --zone=public --add-port=6000-6010/tcp
% sudo firewall-cmd --permanent --zone=public --add-port=177/udp
% sudo firewall-cmd --reload

4. Confirm gdm is listening on UDP port 177

1
2
% sudo netstat -anu|grep 177
udp 0 0 0.0.0.0:177 0.0.0.0:*