XRDP – Installing XRDP on Ubuntu 15.04

Note : 

The instructions provided hereafter are working and valid for ubuntu 15.04 systems using the systemd component.  You can still use this setup guide to perform you xrdp installation

 

Hello World,

Ubuntu 15.04 is coming soon. So, we have decided to already update the information about using xRDP software on Ubuntu 15.04.  As you can expected, there is not much changes since the last version.  The procedure described for Ubuntu 14.04 and 14.10 should still be working.

If you have performed xrdp installation in the past (using the standard package provided by Ubuntu), you should not encountered any major issues.

Assumptions

For this post, we have make some assumptions.

  • We are using Ubuntu 15.04 Beta 1 version
  • We will install as alternative Desktop the Mate-Desktop
  • We will configure our system to match on localized version (i.e. we are using a Belgian french keyboard)
  • No additional configuration is needed to reconnect to the same session if you are using the latest version of the xrdp package found in the Ubuntu Repository

Step By Step installation

Install XRDP Package from Ubuntu Repository

Installing xRDP package is quite straight forward.  However, in order to have it working, you will need to perform some post configuration actions.  In this step, we will simply install the xrdp package on our system by issuing the following command in a terminal console :

sudo apt-get install xrdp 

You will be prompted for a password and you will need to confirm your selection by Pressing Y (see screenshot below)

XRDP_15.04_1.PNG

Click on Picutre for better Resolution 

Install MATE-Desktop as alternative Desktop 

In this post, we assume that we want to use MATE-Desktop environment to be used in conjunction with xrdp software. You can use other desktop interface such as xfce,LXDE,LXQT or KDE as well).  To install the Mate-desktop, issue the following command from the Terminal Session

sudo apt-get update

sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

XRDP_15.04_2.PNG

Click on Picutre for better Resolution 

As you can see from the screenshot, I do not need to add any additional repository. Ubuntu is officially supporting Ubuntu Remix version which is using the Mate-desktop

Configuring xRDP to use your desktop environment

At this stage, you have to tell xRDP that it needs to use the MATE-Desktop while performing your remote desktop connection.

Important Note : 

If you have installed another Desktop alternative, the content of the .xsession file needs to be adapted to meet your infrastructure. See below for links on how to use other desktops with xRDP

Single User on the System

If you are the only user that needs to connect to the system via xrdp, you can simply create/update the .xsession file.  To configure your system and tell xrdp to use mate-desktop, from a terminal console, you will issue the following command (while connected with the user who needs xrdp access)

echo mate-session >~/.xsession 

XRDP_15.04_3.PNG

Click on Picutre for better Resolution 

Multiple Users on the System

If you have multiple users that needs to access the system via xrdp,instead of manually configure for each users the .xsession file, you can update the /etc/xrdp/startwm.sh file so the system will update the file for every user automatically. (for more information see XRDP – Enable multiple users to connect via xrdp – HowTo Configuration).  To configure this, issue the following command in your Terminal console

sudo sed -i.bak ‘/fi/a #xrdp multiple users configuration \n echo mate-session >~/.xsession \n’ /etc/xrdp/startwm.sh

XRDP_15.04_4.PNG

Click on Picutre for better Resolution 

Note:

If you want to use another Desktop Environment, you have to update your .xsession file. The following links will provide you the necessary information to configure your system accordingly 

Configuring xRDP Keyboard

As in the past, the xRDP login screen will use by default an en-us keyboard layout. You remote session will also be using the en-us keyboard layout.  This can be changed.  In my case, I’m using a Belgian French keyboard, so I had to tell xrdp to use the belgian french keyboard as well.  To do that, you need to perform the following actions :

Step 1 : You go to the /etc/xrdp directory

Step 2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use

XRDP_15.04_5.PNG

Click on Picutre for better Resolution 

Step 3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

Step 4 : Check that you have a backup of your file by typing the dir or ls command

Step 5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

 

XRDP_15.04_6.PNG

Click on Picutre for better Resolution 

Reconnect to the Same Session

Since Ubuntu 14.10, a new xrdp package has been made available in the Ubuntu repository. This package fixes a long time issue related to the fact that users could not reconnect to the same session.  If you are using the package xrdp 0.6.1-1, you do not need to perform any customization, you will reconnect automatically to the same session.

If you are using an older version of the package, you can always perform a custom installation of xrdp and achieve the same results. We will update the post about custom installation of xrdp for Ubuntu 15.04 in the near future.

Final Notes

As you can see the process has not changed that much when using xrdp and remote desktop client tool. The processes described for ubuntu 14.04 are still applicable for ubunt 15.04.  So, if you are used to install and configure xrdp with Ubuntu, this version should not be a problem for you.

In the coming weeks, we will update the post related to the custom xrdp installation.

Till next time