1、安裝epel源(不安裝會找不到lightdm安裝包)
yum install -y epel-release
2、安裝lightdm和xfce(xfce桌面環境替代gnome)
yum install -y lightdm && yum groupinstall -y xfce3
3、修改/etc/lightdm/lightdm.conf文件
[XDMCPServer] #找到這個寫入下面兩行
enabled=true
port=177
4、編輯/etc/gdm/custom.conf文件
[security] #找到這個輸入以下 AllowRemoteRoot=true [xdmcp] Enable=1 Port=177
5.
systemctl disable gdm && systemctl enable lightdm
6.啟動lightdm
systemctl start lightdm
7.刪除和gonme相關的文件(必須)
cd /usr/share/xsessions/ mkdir bak mv gnome* bak systemctl restart lightdm
8、測試遠程連接