“Gnome in CentOS 7 tries to use local hardware acceleration and this becomes a problem when trying to connect remotely using XDMCP. To avoid this problem, you have to use an alternative display manager (other than ‘gdm’) and desktop environment.”
“This guide explains how you can change the display manager to lightdm from gdm and desktop environment from Gnome to Xfce.”
這就是使用Xfce而不用gdm的原因(僅限CentOS7),嗯,不懂的可以百度一下。
參考:
http://blog.netsarang.com/89/connecting-to-centos-7/
http://blog.csdn.net/lic95/article/details/48948099
http://blog.csdn.net/wuzhimang/article/details/51523867
安裝epel源
yum install -y epel-release
- 1
安裝lightdm和xfce
yum install -y lightdm
yum groupinstall -y xfce
- 1
- 2
這個下的有點慢
修改配置文件
vim /etc/lightdm/lightdm.conf
...
[XDMCPServer]
enabled=true
port=177
...
- 1
- 2
- 3
- 4
- 5
- 6
將Display Manager切換爲lightdm
systemctl disable gdm && systemctl enable lightdm
- 1
啓動lightdm
systemctl start lightdm
- 1
關閉防火牆
systemctl stop firewalld.service
- 1
登錄
打開Xmanger客戶端,選擇XDMCP並輸入服務器的ip,回車運行即可。
輸入賬號密碼
然後就出現下圖:(如果正常跳過這步)
這是因爲剛開始安裝的是Gnome,所以系統默認使用它,現在要改成Xfce,最簡單的方法就是把xfce.desktopz之外的文件都幹掉。
cd /usr/share/xsessions/
mkdir bak
mv gnome* bak
systemctl restart lightdm
- 1
- 2
- 3
- 4
重新連接
一切正常操作之後就成功連接了。然後就可以快速便捷的工作了。