Ubuntu 17.04: Connect to MATE desktop environment via XRDP

This article will describe installing MATE desktop environment and XRDP, and connecting to MATE desktop environment via XRDP.

1 Install MATE desktop environment

Install MATE desktop environment with this.

2 Install XRDP

Install XRDP. And change Xvnc to default session type because Xorg causes connection error.

$ sudo apt install -y xrdp
$ cd /etc/xrdp/
$ cat <<EOF | sudo patch -p1
--- a/xrdp.ini     2017-06-19 14:05:53.290490260 +0900
+++ b/xrdp.ini  2017-06-19 14:11:17.788557402 +0900
@@ -147,15 +147,6 @@ tcutils=true
 ; Session types
 ;

-[Xorg]
-name=Xorg
-lib=libxup.so
-username=ask
-password=ask
-ip=127.0.0.1
-port=-1
-code=20
-
 [Xvnc]
 name=Xvnc
 lib=libvnc.so
@@ -166,6 +157,15 @@ port=-1
 #xserverbpp=24
 #delay_ms=2000

+[Xorg]
+name=Xorg
+lib=libxup.so
+username=ask
+password=ask
+ip=127.0.0.1
+port=-1
+code=20
+
 [console]
 name=console
 lib=libvnc.so
EOF
$ sudo systemctl enable xrdp
$ sudo systemctl restart xrdp

3 Install TigerVNC

$ sudo apt install -y tigervnc-standalone-server

4 Create ~/.xsession

Create .xsession in home directory of user to be connected.

$ echo "mate-session" > ~/.xsession

5 Connect to MATE desktop environment via XRDP

The rdesktop connection is as the following.

0001_xrdp-mate.png