XRDP – How to install XRDP on Ubuntu 17.04 – Easy Way


Hello World, 

As you probably know, Canonical is discontinuing Unity Desktop interface (see this post) and as announced recently it seems that Ubuntu 17.10 would ship with Gnome desktop already.  This means that’s probably the last time we will be covering xrdp in conjunction with Unity Desktop. 

Since Ubuntu 16.10, a new version of the xrdp package (o.9.x) has been shipped with this release.  This is a logical step forward as the team behind xrdp has also release officially the long awaited xrdp package version 0.9.x. This version brings many improvements but also some challenges.   Improvements are related to drives redirection, clipboard, builtin xrdp server backend component.  In term of challenges, the xrdp behavior seems to have changed a little bit as well in Ubuntu and the way it interact with Unity Desktop.

In this post, we will have a look on how to perform a standard installation of xrdp on Ubuntu 17.04.  Let’s do this…. 

Standard XRDP installation on Ubuntu 17.04


For this post, we have make some assumptions.

  • No alternative Desktop will be used. Unity Desktop will be the default desktop accessible via the xrdp session
  • We are using the standard xrdp package available within the Ubuntu repository for Ubuntu 17.04
  • Ubuntu 17.04 (Final Release version) is used

Click on picture for better resolution

Installation Process 

Step 1 – Install XRDP Package 

The xrdp installation process – the easy way simply consist of installing the available xrdp package within the Ubuntu repository. So, from the a terminal console, we will simply need to issue the standard apt-get install command as provided below. 

sudo apt-get install xrdp

Because of the sudo command, you will be prompted for a password. After entering your password, you will be asked to confirm your action by pressing Y (see screenshot below)

Click on picture for better resolution


That’s it !  Yes, you read it correctly, you do not need to perform any other installation software like vnc or alternate desktop interface in order to use the xrdp software solution in conjuction with Unity Desktop interface.


However, there is a catch ! Keep reading….

Workarounds,Improvements & Limitations 

Improvement #1 – Keyboard layout configuration 

If you start your remote desktop client and connect remotely to your machine, you should be presented with the standard (not really sexy) green background and the login screen from xrdp software

Click on picture for better resolution

With previous version of xrdp (0.6.x), the default keyboard layout was set to en-Us. In Ubuntu 17.04, your current keyboard layout is detected automatically.  So, there is no need to configure keyboard layouts here. We are using a Belgian keyboard and we didn’t had to configure the keyboard layout through the xrdp-genkeymap command. 

Limitation #1 – one connection only to session (either console or xrdp remote session)

This is kind of an annoying constraint.  If you are logged into your ubuntu machine directly (no remote session) and you try to connect through xrdp software, you will get access to the xrdp login screen, possibly see a black screen and then you will be disconnected.  This behavior seems due to the fact that xrdp is trying to connect to the existing session available at the console.

If you logoff from the Ubuntu local console and try again, you will be able to connect via xrdp and you will be presented with a black screen…. However, your xrdp connection will stay active…. 

Click on picture for better resolution

Limitation #2 – Manually start the Unity Desktop interface

 To access the Unity Desktop, you will need to right click on the black screen and select the option open terminal. 

Click on picture for better resolution

 In the Terminal console that opens (place your mouse on the console) and type the following command 

exec unity

Click on picture for better resolution

Note :  In the Terminal console, at the stage, the keyboard layout is en-US….

After a few seconds, you might see your screen blinking a little bit and the Unity Desktop interface will be displayed in front of you…. 

Note : We have found a workaround to automate the Unity Desktop loading process….See later in this post….

Improvement #2 – Keyboard layout configuration within xrdp session  

We have already mentioned the fact that the xrdp login screen automatically detects the proper keyboard layout.  Another improvement is within the xrdp session.  Again, the keyboard layout is detected automatically and you can see the language bar in the indicator.  You can also change the keyboard layout within the xrdp session (through setxkbmap or gui) which was not an option in previous xrdp releases…

Click on picture for better resolution

Limitation  #3 – Some functions not available within XRDP Session 

If you try to change the background from xrdp session or if you open the system settings applets, you will see that you are rather limited within the xrdp session.  I would expect that this is by design and would make sense that a certain number of options would be blocked from remote session… 

Click on picture for better resolution

Improvement #3 – Drives Redirection and Clipboard support

xrdp 0.9.x makes it really easy to have the drives redirection and clipboard feature available out of the box.  These features were the most requested one and they are now available.  In Ubuntu 16.10, this was already the case. However, it was not obvious to find and locate the redirected drives.  In Ubuntu 17.04, Canonical has made them visible and accessible which really improve user experience.  Now, it nautilus, you can see a shortcut to the redirected drives… 

Click on picture for better resolution

If you are using the Windows remote desktop client, in order to access the redirected drives within the xrdp remote session, you need to ensure that the remote desktop client is configured accordingly. As shown in the screenshot below, you have to ensure that the only option selected in the local resources tab are the Clipboard option and the drive option. 

Click on picture for better resolution

Click on picture for better resolution

When these settings have been set accordingly, you should see the thin client folder populated with redirected drives coming from your Windows machine.

Click on picture for better resolution


Improvement #4 – Performance and applications launching

The performance of xrdp remote session are a little bit better when working on internal network (LAN). There is still sometimes some serious lags or delays when launching applications. However, as seen in the following screenshot, the most used applications can be used and are workable through the remote desktop sessions

Click on picture for better resolution

Improvement #5 – Indicator panel and logout working

In Ubuntu 17.04, the indicator panel are loaded automatically and we can use the logout button from the remote session.  This feature was lacking or problematic with previous versions/implementation… 

workaround #1 – Automatically load the Unity Desktop in xRDP session 

In the previous installation guides about xrdp and Ubuntu (Unity), in order to load automatically Unity Desktop, we would be using the .xsession file or the /etc/xrdp/startwm.sh script.  We have tried this approach but out of 10 tries only 1 one successful. Moreover, it seems that when the .xsession file is used, the remote session starts but is disconnected immediately.

So, we wanted to come with a quick workaround…and we have simply created a bash script file that would check if we are connected directly on the console or through the xrdp session.  If the session is through xrdp session, the script will execute the exec unity command

In this screenshot, you can see the script that has been created (file-name.sh). We have made sure that the file is executable by adjusting the permissions on the file and ticking the option “allow executing file as program”  (as shown in the screenshot) 

Click on picture for better resolution

 Then, when locally connected to your ubuntu, launch the Dash and look for startup Applications. Click on it.  

Click on picture for better resolution

In the startup application windows, press the Add Button and the add program dialog box is displayed.  Provide the requested information and press Add

Click on picture for better resolution

In the Startup application list, you should see your recently added startup program

Click on picture for better resolution

The next time you login into your system, the Unity Desktop should load automatically and you will have access to your Unity interface through xRDP session .

Note : The script or method to have unity loaded automatically is described in this post

Final Notes

As you can see, it’s possible to have xrdp working against unity interface while using the latest version of the xrdp package (0.9.x). The new xrdp backend server components provides a real improvement over the previous implementation.  In Ubuntu 17.04, we are still able to use the xrdp software solution and automatically launch the unity desktop so the users can enjoy a identical experience desktop wise.  

In the past, a user could be logged in locally on the Ubuntu machine and in the xrdp remote session.  This is not anymore the case (sort of).  To be able to perform a remote session, a user must not be logged locally on the Ubuntu machine.  The only drawback we see so far with the current xrdp implementation in Ubuntu 17.04


We had some success with Ubuntu 16.04 (LTS) with xRDP and have both session available (local and remote) but we still do not have a standard procedure. as soon as we have found something, we will let you know…. 

Finally after all these efforts in making xrdp and Unity play kind of  nicely…and now Ubuntu is dropping Unity Desktop Interface…..I hope that you have enjoyed these posts about Unity and xRDP because these might be probably the last one you will see…. 

We need to move forward and look into the Gnome Desktop and xRDP…. This will be another challenge for sure…. 

Till next time 

See ya 





