Issues with xRDP and Ubuntu 18.04.2 – How to fix it

Hello World, 

Based on the feedback we have received through this blog, it seems that there is some changes that has been introduced in Ubuntu 18.04.2 which seems to break the xRDP capability and people cannot perform the remote desktop connection anymore.  After being presented with the xRDP login page,  only the green background screen is presented to you and will fail eventually.  This issue will occur if you perform a manual installation or if you use the latest version of Std-Xrdp-Install-5.1.sh script.

This post will explain what’s needs to be done in order to fix this issue.  So, let’s go ! 

Overview

Ubuntu 18.04.2 has been released and more and more people are noticing that after installing the xRDP package, they are not able to connect to the desktop interface through remote desktop connection software.  Apparently, Ubuntu 18.04.2 has introduced some changes that preventing xRDP package to work as expected.  We have performed a manual installation to see what could be the problem. 

Problem Description

So, to perform a manual installation, we have opened a terminal console and we have issued the following command 

sudo apt-get install xrdp 

xrdp_issue_0

Click on Picture for Better Resolution

After having performed the installation, we have checked that the xrdp service was running using the following commane 

sudo systemctl status xrdp 

xrdp_issue_5

Click on Picture for Better Resolution

So far, everything seems to be working as expected.  So, we moved to a windows computer, fired up the remote desktop client and as we can see in the screenshot, we are presented with the xrdp login page

xrdp_issue_1

Click on Picture for Better Resolution

After entering our credentials,  we only see a green background page and nothing happens.  After a certain amount of time (several minutes), you should see the following error message 

connection problem,giving up
some problem

xrdp_issue_2

Click on Picture for Better Resolution

Resolution process

After looking into the logs, it seems that the xorgxrdp component of xRDP is not working as expected.  When we have performed the installation of the xRDP package, we have noticed that information displayed in the console mentionning that xorgxrdp package is needed (see screenshot below).  So, when performing the xrdp installation, it seems that the xorgxrdp package is not installed anymore.

xrdp_issue_3

Click on Picture for Better Resolution

So, it’s seems that the issue encountered is due to the fact that the xorgxrdp package is not installed.  So, moving forward, we have decided to install the xorgxrdp package manually just after installing the xrdp package.  So, we have issued the following command in a Terminal console 

sudo apt-get install xorgxrdp  

Issuing this command will not perform the installation as there are some dependencies errors

xrdp_issue_4

Click on Picture for Better Resolution

We have just found the root cause issue

The xorgxrdp package cannot be installed because of some missing dependencies. Because we have no xorgxrdp component installed on the computer, it seems logical that when we perform a remote connection, we are never presented with the Ubuntu desktop…

Fixing xRDP on Ubuntu 18.04.2

If you are performing a brand new xRDP installation or if you have installed xRDP and you are encountering the issue, you will need to perform the following actions 

New xRDP installation xRDP already installed
  • Install xserver-xorg-core package
  • Install xsrever-xorg-input-all package
  • Install xRDP package 
  • install xserver-xorg-core package
  • Install xsrever-xorg-input-all package
  • install xorgxrdp package 

New xRDP installation Scenario

So, let’s go into more details.  Let’s assume, you have performed a fresh installation of Ubuntu 18.04.2 and you want to install xRDP package through a manual installation, you will need to perform the following actions.

Step 1 – Install xserver-xorg-core by issuing the following command

sudo apt-get install xserver-xorg-core

xrdp_issue_6

Click on Picture for Better Resolution

Note : You will notice that installing this package will trigger removal of packages *xserver-xorg-hwe-18.04* which might be used or needed by your system… So, you might loose keyboard and mouse input when connecting locally to the machine.  To fix this issue, you will have to issue the following command just after this one 

sudo apt-get -y install xserver-xorg-input-all

Step 2 – Install xRDP package

sudo apt-get install xrdp

In the screenshot, you can see that because there is no more dependencies issues, the xorgxrdp package is  listed to be installed along with the xRDP package

xrdp_issue_7

Click on Picture for Better Resolution

Fixing xRDP installed package

If you have performed the installation of xRDP packages on Ubuntu 18.04.2 using the Std-Xrdp-install-0.5.1.sh script, in order to restore the xrdp functionality, you will need to simply install the missing dependencies by issuing the following command

sudo apt-get install xserver-xorg-core

xrdp_issue_6

Click on Picture for Better Resolution

Note : Again, you will notice that installing this package will trigger removal of 17 packages *xserver-xorg*-hwe-18.04* which might be used or needed by your system…So, you might loose keyboard and mouse input when connecting locally to the machine.  To fix this issue, you will have to issue the following command just after this one 

sudo apt-get -y install xserver-xorg-input-all

