【Xmanager】如何使⽤Xmanager远程CentOS7服务器【Xmanager】如何使⽤Xmanager远程CentOS 7服务器
⼀、前⾔
基本概念简略概述
Display Manager 提供登录需求,在⽂字界⾯下可以通过startx来启动Xwindows
在runlevel 5下,在tty7处有可以使⽤的图形登录界⾯(⽅便输⼊账号密码),这个就是Display Manager–>最⼤的任务就是登录
在CentOS上,利⽤GDM (GNOME Display Manager) 程序来提供tty7的图形接⼝登录–>但作⽤不仅仅如此
gdm配置⽂件–>/etc/f
XDMCP (X Display Manager Contorl Protocol)
⼆、问题描述
服务器如果安装了桌⾯环境的话,默认是GNOME,管理⼯具是GDM。
CentOS7中的GNOME启⽤了本地硬件加速功能,所以通过XDMCP协议远程连接CentOS时会有问题,这个在X Manager官⽹博客中已提及,并建议使⽤其他的display manager(如lightdm等)和desktop environment(Xfce或KDE等)来规避该问题:
“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.”
在CentOS7中安装好lightdm和Xfce后,由于系统前期已安装了GNOME desktop,在windows下通过xmanager在输⼊⽤户名和密码后,仍会报an error:oh no! something has gone wrong, A problem has occurred and the system can’t recover之类的错误。
三、解决⽅案
1.安装epel源
服务器
yum -y install epel-release
2.安装lightdm和xfce
光盘⾥镜像没有,从epel源⾥下
yum  -y  groupinstall  xfce
yum  -y  install  lightdm
3.修改lightdm 配置⽂件
vim /etc/f
>>>>####
...
[XDMCPServer]
enabled=true
port=177
...
>>>>>
将Display Manager切换为lightdm
systemctl  disable  gdm
#systemctl enable lightdm
## 5.启动lightdm
systemctl stop  gdm.service
systemctlstartlightdm
6.关闭防⽕墙
systemctl stop firewalld.service
setenforce 0
7.登录
打开Xmanger客户端,选择XDMCP并输⼊服务器的ip,回车运⾏
输⼊账号密码
然后就出现下图或者许久打不开:(如果正常跳过这步)
这是因为刚开始安装的是Gnome,所以系统默认使⽤它,现在要改成Xfce 最简单的⽅法就是把gnome的desktop⽂件备份移除
cd /usr/share/xsessions
mkdir bak
mv gnome*  ./bak
systemctl restart lightdm
systemctl  status  lightdm.service
8.重新连接登录
⼀切正常操作之后就成功连接了,然后就可以快速便捷的⼯作了!

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。

发表评论