xRDP – Issues when installing xRDP on Ubuntu 18.04.4

 !! Important Note !!

March 08, 2020 – The issue detected on February 23 has been mentioned and being investigated by the xRDP team  (see here).  At the moment, no valid fix or patch is available.  However, the xrdp-installer-1.1.sh script can now be run normally (whatever mode) and no error should be generated. It seems that the xRDP Team has made the previous version xorgxrdp-0-2.11.x the default package to be used….  This means that the custom installation will install the xrdp package 0.9.12 but the xorgxrdp 0.2.11 will be used instead of xorgxrdp 0.2.12 (which was causing the issue).  So, Use the information on this post only if you are using the xorgxrdp version 0.2.12 only !!

Hello World, 

As usual when a new Point release version for Ubuntu is made available,  there is always a chance that the xRDP installation breaks.  If you remember, Ubuntu 18.04.2 Point release broke the default installation process and a quick fix needed to be provided (for more info, check here, here) . The latest version of the xrdp-installer script was taking into account this issue and provided the proper fix for it.

Based on readers feedback and comments,  it’s seems that there is an issue that has been discovered when performing a custom installation of xRDP (using the xrdp-installer script) on top of Ubuntu 18.04.4. 

Let’s try to identify the issue and provide a possible fix for it…. 

Overview

Problem Description

Ubuntu 18.04.4 has been released a few days ago and we have been already notified by some readers that xRDP does not seems to work as expected when performing the installation with the xrdp-installer script.  The installation script run as expected (no errors shown on the screen).  However, users are not able to remote desktop to their Ubuntu machines.  It seems that a change in Ubuntu 18.04.4 or in xrdp packages might be causing the issue. 

After collecting some more information about this issue, it seems that the problem occurs only when the user performs a custom installation (i.e compiling from sources) when running the xrdp-installer.x.x.sh script.   Again, the script run perfectly fine. When the user perform a remote connection to Ubuntu, the xRDP Login screen is displayed.  The user enters the credentials.  The connection start (you can see a black screen) and after a few seconds, the user is simply disconnected…. 

Resolution Process…

In order to identify the issue and assess where the problem might be located, we have performed multiple installation of xRDP on a freshly installed Ubuntu 18.04.4 machine.  We have performed the following actions 

  • manual installation of xRDP 
  • scripted installation of xRDP – using the standard installation mode
  • scripted installation of xRDP – using the custom installation mode
  • started xRDP in debug mode to get more information when xRDP connection was not successful

PS. 

  1. We have performed these tests on a virtual machine. Results might be different if you have physical machine with dedicated hardware on it… 
  2. We assume that your are familiar with xrdp-installer-1.1.sh script and you know where to get it and how to use it….

Manual installation 

When there is a problem with xRDP and Ubuntu, we always perform a manual installation using the xrdp packages provided by Ubuntu.  If the installation is successful, it means that the xRDP packages are valid and are compatible with Ubuntu 18.04.4 

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

sudo apt-get install xrdp -y 

1_xrdp_u18044_1

Click on Picture for Better Resolution 

The installation process should be completing successfully. However, if you check for the xorgxrdp package using the command dpkg, we can see that the xorgxrdp package is not installed. 

1_xrdp_u18044_2

Click on Picture for Better Resolution 

Because xorgxrdp pacakge is missing, when a user tries to connect remotely, only a green background will be displayed 

xrdp_u18044_3

Click on Picture for Better Resolution 

After some times, you will see also the a dialog box showing up providing you some information

xrdp_u18044_3a

Click on Picture for Better Resolution 

To fix this situation, we have to install the xorgxrdp package 

sudo apt-get install xorgxrdp -y

xrdp_u18044_4

Click on Picture for Better Resolution 

This command will fail and this is expected.  Since Ubuntu 18.04.3, there is a new xorgxrdp package available that needs to be used.  So again, from your terminal console, issue the following command 

sudo apt-get install xorgxrdp-hwe-18.04 -y

xrdp_u18044_5

Click on Picture for Better Resolution 

Logging off from the Ubuntu computer, we can perform a remote desktop connection and the process goes through.   This means that the Ubuntu and xRDP Ubuntu packages are working nicely together…. 

Scripted installation – standard Mode  

To ensure that the script is not causing the issue, we have then performed a standard installation of xRDP through the script.  When running the script in standard mode, you simply install the xrdp packages from Ubuntu repository and  some additional post actions tasks are performed and configure your xRDP session to look like the one you would have if locally connected. So, to perform the custom installation, we have executed the following command 

./xrdp-installer-1.1.sh 

xrdp_u18044_6

Click on Picture for Better Resolution 

The script completed successfully as you can see.  Logging off from the machine and trying to perform a remote connection works without an issue…. 

xrdp_u18044_7

Click on Picture for Better Resolution 

Scripted installation – custom Mode  

The standard install mode seems to work as expected and the script as well is working as expected.  It’s time to test the custom installation mode as this is the installation mode that seems to cause the issue.  The custom install mode is basically getting the latest version of xRDP package and the script will be compiling the binaries on your Ubuntu machine.  To perform the custom installation, you simply issue the following command in Terminal console 

./xrdp-installer-1.1.sh -c 

xrdp_u18044_8

Click on Picture for Better Resolution 

After installation, logging off from the computer and try to perform remote connection.  Again, as mentioned above, the xrdp login screen will be displayed but when passing the credentials a black screen is displayed for a few seconds and then it disappears

xrdp_u18044_9

Click on Picture for Better Resolution 

Running xrdp in Debugging mode 

To run xrdp in debugging mode (after performing a custom installation), you have to perform the following actions 

step 1 – stop xrdp service  (sudo systemctl stop xrdp) 

