CentOS7中的GNOME啟用了本地硬件加速功能,所以通過XDMCP協議遠程連接CentOS時會有問題。這個在Xmanager官網博客中已提及,並建議使用其他的display manager(如lightdm等)和desktop environment(xfce或者 kde)來規避該問題。
安裝包
yum groupinstall "X Window System" -y
#yum installgroup "GNOME Desktop" -y
yum -y install xclock
在shell端設置連接環境變量
export DISPLAY=192.168.25.18:0.0 # IP為客戶端主機
輸入xclock會在客戶端啟動一個小窗口
xshell設置
安裝 lightdm
1
2
3
|
# 增加epel 源
sudo yum install epel
-
release
sudo yum install lightdm
|
編輯配置文件
vim /etc/lightdm/lightdm.conf
1
2
3
|
[XDMCPServer]
enabled
=
true
port
=
177
|
安裝 xfce 或者 kde
推薦安裝kde,界面比xfce好看
1
2
3
4
|
# kde
sudo yum group install
"KDE Plasma Workspaces"
# xfce
sudo yum group install xfce
|
1
2
3
|
sudo systemctl disable gdm
sudo systemctl enable lightdm
sudo systemctl start lightdm
|
1
|
sudo systemctl stop firewalld.service
|
xshell啟動
startxfce4 #啟動xfce4-session startkde #啟動kde
Xstart 配置
在Xstart配置中,命令(C) 的配置如下:
1
2
3
4
|
# xfce
/
usr
/
bin
/
xfce4
-
session
# kde
DISPLAY
=
$DISPLAY;
/
usr
/
bin
/
startkde
|