参考Xfce桌面简介及其安装:Xfce桌面简介及其安装 – 小麦苗DBA宝典
安装xfce桌面
-- 直接使用我的openeuler容器(无图形化)
docker rm -f lhropeneuler22
docker run -itd --name lhropeneuler22 -h lhropeneuler22 \
-p 225:22 -p 7654:7654 -p 7389:3389 \
--privileged=true \
-v /sys/fs/cgroup:/sys/fs/cgroup \
lhrbest/openeuler22:1.0 \
init
docker exec -it lhropeneuler22 bash
-- 安装xfce桌面:https://docs.openeuler.org/zh/docs/22.03_LTS/docs/desktop/Install_XFCE.html
sudo dnf update
sudo dnf install -y dejavu-fonts liberation-fonts gnu-*-fonts \
google-*-fonts xorg-* xfwm4 xfdesktop xfce4-* xfce4-*-plugin \
network-manager-applet *fonts lightdm lightdm-gtk
sudo dnf install -y firefox
echo 'user-session=xfce' >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
sudo systemctl start lightdm
sudo systemctl enable lightdm
sudo systemctl status lightdm
sudo systemctl set-default graphical.target
systemctl disable gdm
sudo reboot
安装远程桌面xrdp
-- 安装远程连接软件xrdp
wget https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
rpm -ivh epel-release-latest-8.noarch.rpm --nodeps
yum -y install xrdp
# sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
sed -i 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini
echo xfce4-session > /root/.xsession
chmod +x /root/.xsession
systemctl restart xrdp && systemctl enable xrdp
rm -rf /etc/yum.repos.d/epel*
# 访问Linux(mstsc): 192.168.59.220:3389
使用mstsc连接到openEuler系统
访问Linux(mstsc): 192.168.66.35:7389
就可以做很多图形化的操作了。