[root@cdhnode1 Desktop]# yum install lightdm -y
[root@cdhnode1 Desktop]# vi /etc/lightdm/lightdm.conf
修改内容如下:
[XDMCPServer]
enabled=true
port=177
[SeatDefaults]
user-session=/usr/bin/startxfce4
greeter-session=lightdm-gtk-greeter
greeter-hide-users=true
[root@cdhnode1 Desktop]# systemctl disable gdm
Removed symlink /etc/systemd/system/display-manager.service.
[root@cdhnode1 Desktop]# systemctl enable lightdm.service
Created symlink from /etc/systemd/system/display-manager.service to /usr/lib/systemd/system/lightdm.service.
[root@cdhnode1 Desktop]# systemctl start lightdm.service
[root@cdhnode1 Desktop]# yum groupinstall xfce -y
[root@cdhnode1 Desktop]# cd /usr/share/xsessions/ && ls
gnome-classic.desktop gnome-custom-session.desktop gnome.desktop xfce.desktop
[root@cdhnode1 xsessions]# mkdir back && mv gnome* back && ls
back xfce.desktop
[root@cdhnode1 xsessions]# init 3 && init 5
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.
PolicyKit daemon reconnected to bus.
Attempting to re-register as an authentication agent.
We are now a registered authentication agent.
参考教程:
1.http://www.linuxidc.com/Linux/2017-03/142011.htm
2.https://www.zybuluo.com/wuzhimang/note/392271