admin

centos 7系统安装桌面环境并用XRDP远程连接
Centos 71.更新系统yum update -y2.安装 EPEL releaseyum install e...
扫描右侧二维码阅读全文
03
2023/01

centos 7系统安装桌面环境并用XRDP远程连接

Centos 7
1.更新系统

yum update -y

2.安装 EPEL release

yum install epel-release -y

3.
安装XFCE Desktop

yum groupinstall -y "Xfce"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

Create ~/.Xclients

echo "xfce4-session" > ~/.Xclients
chmod a+x ~/.Xclients

MATE Desktop

yum groupinstall "X Window system"
yum groupinstall "MATE Desktop"
systemctl isolate graphical.target
unlink /etc/systemd/system/default.target
ln -s /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target

Create ~/.Xclients

echo "mate-session" > ~/.Xclients
chmod a+x ~/.Xclients

LxQt Desktop (安装完成后,登陆会出现Welcome to LXQt - Please select your default Window Manager,未找到解决方法)

yum groupinstall "LXQt Desktop"
systemctl isolate graphical.target
unlink /etc/systemd/system/default.target
ln -s /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target

Create ~/.Xclients

echo "lxqt-session" > ~/.Xclients
chmod a+x ~/.Xclients

4.开机启动

systemctl set-default graphical.target

5.安装XRDP

yum -y install xrdp tigervnc-server
启动xrdp
systemctl start xrdp
设置开机启动
systemctl enable xrdp

6.设置防火墙:
Configure the firewall to allow RDP connection from external machines. The following command will add the exception for RDP port (3389).

firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload

7.重启
reboot

参考资料:
https://sysadmins.tech/how-to-add-a-gui-on-centos7-and-connect-to-it-with-xrdp-step-by-step-instructions/
https://forums.centos.org/viewtopic.php?t=76441
https://www.ilhamsp.com/2021/01/remote-desktop-connection-centos-7.html
https://www.51cto.com/article/663666.html
https://wiki.archlinux.org/title/LXQt

Last modification:February 1st, 2023 at 01:10 pm
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment