2017年10月25日 星期三

Install Remote Desktop (XRDP)

For Ubuntu 20.04
  Install mate desktop 
  https://linuxconfig.org/how-to-install-mate-desktop-on-ubuntu-20-04-focal-fossa-linux
  Install Mate Xrdp
  Refer to https://www.hiroom2.com/ubuntu-2004-xrdp-mate-en

  


For Ubuntu

Install XFCE4 desktop (bad method, gray screen)

sudo apt-get update
sudo apt-get install xrdp
sudo apt-get install xfce4
echo “xfce4-session” > ~/.xsession
sudo /etc/init.d/xrdp start
sudo /etc/init.d/xrdp status


Install Mate-desktop

sudo apt-get update
sudo apt-get install xrdp
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
sudo /etc/init.d/xrdp start
sudo /etc/init.d/xrdp status


Configuring XRDP to use your desktop environment

sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh



For CentOS

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm


vim /etc/yum.repos.d/xrdp.repo
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0


Install xrdp and tigervnc-server, then start xrdp service
yum -y install xrdp tigervnc-server
systemctl start xrdp.service


Check xrdp service
netstat -antup | grep xrdp


Enable service at system startup
systemctl enable xrdp.service


Edit /usr/lib/firewalld/services/xrdp.xml for XRDP (add port 3389)    PS: xrdp.xml will add a "xrdp" item on firewalld GUI
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>xrdp</short>
  <description>This option allows you to access Remote Desktop Service.</description>
  <port protocol="udp" port="3389"/>
  <port protocol="tcp" port="3389"/>
</service>


Add xrdpservice for firewalld and reload firewalld
sudo firewall-cmd --permanent --add-service=xrdp
sudo firewall-cmd --reload
sudo systemctl status firewalld


Configure SELinux
sudo chcon --type=bin_t /usr/sbin/xrdp
sudo chcon --type=bin_t /usr/sbin/xrdp-sesman



Refer to:
  1. http://c-nergy.be/blog/?p=8952
  2. https://www.interserver.net/tips/kb/install-xrdp-ubuntu-server-xfce-template/
  3. http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html


沒有留言:

張貼留言