step 2 – Open a terminal console and issue the following command 

               cd /usr/local/sbin 
               sudo ./xrdp -ns 

step 3 – Open another terminal console and issue the following command 

               cd /usr/local/sbin 
               sudo ./xrdp-sesman -ns 

xrdp_u18044_11

Click on Picture for Better Resolution 

 

While performing the connection, we can see output information displayed on the screen….We have noticed a fatal error message displayed while trying to perform the remote connection

xrdp_u18044_12

Click on Picture for Better Resolution 

 

Possible Root Cause Identified

When performing the custom installation, we are using the latest version of xrdp package (0.9.12) and xorgxrdp packages (0.2.12).  When performing a standard or manual installation, we are using the xrdp version 0.9.5-x (so older package version).   To assess and get confirmation that the xorgxrdp package version 0.2.12 might be root cause of the issue, we have decided to remove this package.     

When using the xrdp-installer-1.1.sh script, you have the possibility to uninstall only the xorgxrdp package by issuing the following command 

sudo dpkg -r xorgxrdp

xrdp_u18044_10

Click on Picture for Better Resolution 

When uninstalled, we have decided to install the xorgxrdp package available from the Ubuntu repository. So, we have to run the following command 

sudo apt-get install xorgxrdp-hwe-18.04

xrdp_u18044_5

Click on Picture for Better Resolution 

After performing this action, we have tested the remote connection and it worked !  You can see that the xrdp package version is set to 0.9.12 but the xorgxrdp package we are using the package provided by Ubuntu…

xrdp_u18044_13

Click on Picture for Better Resolution 

 

So, it seems that the new xorgxrdp package (0.2.12) seems to cause issues with Ubuntu 18.04.4 

To test further our theory, we have downloaded the previous version (xorgxrdp 0.2.11), compiled and installed.  Again, using the previous version of the package, we have been able to perform a remote desktop connection to Ubuntu 18.04.4.

xrdp_u18044_14

Click on Picture for Better Resolution 

Final Notes

Voila ! This is it for this post ! 

As mentioned/discovered by some readers, running Ubuntu 18.04.4 and the latest version of the xorgxrdp package (0.2.11), remote desktop connection does not work as expected.  The problem will occur only when you are using the latest version of xrdp and xorgxrdp packages (downloaded directly from the xrdp github web site).  If you are using the default xrdp packages shipping with Ubuntu 18.04.4, the remote desktop connection will work with no glitches…  

So, if you use the xrdp-installer-1.1 script to perform the xrdp installation, you will need to perform a standard installation and avoid the custom install mode on Ubuntu 18.04.4. and maybe on other Ubuntu versions as well (we have not checked other version so far!!!).  

We will check if a new version of the script will be worked out and published in order to tackle the identified issue.  Another option would be to mention the issue to the xrdp/xorgxrdp teams and see if a patch will be provided….. 

Hope this post will be helpful 

Till next time 

See ya 

 

 

 

 

 

6 thoughts on “xRDP – Issues when installing xRDP on Ubuntu 18.04.4

  1. As part of the fix for manual install, you mention this command:
    sudo apt-get install xorgxrdp-hwe-1804 -y

    This fails on my fresh 18.04.4 install, with this error:
    E: Unable to locate package xorgxrdp-hwe-1804

    Is this meant to be in pre-existing package lists?

  2. @Rory,
    There is a typo in the text (which will be fixed immediately)
    you have to type apt-get install xorgxrdp-hwe-18.04 -y

    Please provide feedback and tell us if this is working or not
    Hope this help
    Till next time

  3. Endless issues trying to get this to work on fresh Ubuntu 18.04.4 install and it still doesn’t work without getting an internal error upon login in on rdp

  4. @P7,

    Sorry that this is not working for you… xrdp team has detected the issue and they are working on fixing or reverting back to stable version
    Thanks for the visit…maybe Ubuntu 20.04 will provide a better experience for you
    Till next time
    See ya

  5. I also have endless issues, I have tried many things to get this to work. I am creating an ubuntu image of 18.04.3 LTS as a guest vm and using windows 10 host with hyper-V manager. When I first create the image, I can use ‘enhanced mode’ session (just rdp) to connect to the vm. At some later point, the configuration no longer allows an enhanced session connection, and I just get a light blue screen for 5 minuets, then an error message ending in “some problem”. It’s possible that windows host machine going to sleep breaks the functionality. I’ve tried all simple fixes, rebooting host and guest many numbers of times, changing the timing of connecting, trying custom repos for the rdp packages, and the scripts provided here, none of which restore functionality. Please let me know any suggestions on how to fix my issue. Windows support only says ‘ask ubuntu’, I have no details on what type of options windows hyper-V uses in the rdp connection, and the xrdp error messages are undecipherable for me.

  6. @Doug,

    A little bit confusing question because you are mixing Hyper-v RDP (enhanced mode) and xRDP mode (Standard rdp connection). Both are mutually exclusive… it’s either one or the other…..
    So first Question What do you want to achieve ?
    -> Having Enhanced mode working
    -> Then you have to use the script/procedure found at https://github.com/microsoft/linux-vm-tools/wiki/Onboarding:-Ubuntu
    -> Using this procedure will ensure Enhanced mode for VM but will not be able to remote desktop from the network (review this old post for more info http://c-nergy.be/blog/?p=12429

    -> Accessing the machine through network using RDP protocol (so, standard xrdp)… You should then upgrade your Ubuntu to the latest version (18.04.4) and use the xrdp-installer-1.1.sh script
    -> If you do not have access to the remote session, then you will need to share the xrdp logs so we can try to provide some help

    Hope this help
    Till next time
    See ya

Leave a Reply