XRDP – Installing XRDP on Ubuntu 15.04

1504_XRDP_LOGO

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)

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

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 

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

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

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 

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

See ya

17 thoughts on “XRDP – Installing XRDP on Ubuntu 15.04

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

    is giving my errors.
    so i changed ‘ into ‘ but still no luck.
    going on with single user.

  2. Hello Stefan,

    My bad. There was a missing charachter in the command I have published. It should be
    sudo sed -i.bak ‘/fi/a #xrdp multiple users configuration \n echo mate-session >~/.xsession \n’ /etc/xrdp/startwm.sh

    If you would have checked the screenshot just below, you would have seen the correct syntax. Plus, this command is used to add a line in the startwm.sh file.
    You can always perform the action manually and have your system configured for multi-users scenario

    Hope this help
    Till next time
    see ya

  3. No Problem,

    Happy to see that this is still working and useful. Thanks for the visit and the positive feedback

    Till next time
    See ya

  4. Is there a way to run gnome-session, not mate-session? I’ve tried: “gnome-session –session=ubuntu-2d” but with no luck. I’m running Ubuntu 15.04.
    And thanks for the post. Mate-session works fine.

  5. Just wanted to say thanks. I’ve fussed and pulled hair out trying to get everything working on this. Your tutorial helped immensely!

  6. Hi Griffon,
    I’m using LXDE as my desktop environment, when I remote connect, my mouse cursor is an X but when I log in locally it is fine (an arrow), have you experienced this before?

  7. Hello Turbotim,

    We are not actively working with LXDE. the last time we have checked we didn’t had the issue. we will need to perform some tests to see if this is a recurring problem with LXDE and Ubuntu 15.xx

    Till next time
    See ya

  8. Great guide thanks, but I’m getting stuck. I’m trying to set this up on a Google Compute instance of Ubuntu. But when I run these commands I get the following:

    user@host:/etc/xrdp$ setxkbmap -layout uk
    Cannot open display “default display”

    and

    user@host:/etc/xrdp$ sudo xrdp-genkeymap km-0409.ini
    xrdp-genkeymap: unable to open display ”

    any ideas? could it be there are missing packages in the Google Compute instance? Or is there an addtional step I need to take to configure something?

    Any help most gratefully received!

  9. I’ve been trying to figure out why my mouse isn’t scrolling. I’ve searched all over. I followed this guide. Any help would be appreciated.

  10. Hello Luke,

    Never had the issue and currently travelling for some projects. As soon as we have time, we will have a look at the issue and see if this can be fixed
    Stay tuned

    till next time
    See ya

  11. Hi
    iam using ubuntu 15.10 and i can not execute multiple user config command-
    sudo sed -i.bak ‘/fi/a #xrdp multiple users configuration \n echo mate-session >~/.xsession \n’ /etc/xrdp/startwm.sh
    Is there any changes for 15.10 version

  12. hello There,

    As far as I know there should be no changes in the way xrdp works Under 15.10
    the commande that execute is basically adding a line in the /etc/xrdp/startwm.sh
    If you do it manually, it should be working ….

    Please note also that if you simply copy/paste the content of the script into your terminal session or text file some incorrect characters might be copied over as well
    try to type the command maually and see if this working

    Hope this help
    Till next time

    See ya

Leave a Reply