Assuming the environment is CentOS 7, see the related video link below
Setting up and using RDP for remote server control
Install xrdp and the Desktop System
The steps to install xrdp on CentOS 7 are as follows:
- Install the xrdp and tigervnc-server packages. You can use the following command to install them:
sudo yum install xrdp -y
sudo yum install tigervnc-server -y
- Start the xrdp service and configure it to start on boot. You can use the following commands to complete these tasks:
sudo systemctl start xrdp
sudo systemctl enable xrdp
netstat -an | grep 3389
- If SELinux is enabled in your system, you may need to configure SELinux; otherwise, the xrdp service may fail to start or encounter errors during startup. You can use the following commands to perform these operations:
sudo chcon -t bin_t /usr/sbin/xrdp
sudo chcon -t bin_t /usr/sbin/xrdp-sesman
- If a firewall is enabled on your system, you need to open port 3389 to enable remote desktop connections to your CentOS 7 system. You can use the following commands to perform these operations:
sudo firewall-cmd --permanent --zone=public --add-port=3389/tcp
sudo firewall-cmd --reload
Install the GNOME Desktop desktop environment
sudo yum groupinstall "GNOME Desktop" -y
sudo yum groupinstall "Xfce" -y
Set Username and Password
passwd
Remote Testing with Remmina
Switch to Xfce
To switch your xrdp connection to the Xfce desktop, you need to perform the following steps on CentOS 7:
- Install the Xfce desktop environment. You can use the following command to install Xfce:
sudo yum groupinstall "X Window System"
sudo yum --enablerepo=epel -y groups install "Xfce"
- Configure xrdp to use Xfce as the desktop environment. You can use the following commands to complete these operations:
echo "xfce4-session" > ~/.Xclients
chmod +x ~/.Xclients
- Restart the
xrdpservice for the changes to take effect. You can use the following command to do this:
sudo systemctl restart xrdp
Meeting Minutes
Subject: Setting Up and Using RDP Server Remote Control
Date: 2023-08-16 10:50:38
Recording file: https://meeting.tencent.com/v2/cloud-record/share?id=c504fcca-c89c-4923-9ccb-3140068773a4&from=3
Access password: SeWf
Setting up ubuntu xrdp
Installing xrdp directly on Ubuntu is highly likely to cause a series of issues, so this guide uses the xrdp installation script
wget https://www.c-nergy.be/downloads/xRDP/xrdp-installer-1.4.2.zip
unzip xrdp-installer-1.4.2.zip
chmod +x ./xrdp-installer-1.4.2.sh
./xrdp-installer-1.4.2.sh
# 服务状态监测如上
Desktop Environment Switching
sudo nano /etc/xrdp/startwm.sh
# 在文件的末尾,找到以下两行代码
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
# 将这两行代码注释掉,在它们下面添加以下内容
gnome-session # 目标桌面环境
# 保存并关闭文件
# 重启 xrdp 服务:
sudo service xrdp restart
todo: Recording
More References
- Install xrdp on CentOS 7 (Windows Remote Desktop Connection to Linux) - Gudao Qingfeng .... https://www.cnblogs.com/88223100/p/install_xrdp_on_centos_7.html.
- Install Remote Desktop (XRDP) on CentOS - CSDN Blog. https://blog.csdn.net/lwlfox/article/details/110119420.
- CentOS 7 xrdp Installation and Setup - Anonymous596 - Cnblogs. https://bing.com/search?q=centos+7+%e5%ae%89%e8%a3%85+xrdp.
- CentOS 7 xrdp Installation and Setup - Anonymous596 - Cnblogs. https://www.cnblogs.com/gaowengang/p/10983303.html.
- CentOS 7 System xrdp Installation Tutorial - CSDN Blog. https://blog.csdn.net/tiansyun/article/details/130695454.
- How to install XRDP on CentOS 7 or RHEL 7 - Bobcares. https://bobcares.com/blog/how-to-install-xrdp-on-centos-7-or-rhel-7/.
- undefined. http://mirrors.ustc.edu.cn/fedora/epel/7.
- Install Remote Desktop (XRDP) on CentOS - CSDN Blog. https://blog.csdn.net/lwlfox/article/details/110119420.
- Enable Remote Graphical Interface xrdp Service on CentOS 7 - Zhihu. https://zhuanlan.zhihu.com/p/586502728.
- Install xrdp on CentOS 7 (Windows Remote Desktop Connection to Linux) - Gudao Qingfeng .... https://www.cnblogs.com/88223100/p/install_xrdp_on_centos_7.html.
- Use xrdp in Linux - Azure Virtual Machines | Microsoft Learn. https://learn.microsoft.com/zh-cn/azure/virtual-machines/linux/use-remote-desktop.
- Ubuntu Server xfce4 desktop, Xrdp remote desktop installation: Deep learning environment .... https://zhuanlan.zhihu.com/p/380560464.
- UBUNTU 20.04 server installation desktop xfce4 + xrdp - CSDN Blog. https://blog.csdn.net/zyklbr/article/details/114321808.
- undefined. https://docs.azure.cn.
增加相关视频链接地址,方便直接查看视频
Ubuntu怎么办呢
Ubuntu 也好整,我追加一下