After installing the missing dependencies, you will need to manually install the xorgxrdp package in order to restore the xRDP functionality

sudo apt-get install xorgxrdp

xrdp_issue_8

Click on Picture for Better Resolution

When this is done, you will be able to perform your remote connection against your Ubuntu 18.04.2

xrdp_issue_9

Click on Picture for Better Resolution

 

Fixing keyboard and mouse issues in Ubuntu 18.04.2 

After installing xRDP package using the recipe above or if you have used the custom installation script (version 2.2), you might encounter another issue. When login in locally on the ubuntu machine, you will notice that you have lost keyboard and mouse interaction.  Again, as explained above, the fix is quite simple, rune the following command in the terminal session

sudo apt-get -y install xserver-xorg-input-all

Note : As long as you do not reboot after installing the xRDP package, you will not have any problems.  After a reboot, you might loose keyboard and mouse input on your system.  

 

Final Notes

The addition of the xserver-xorg-hwe-18.04 and associated packages seems to have introduced some dependencies changes that interfere wit the xorgxrdp and xrdp packages version available on Ubuntu repository.  So, if you have used the Std-Xrdp-Install-0.5.1.sh script and you are facing this issue, you will need to manually install the xorgxrdp package.  If you have used the custom installation script (install-xrdp-2.2.sh), you will not have the issue as the script compile and install the xorgxrdp package separately and we are using the latest xrdp and xorgxrdp package version..However, you might also have the keyboard and mouse problem. Again, you will need to re-install the xserver-xorg-input-all package...

It seems that we will need to update the script in order to provide support for Ubuntu 18.04.2 as Ubuntu 18.04 is a Long Term support release.  Please be patient as it might take us some time before we can upload the new version of the script….

Hope this clarify the issue…

Till next time

See ya

 

 

10 thoughts on “Issues with xRDP and Ubuntu 18.04.2 – How to fix it

  1. Thanks Griffon, this issue makes me crazy these days…
    I did try to install xorgxrdp, but when I saw that so many packages will be removed, I was afraid and stopped. 🙁

    If you don’t mind, I wold like to write a blog and make a ref link to your post.
    thanks again!

  2. @Junren,

    Thank you for the feedback. Happy to see that the information is useful
    You can use the information here to write your blog post as long as you provide credits and a reference link

    Till next time
    See ya

  3. Just found this! I’ll try it again… lol

    I’m planning to port Std-Xrdp-Install-5.2.sh to Ansible! If you don’t mind… 😛

  4. Hey Griffon! Check this out!

    So, there is a need to rebuild xrdp against HWE 18.04 on Ubuntu 18.04.2.

    Maybe Ubuntu should provide a new binary package, let’s say “xrdp-hwe-18.04″…

    For now, I’ve recompiled the same xrdp from Ubuntu 18.04, on Ubuntu 18.04.2 and uploaded to my “XRP PPA”, here:

    https://launchpad.net/~martinx/+archive/ubuntu/xrdp-hwe-18.04

    To enjoy xrdp on Ubuntu 18.04 with HWE, just do:

    sudo add-apt-repository ppa:martinx/xrdp-hwe-18.04
    sudo apt install xrdp xorgxrdp

    Bug report:

    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1817225

    😉

  5. @Thiago,

    Waaaah, That’s an amazing work in so little time….. We will give it a try
    We are starting to test our installation process against Ubuntu 19.04 (Beta is just out). I think that a the latest xrdp package is included (version 0.9.9) which should not give any issues
    As I said, need to check this one….

    Thanks for sharing your work and findings…. really appreciated
    Keep in touch
    Till next time
    See ya

  6. @Thiago;

    If you convert the script into Ansible solution, please let us know so we can use and test it on our side as well. Please share your work as well 🙂 so anyone can benefit from it
    Till next time
    See ya

  7. Hi! I just want to express my thankfulness for this toturial. I’ve investigated the web for a solution for the non working xrdp for days without any working solution. Finally I’ve found your website, I followed your instructions and it has been working out of the box. Again – thank you very much for this great work. BR

  8. @Ottmar,

    Thank you for the visit and the positive feedback. Ubuntu 18.04.2 indeed changed something and a this post has provided a quick fix to still have xRDP working.
    As a better option, there is the possibility to use ready to use xRDP packages that can work with the xserver-xorg-core-hwe-18.04 packages (check this post http://c-nergy.be/blog/?p=13487

    As ubuntu 19.04 is out, expect to see in a near future new version of the installation script for xRDP 🙂

    Till next time
    See ya

  9. Thank you so much for this! I’ve been trying to fix this for days, and nothing I found online worked. Your solution worked like a charm. Now I have working xRDP on Ubuntu 18.04.2!

Leave a Reply