更换XFCE与XRDP

1. 安装XFCE桌面环境与XRDP

yum groupinstall Xfce
yum install thunar-archive-plugin xarchiver xrdp -y
update-desktop-database

2. 修改用户配置文件

gedit ~/.Xclients
#内容如下:
##!/bin/sh
##
##xfce4-session
#或者使用脚本中的
##ln -sf /tools/.env/.Xclients ~/.Xclients
##脚本/tools/.script/desktop2xfce4.sh
xfconf-query -c xfwm4 -p /general/box_move -s true
xfconf-query -c xfwm4 -p /general/box_resize -s true
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/color1 -t uint -t uint -t uint -t uint -s 52428 -s 52428 -s 52428 -s 65535 -a
xfconf-query -c xfce4-panel -p /plugins/plugin-9/items -t string -s "exo-terminal-emulator.desktop" -a
xfconf-query -c xfce4-panel -p /plugins/plugin-10/items -t string -s "exo-file-manager.desktop" -a
xfconf-query -c xfce4-panel -p /plugins/plugin-11/items -t string -s "exo-web-browser.desktop" -a
xfconf-query -c xfce4-panel -p /plugins/plugin-12/items -t string -s "xfce4-appfinder.desktop" -a
xfconf-query -c xfce4-panel -p /plugins/plugin-2 -r
xfconf-query -c xfce4-panel -p /plugins/plugin-5 -r
xfconf-query -c xfce4-panel -p /plugins/plugin-6 -r
xfconf-query -c xfce4-panel -p /plugins/plugin-8/style -r
xfce4-panel -r

3. 打开XRDP服务与防火墙

systemctl start xrdp
systemctl enable xrdp
sudo firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="10.10.10.0/23" port port=3389 protocol=tcp accept' --permanent
sudo firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="10.10.10.0/23" port port=3389 protocol=udp accept' --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --zone=public --list-rich-rules

4. 配置XRDP

记得修改人数上限!!!
还需要修改vnc端口Offset=400