先通过xshell连接上主机
1、安装epel源,如果已经安装,可跳过此步骤
yum install epel-release -y
2、安装lightdm和xfce
yum install lightdm -y
yum groupinstall -y xfce
3、修改配置文件
vim /etc/lightdm/lightdm.conf
修改如下
[XDMCPServer]
enabled=true
port=177
4、将DisplayManager改为lightdm
systemctl disable gdm && systemctl enable lightdm
5、启动lightdm
systemctl start lightdm
6、关闭防火墙
systemctl stop firewalld.service
7、root用户检查
xhost +
8、切换dmdba用户
[dmdba@localhost tool]$ xhost +
access control disabled, clients can connect from any host
9、设置DISPLAY
[dmdba@localhost tool]$ echo $DISPLAY
192.168.136.1:0.0
[dmdba@localhost tool]$ export DISPLAY=192.168.136.1:0.0
10、启动
[dmdba@localhost tool]$ ./manager