xRDP – Other possible issues with xRDP on Ubuntu 16.04.3 – Part II

Hello World, 

We continue our journey in investigating possible issues that might show up if you try to perform a custom installation of xRDP on Ubuntu 16.04.3 release.  Indeed, the Ubuntu 16.04.3 has introduced a change that break the custom installation process of xRDP.  More specifically, when trying to compile xorgxrdp component from sources, a fatal error will occur as a necessary file is not anymore available within Ubuntu operating system file. In this post, we have described the small bug and provided two way to overcome this problem.. 

After fixing the bug and trying to connect through the remote desktop client, two additional issues showed up affecting (so far) Ubuntu 16.04.3. The funny thing is that all these issues present the same symptoms.  After passing the credentials in the xRDP login page, only the green background page is displayed and Unity Desktop interface never shows up.  The first issue is related in the way Ubuntu treat authorization of running X Server.   In this post,  we have described how to identify the problem and how to fix the problem as well.  In short, you need to edit the Xwrapper.config file and ensure that anybody can run X server.  

Again, after fixing this issue, time to test the connection and access to the remote  desktop. And….again, only the green background screen was displayed and no way to access the remote desktop interface….. This issue might be specific to virtual machines.  Indeed, we are working exclusively with virtual machines (no physical machines) and we have encountered this issue while operating Ubuntu as virtual machines….. 

So, enough teasing, time to identify and fix the issue….. 🙂 

Problem Description and Scenario

Case 1 – Hyper-V as virtualization Technology 

Problem Description

As mentioned earlier, Ubuntu 16.04.3 was installed as a virtual machine on an Hyper-V virtualization platform.  Based on our recent findings and user reports, the Ubuntu 16.04.3 was configured to take into account the recent bug and configuration changes introduced by Ubuntu.  The following configuration changes were performed on the Ubuntu machine

However, after trying to connect using Remote Desktop client, we ended up again with the infamous green background screen 

Click on Picture for Better Resolution 

You will be either disconnected after some time or you might see the following error dialog box…. 

Click on Picture for Better Resolution 

This was really disappointing !   

Solution

To find the solution to this problem, we first needed to identify the problem. Again, to troubleshoot the situation, the different log files were useful.  /var/log/xrdp.log and /var/log/xrdp-sesman.log were not really useful.  More interesting logs were the  ~/.xorgxrdp.10.log and possibly the /var/log/Xorg.log.  The screenshot below shows the content of the ~/.xorgxrdp.10.log

Click on Picture for Better Resolution

 

We looked multiple times into the file before noticing the most important information. In the log file, the following error is clearly shown. 

xorgxrdp : module ABI major version (20) doesn't match the server's version (23)

This unclear message simply means that some xserver-xorg components are not present on the system or that the one present on the system are not the one needed to have xorgxrdp starting properly.  After looking for some info about this error message, we discovered that the easy fix was simply to install xserver-xorg-core package on top of the Ubuntu 16.04.3 machine.  To install this package, issue the following command in a terminal console 

sudo apt-get install xserver-xorg-core

You might be prompted for a password.  Provide it. You might be asked to confirm the installation.  Press Y to proceed and wait for completing…. 

Click on Picture for Better Resolution

After that, reboot your system and try to perform your remote desktop connection and finally after all these efforts and tweaks, you should see the Unity Desktop interface loading and you can start working remotely on your Ubuntu machine….. 

Case 2 – VirtualBox as virtualization Technology 

If you are using Virtualbox, you may or may not encounter the issue.  This will depend on the way the virtual machine has been configured.  Let’s assume that you have reached the situation where you have installed the fix, configured the Xwrapper.config and you can still not access the machine via Remote Desktop….

Solution 1 – Install the xserver-xorg-core package

The problem is similar to the one described above.  If you open the xorgxrdp.XX.log file, you will see the same infamous error 

xorgxrdp : module ABI major version (20) doesn't match the server's version (23)

Again, in this case, the solution is quite simple. You need to install the xserver-xorg-core package on your system. To install this package, issue the following command in a terminal console 

sudo apt-get install xserver-xorg-core

Solution 2 – Install virtualbox Graphic Card Drivers 

The other solution is to check if the Virtual box graphic card drivers have been installed on your virtual machine.  To check if the drivers are installed or not on your system, you can perform the following tasks.  

  • click on the Dash and search for software Updates. In the result page, click on the icon Software   & Updates icon 

    Click on Picture for Better Resolution

  • The Software and Updates dialog box is displayed 

