Skip to content

How to Enable or Disable XDMCP in GDM (and Use RDP on RHEL 10)

Updated 3 min read

Updated: 29 September 2026 · Applies to: GDM 40 on AlmaLinux and Rocky Linux 9 and RHEL 9 (XDMCP); GNOME Remote Desktop on AlmaLinux and Rocky Linux 10 and RHEL 10

XDMCP (X Display Manager Control Protocol) lets a remote X server, such as an X server on a Windows or Linux desktop, show the graphical login screen of a Linux machine and run a full desktop session on it. GDM, the login manager of GNOME, supports XDMCP only for X11 sessions. Two important limits today:

  • XDMCP sends everything, including passwords, unencrypted over the network. Use it only on a trusted local network or through a VPN, never over the internet.
  • On AlmaLinux, Rocky Linux and RHEL 10, the Xorg server is no longer included and GDM runs only Wayland sessions, so XDMCP is not available. Use GNOME Remote Desktop instead (see below).

Enable XDMCP on AlmaLinux, Rocky Linux and RHEL 9

  1. Edit /etc/gdm/custom.conf and set these values in their sections:
    [daemon]
    WaylandEnable=false
    
    [security]
    DisallowTCP=false
    
    [xdmcp]
    Enable=true
    WaylandEnable=false makes GDM use X11, which XDMCP needs. Leave AllowRemoteRoot unset: remote root logins over an unencrypted protocol are a bad idea.
  2. Allow XDMCP (UDP port 177) in the firewall, only from your own network:
    firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.10.0/24" port port="177" protocol="udp" accept'
    firewall-cmd --reload
    The machine then connects back to the client's X server on TCP port 6000 plus the display number, so the client's firewall must allow that.
  3. Restart GDM. This ends all graphical sessions on the machine:
    systemctl restart gdm
  4. On the client, start the X server in XDMCP query mode, for example Xephyr :1 -query 192.168.10.5 on Linux, or the "XDMCP" or "one window with XDMCP" option of an X server for Windows.

Disable XDMCP

Set Enable=false in the [xdmcp] section (or remove the line), remove the firewall rule, and restart GDM.

The modern alternative: remote desktop over RDP

On AlmaLinux, Rocky Linux and RHEL 10, GNOME Remote Desktop (gnome-remote-desktop) offers remote access over RDP, which is encrypted and works with the standard Remote Desktop clients on Windows, macOS and Linux. It is the supported way to reach a graphical desktop remotely on version 10; set it up in Settings > System > Remote Desktop, or follow Red Hat's documentation for remote login without a local session. On version 9, GNOME's screen sharing or xrdp from EPEL are options; run them through a VPN or an SSH tunnel.

Official documentation: RHEL 10: remotely accessing the desktop and GDM project.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket