CentOS 8.x(~8.4) XDMCP Configuration

If you are using Xmanager 7, you can access the Gnome3 based desktop, the default desktop of CentOS. Please refer to the following article for necessary configurations.

Xmanager 7 XDMCP Configurations (gdm Based)

If you are using Xmanager 6 (or lower) or are using Xmanager Classic of Xmanager 7, the following steps are required to connect to a CentOS device.

If you are using CentOS 8's default desktop, remote, multi-session functionality with the same user is not possible. Therefore, if you need to use multiple XDMCP sessions with the same user, the procedures outlined below are required.

XDMCP configuration

  1. Install Extra Packages for Enterprise Linux

    [root@yourhost ~]# dnf install epel-release
  2. Download lightdm-greeter and install the greeter first
    (There is no greeter for lightdm in CentOS 8's epel packages. Therefore, you'll need to install lightdm-gtk-greeter from CentOS 7's epel packages. Because of dependencies, other lightdm packages will be downloaded and installed.)

    [root@yourhost ~]# wget https://cdn.netsarang.com/utils/lightdm-gtk-1.8.5-19.el7.x86_64.rpm https://cdn.netsarang.com/utils/lightdm-gtk-common-1.8.5-19.el7.noarch.rpm
    [root@yourhost ~]# dnf install ./lightdm-gtk-common-1.8.5-19.el7.noarch.rpm ./lightdm-gtk-1.8.5-19.el7.x86_64.rpm
    Last metadata expiration check: 1 day, 23:05:50 ago on Tue 15 Jun 2021 10:22:22 PM EDT.
    Dependencies resolved.
    ======================================================================================================================================================================================
     Package                                          Architecture                         Version                                       Repository                                  Size
    ======================================================================================================================================================================================
    Installing:
     lightdm-gtk                                      x86_64                               1.8.5-19.el7                                  @commandline                                58 k
     lightdm-gtk-common                               noarch                               1.8.5-19.el7                                  @commandline                                57 k
    Installing dependencies:
     lightdm                                          x86_64                               1.30.0-6.el8                                  epel                                       230 k
     lightdm-gobject                                  x86_64                               1.30.0-6.el8                                  epel                                        78 k
    
    Transaction Summary
    ======================================================================================================================================================================================
    Install  4 Packages
    
    Total size: 423 k
    Total download size: 308 k
    Installed size: 1.2 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/2): lightdm-gobject-1.30.0-6.el8.x86_64.rpm                                                                                                        141 kB/s |  78 kB     00:00
    (2/2): lightdm-1.30.0-6.el8.x86_64.rpm                                                                                                                167 kB/s | 230 kB     00:01
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ...
    Installed products updated.
    
    Installed:
      lightdm-1.30.0-6.el8.x86_64            lightdm-gobject-1.30.0-6.el8.x86_64            lightdm-gtk-1.8.5-19.el7.x86_64            lightdm-gtk-common-1.8.5-19.el7.noarch
    
    Complete!
  3. Configure lightdm.conf for XDMCP

    [root@yourhost ~]# vi /etc/lightdm/lightdm.conf
    ... 
    [XDMCPServer] 
    enabled=true 
    ...
  4. Stop gdm and disable it to prevent it from starting after rebooting.

    [root@yourhost ~]# systemctl disable gdm; systemctl stop gdm
  5. Start lightdm and enable it to have it start after rebooting.

    [root@yourhost ~]# systemctl enable lightdm; systemctl start lightdm
  6. Disable the OS's firewall or allow UDP port 177 from the firewall's configuration.

    [root@yourhost ~]# systemctl stop firewalld

How to check if XDMCP is configured properly.

  1. Process running

    [root@yourhost ~]# ps -aef |grep lightdm 
    root 8079 1 0 05:31 ? 00:00:00 /usr/sbin/lightdm ...
  2. Port listening

    [root@yourhost ~]# netstat -anep |grep :177 
    udp        0      0 0.0.0.0:177             0.0.0.0:*                           0          90932      8079/lightdm
    udp6       0      0 :::177                  :::*                                0          90933      8079/lightdm
  3. Checking the Firewall
    The firewall status should be one of the following:
    In case of an enabled firewall:

    [root@yourhost ~]# firewall-cmd --zone=`firewall-cmd --get-default-zone` --list-all 
    public (active) 
    	...
    	ports: 177/udp 
    	...

    In case of a disabled firewall:

    [root@yourhost ~]# firewall-cmd --zone=`firewall-cmd --get-default-zone` --list-all 
    FirewallD is not running 
    FirewallD is not running

Xfce-desktop installation for a user's desktop environment

  1. Download and extract Xfce-desktop packages
    (CentOS 8's EPEL does not contain packages related to Xfce-desktop. The following packages are those of CentOS 7.)

    [root@yourhost ~]# wget https://cdn.netsarang.net/utils/Xfce-desktop-4.12.4.3.tar.gz 
    [root@yourhost ~]# tar xvzf Xfce-desktop-4.12.4.3.tar.gz
  2. Install all packages

    [root@yourhost ~]# cd Xfce-desktop-4.12.4.3; rpm -i --nodeps --force *.rpm
  3. Restart lightdm

    [root@yourhost ~]# systemctl restart lightdm
  4. Select the Xfce session at the XDMCP greeter