XRDP – Installing XRDP on Ubuntu 15.10

XRDP_UB1510

Hello World,

This will be really a short post today.  In our previous post, we have quickly described how to perform a fresh installation of ubuntu 15.10 (beta 1).  We have seen that the process has not changed dramatically and you can have a system up and running in about 15-20 min.

To install xrdp software on your ubuntu 15.10 machine, the process will be exactly the same as the one we have described for machines running Ubuntu 15.04. (see http://c-nergy.be/blog/?p=7984)

So, instead of going really deep into details, we will provide hereafter the necessary steps needs to be performed in order to have xrdp installed on your system.  If you need more details about the installation process, we will provide at the end of the post, links to our previous posts about xrdp

So, let’s go

Perform a standard xrdp installation on Ubuntu 15.10

Assumptions

For this post, we have make some assumptions.

  • Ubuntu 15.10 Beta 1 version is used
  • The Mate-desktop will be installed on the machine (as alternative desktop environment)
  • We will configure our system to match on localized version (i.e. we are using a Belgian french keyboard)
  • Since Ubuntu 15.04, upstart has been replaced by systemd component. The systemd component is used in our scenario
  • 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

Step 1 – Install XRDP Package from Ubuntu Repository

To perform the installation of xrdp package from Ubuntu repository, you will open a terminal and issue the following command

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)

Click on Picture for Better Resolution

Step 2 – Install Mate-Desktop 

Based on our assumptions, Mate-Desktop will be used in order to have a working xrdp connection.  As you know, Unity interface is not working with the xrdp software. This is why we have to install a different desktop environment that will be used during the remote dekstop connections..

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

Note :  

You can use other desktop interface such as xfce,LXDE,LXQT or KDE as well. Check the following links for more information

 

Step 3 – 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 

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

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 

Step 4 – 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

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

Click on Picutre for better Resolution 

Step 5 – 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.

Final Notes

As we have said in the beginning, this post was really short and straight forward.  There is no major changes in the installation process of xrdp package on Ubuntu 15.04 and we do not expect issues in the final release of Ubuntu 15.10.

If you upgrade from a system running Ubuntu 14.xx to Ubuntu 15.xx, and you have installed xrpd, you might have issues after the upgrade. You might have a look at the following post, which might help you solving your issues

That was an easy post  🙂

Till next time

See ya

9 thoughts on “XRDP – Installing XRDP on Ubuntu 15.10

  1. Hi.
    Would you please write a post on how to configure and install xrdp on openSuse 13.2 or 42.1?

    Thank you

  2. hello there;

    At the moment; we are heavily busy with our work and projects…
    We will see if we can provide a tutorial for OpenSuse

    Till next time
    See ya

  3. Remember to enable Mate by doing:
    echo mate-session >~/.xsession

    Otherwise when you login via xRDP you’ll get a grey default X11 screen which will then dump you out of the remote session.

  4. Hello Tony,

    you are totally right. After re-reading the post, we have indeed forgotten to include the section that specify how to use the installed desktop
    Thank you for spotting that out
    Will be fix asap

    Till next time
    See ya

  5. Hi,

    First, great how-to’s!
    Second, is there a way to have the clipboard working? I often cut/copy text on my workstation and paste to my servers. With xrdp that’s a no go. Tried googling the problem but no luck.

    Thanks,

  6. Hello There,

    As far as we know (it’s a long time we haven’t checked that) the clipboard function does not really work between Windows and Linux.
    You have to find another way to perform the operation and exchange data between linux and windows machines

    Till next time
    See ya

  7. Greetings,

    I followed your instructions and i came up with this erro (see below).
    Just FYI – i skipped the Single User on the System since i have multiple users.
    I am fairly new with Ubuntu. Any help would greatly appreciated.
    Thank you

    root@CCSR-Ubuntu2:/etc/xrdp# sudo sed -i.bak ‘/fi/a #xrdp multiple users configuration \n echo mate-session >~/.xsession \n’ /etc/xrdp/startwm.sh
    sed: -e expression #1, char 1: unknown command: `�’

  8. @Eric,

    This error is due to the fact that you have copy/paste the text from the blog without checking the formatting. If you type the command (and not copy it) the command works perfectly.

    Hope this help
    Till next time
    See ya

  9. Hi

    Sorry for the delay ( I was on vacation). Thank you for your prompt reply.
    Your comment was very helpful. It worked!!! 🙂

    Thank you

Leave a Reply