Click on Picture for Better Resolution

  • Click on the Additional Drivers Tab.  If you see a screen like the one below, the virtual box drivers are not installed….

Click on Picture for Better Resolution

  • In the additional drivers tab, tick the option under the Graphic card drivers “Using x86…”   Then Press Apply.  You will be prompted for a password.  If the password is correct, the installation will proceed. Wait for completion 

Click on Picture for Better Resolution

  • At the end of the process, you will see a screen similar to the one below. You can press close and you are ready to perform your remote connection

Click on Picture for Better Resolution

As you have probably got it, installing the Virtual box Graphic drivers install in the background the xserver-xorg-core package (as shown in the screenshot below)

Click on Picture for Better Resolution

The first command was executed before installing the Virtual box guest drivers and you can see that the package is not marked as installed…. The second time we ran the command, the virtual box graphic drivers were installed and boom, the xserver-xorg-core package is present as well…. 

Final Notes

As Ubuntu 16.04 is a long term support release, it make sense to perform a custom installation of xrdp in order to enable clipboard support and drives redirection.  On the other hand, Unity Desktop interface is being dropped and replaced by the Gnome Desktop interface.    Based on all the recent issues and fixes detected, there is a need to update the install-xrdp-1.9.sh script to integrate all these changes.  This might be the last time we will update the script as the next long term release is at the corner.  Ubuntu 18.04 will be based on Ubuntu Gnome Desktop and would definitly ship with a recent xRDP package that would provide the benefit of a simple and straight forward installation… 

 

We shall see what the future brings…. 

Till next time

See ya 

 

 

 

6 thoughts on “xRDP – Other possible issues with xRDP on Ubuntu 16.04.3 – Part II

  1. Hey, thanks very much for this series of blog entries. My 16.04.3 system was hardly in a pristine state and I was still able to get xrdp up and running thanks to them. Much appreciated!

    One last thing that is probably going to stump some people. This is yet another X11 solution that has its own damn way of logging in a user that results in a non-standard environment. This note from /etc/xrdp/startwm.sh might help:
    # for PATH and LANG from /etc/environment
    # pam will auto process the environment file if /etc/pam.d/xrdp-sesman
    # includes
    # auth required pam_env.so readenv=1

    I added that last line (minus the ‘#’, obviously), to /etc/pam.d/xrdp-sesman, restarted xrdp again, and now have the standard environment variables again.

  2. @Tyler,
    Thank you for positive feedback and for sharing your findings with us… much appreiciated….
    When time permit, we will try to improve our xrdp knowledge base with all the findings from our readers base

    Till next time
    See ya

  3. What about an ubuntu 17.10 vm running on kvm-qemu. I keep trying to connect to xrdp, and get kicked off right away. This is what sticks out in logs:
    VM:~/.local/share/xorg$ cat Xorg.10.log|grep EE
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [ 43.875] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
    [ 43.933] (EE) AIGLX: reverting to software rendering
    [ 44.114] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted

  4. @Ger,

    Note that a dedicated procedure install exist for Ubuntu 17.10 and can be found at the following location http://c-nergy.be/blog/?p=11336
    Can you give it a try and see if this fix your issue ?

    If you browse through the blog, you will see that there are some additional posts about xrdp and Ubuntu 17.10 (such as http://c-nergy.be/blog/?p=11399 or like this one http://c-nergy.be/blog/?p=11430 or even like this other one http://c-nergy.be/blog/?p=11480). Please have a look through these posts and give it a try

    Hope this help
    Till next time
    See ya

  5. Just been trying to get this to work on a virtual ubuntu 16.04. had your green screen problem after finally using the install-xrdp-1-9 script. Tried the instruction above to install sudo apt-get install xserver-xorg-core , and that finally killed the virtual machine. Total waste of time thanks!!

  6. @Gav,
    We are sorry that this post didn’t help you..and you have given up in trying to install xrdp on your system.
    On the other hand, we noticed that you do not even provide logs of your setup that would have helped us investigating the issue.
    Have you also checked the post (http://c-nergy.be/blog/?p=11043) which provide also some information that can help you passing the green login screen
    Have you tried to use the latest version of the script for ubuntu 16.04.3 (which is install-xrdp-1.9.1.sh) ?

    Till next time
    See ya

Leave a Reply