28 thoughts on “XRDP – How to install XRDP on Ubuntu 17.04 – Easy Way

  1. @Bruce,
    as soon as we have time, we will share the script….We are still looking if there is no other cleaner way to perform the same actions
    Till next time
    See ya

  2. Guys, thanks u for the article! I still ask again, maybe u will share your script? The method described simply magically, but I would like to take a look at the working script and try it out in the work. Thanks u in advance! …and wait for da script. 😉

  3. @Anton,

    The script ,actually, an working extract of the script is on it way…
    Thank for the visit and the feedback…

    Till next time
    See ya

  4. Hello everyone.
    You know how to configure the use of smartcards/etoken in multisession.
    I need to connect windows computers to an xrdp server.
    Thank you

  5. @Alberto Avidad,

    We never worked with Smartcards with XRDP..so we cannot help….if somebody has some info to share…it would be welcomed….

    Till next time
    See ya

  6. @Brian,

    You should have read the post more carefully…. There is a link that redirect you to the script that could be used to start automatically the Unity Desktop interface.
    This post (see http://c-nergy.be/blog/?p=10528) provides you the necessary instruction to startup the unity through xrdp

    Hope this help
    till next time
    See ya

  7. I’ve installed xrdp v0.9.1 on ubuntu 17.04 and on ubuntu 16.04 and on both an rdp connection using my guacamole or freerdp or rdesktop all fail.

    If I “only” uninstall xrdp v0.9.1 and install an earlier version then all three (guacamole, freerdp & rdesktop) begin to work again.

    If I uninstall the older xrdp & reinstall v0.9.1 … rdp connections fail again ?

    Looking at logs doesn’t tell me much but I did file an issue with the Neutrinolabs github to ask them about it & included my logs.

  8. @Bmullan,

    thank you for sharing the info with us….we will try to test and follow up with this errors
    till next time
    see ya

  9. Fresh install of 17.04 and xrdp, yet RDP in Windows 10 can not find or connect to it

  10. @Ryan,
    which flavour of Ubuntu are you using ? the one that ship with Unity Desktop or you are already using the Ubuntu Gnome edition ?
    You do not provide any info about your issue ? Can you see the xrdp login screen ? are you login from the same network ? have you checked the log files to see what could be the problem ?

    Till next time
    See ya

  11. Hello everyone,
    I’ve installed xrdp 0.9.1-7build1 on Ubuntu 17.04, following your easy and very well written tutorial.
    However I’m experiencing an issue: I’m not able to shutdown nor reboot the system through the Unity menu (top-right in the unity bar) when connected through xrdp. On the contrary, opening a terminal and typing “sudo poweroff” works as expected.
    In the past, I’ve used xrdp with alternative Desktop managers (e.g. mate or xfce) on different Ubuntu versions and the shutdown and reboot menu work as expected.
    Is it a known issue or I’m doing something wrong? Is there a way to fix or I have to move to an alternative desktop manager? This issue is quite annoying for me…

    Thank you,

  12. @Gioboske,

    This is a kind of recurring issue. In some version it’s zorking…in some other it’s not. In Ubuntu 17.04, It seems to work however the behavior is really inconsistent..
    At the moment, the best option is either to use the command line or to create a shortcut to logoff from the remote session

    Hope this help
    till next time
    See ya

  13. @VanDonley,

    Thank you for the feedback and info. We are aware of the issue but had no time to publish info about that. We have indeed noticed that each Ubuntu flavors might have different X Server configuration (which is new since Ubuntu 16.04.2)

    We will soon publish a post over UBuntu GNome that explain exactly this problem… (http://c-nergy.be/blog/?p=10887)

    Again, Thank for the feedback and helping us in sharing info around

    Till next time
    See ya

  14. It’s working for me on Ubuntu server 17.04

    But it’s SO SLOW…

    If I click on something, it’s 10 seconds before something happens.

  15. Would VNC be faster for connecting remotely to a server which is hosted in data center?

  16. @UbuntuUser,

    VNC can sometime be faster that xRDP especially with Ubuntu 17.04…. You have to try both scenario and assess which one would best fit your situation….

    Hope this help
    Till next time
    See ya

  17. @UbuntuUser,

    xRDP can be sometime slow especially on Ubuntu 17.04 with Unity. You might want to test with other desktop environment or try to use vnc solution

    Hope this help
    Till next time
    See ya

  18. @Gerrard,

    Thank you for the feedback and the visit…. Thank you for confirming that this approach is working. this is important for us as Canonical is moving to Gnome Desktop….so we have to make xrdp working
    Till next time
    See ya

  19. Hello!

    Could you please create a tut on how to make XRDP working on Xubuntu 17.04, please?

    I’m working at this for months now and I have tried everything I could find online, including all your tutorials, but it’s like there wasn’t even a chance for making this work.
    It always ends with one of four issues:
    1. Black screen
    2. Grey Screen
    3. Sesman just hangs after entering credentials
    4. vnc “some error”

    Thank you!

  20. @Elmariachi,
    Because of the workload we are having we are limited in the number of posts we can actually publish… If time permit, we will try to publish some info about xubuntu 17.04 or even 17.10
    You might need to be a little bit patient…
    Till next time
    See ya

  21. @Griffon
    Excellent stuff! Even as a newbie (which I am) the procedure is easy to follow. I do notice some erratic behavior of 17.04, requiring me to do a restart now and again of Ubuntu.

    – I now configered my ubuntu desktop so it requires me to manually login (so as not to allow a ‘double’ session
    – I use your workaround for the ‘black screen’ issue
    – I use the command line to exit or restart and that works fine. Would be great if that ‘feature’ would be resolved

  22. @vonmonckl;

    Thank you for the positive feedback… this xrdp solution is great but every release add something new to it that needs to be discovered..
    Thank for the visit and
    till next time
    See ya

  23. The specific process to run xrdp on ubuntu 17.04 with nvidia driver is

    1.Download & install Gnome-ubuntu 17.04
    2.install nvidia driver by:
    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get update
    sudo apt-get install nvidia-384
    3. set secure boot password and reboot your computer to disable secure boot for installation of nvidia driver
    if you failed, reinstall driver.
    4. sudo apt-get install xrdp
    5. sudo vim /etc/X11/Xwrapper.config
    exchange the line:
    6. sudo vim /etc/xrdp/startwm.sh (you might back it up before editing)
    delete the last two line
    add “mate-session”
    7.sudo service xrdp restart


Leave a Reply