CentOS7.6配置XDMCP(lightdm/mate/kde)

只针对Gnome桌面,若原本就是KDE或者MATE,则只需要将gdm更换为lightdm即可。

方法一:更换桌面图形环境为mate

yum install -y epel-release
yum install -y lightdm
yum groups mark convert “X Window system”
yum groups mark convert “MATE Desktop”
yum groupinstall “X Window system”
yum groupinstall “MATE Desktop”


vim /etc/lightdm/lightdm.conf
修改如下内容
[XDMCPServer]
enabled=true
port=177

关闭防火墙

禁用gnome并启用lightdm
cd /usr/share/xsessions/
mkdir back && mv gnome* back && ls
systemctl disable gdm && systemctl enable lightdm && systemctl start lightdm
确定177端口开启
[root@dacentos xsessions]# netstat -nlp|grep 177
udp 0 0 0.0.0.0:177 0.0.0.0:* 19079/lightdm
udp6 0 0 :::177 :::* 19079/lightdm

使用XManager登录就可以了
方法二:将Display Manager 切换为 lightdm(图形环境是KDE)

yum install lightdm
systemctl disable gdm
systemctl enable lightdm
systemctl start lightdm
systemctl stop firewalld.service
init 5

使用XManager登录就可以了