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 

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 

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

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

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.

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

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

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

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

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

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

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

 

 

33 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!

  10. Unfortunately the “update xrdp” version of this fix didn’t work for me, and the error messages were different with an error at the last install piece. Thanks for all the work in explaining everything so clearly!

  11. @Dana;

    thanks for providing feedback on this specific topic. Again, we are aware that xrdp and nvidia configuration is not taken into account with the script (so far). As we do not use nvidia hardware; it will be difficult for us to test and try to provide a possible solution/workaround

    till next time
    See ya

  12. Thanks Griffon,

    lucky me I found your blog after just 1.5 hrs to get my xRDP problem solved.
    Working with Ubuntu 18.04.3 on a HPE Proliant MicroServer v.10

  13. Hi Griffon,

    Do you know if xRDP works with Linux Mint 19.3 Cinnamon? I have been unable to connect remotely from a Windows PC using xRDP, I keep getting a “login failed for display 0.”

    Most of the suggestions I found online to try to fix it appear to be for just Ubuntu and they haven’t solved my problem, so I’m wondering if there may be an issue specifically with Mint 19.3 or more specifically the Cinnamon desktop environment?

  14. @Nabil,

    xRDP should be working with Linux Mint as well… In the past, we have write a post about how to perform this operation. The post is probably outdated because it was relying on using vnc server….(actually, this might still work…)

    Can you check or confirm that you have xorgxrdp package installed on the machine
    you might have to create a ./xsession that would be used to load your desktop environment..

    We are currently really busy and we usually not focusing on distribution other than Ubuntu. if you are a little bit patient, we could give it a try and see if this working.. If this is the case, we could publish some guidance

    Hope this help

    Till next time
    See ya

  15. Hi Griffon,
    I’m using 18.04.02, but still can not work by following your instruction.
    My error are below:
    /var/log/xrdp.log
    0200316-14:28:00] [INFO ] Cannot find keymap file /etc/xrdp/km-00000404.ini
    [20200316-14:28:00] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
    [20200316-14:28:00] [WARN ] local keymap file for 0x00000404 found and doesn’t match built in keymap, using local keymap file
    [20200316-14:28:00] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    [20200316-14:28:01] [INFO ] xrdp_wm_log_msg: sesman connect ok
    [20200316-14:28:01] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
    [20200316-14:28:01] [DEBUG] return value from xrdp_mm_connect 0
    [20200316-14:28:03] [INFO ] xrdp_wm_log_msg: login failed for display 0
    [20200316-14:28:03] [DEBUG] xrdp_mm_module_cleanup
    [20200316-14:28:03] [DEBUG] Closed socket 20 (AF_INET6 ::1 port 40076)
    [20200316-14:28:09] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    [20200316-14:28:10] [INFO ] xrdp_wm_log_msg: sesman connect ok
    [20200316-14:28:10] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
    [20200316-14:28:10] [DEBUG] return value from xrdp_mm_connect 0
    [20200316-14:28:12] [INFO ] xrdp_wm_log_msg: login failed for display 0
    [20200316-14:28:12] [DEBUG] xrdp_mm_module_cleanup
    [20200316-14:28:12] [DEBUG] Closed socket 20 (AF_INET6 ::1 port 40090)
    [20200316-14:28:20] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.35.234.95 port 3389)
    [20200316-14:28:20] [DEBUG] xrdp_mm_module_cleanup
    [20200316-14:28:44] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:10.35.232.50 port 56294
    [20200316-14:28:44] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.35.234.95 port 3389)
    [20200316-14:28:44] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
    [20200316-14:28:44] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
    [20200316-14:28:44] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
    [20200316-14:28:44] [DEBUG] TLSv1.2 enabled
    [20200316-14:28:44] [DEBUG] TLSv1.1 enabled
    [20200316-14:28:44] [DEBUG] TLSv1 enabled
    [20200316-14:28:44] [DEBUG] Security layer: requested 11, selected 1
    [20200316-14:28:44] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.35.234.95 port 3389)
    [20200316-14:29:32] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:10.35.232.50 port 56398
    [20200316-14:29:32] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.35.234.95 port 3389)
    [20200316-14:29:32] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
    [20200316-14:29:32] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
    [20200316-14:29:32] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem

    And it shows login failed for display 0 in mstsc Win10.
    ===
    By the way I got certification error when I connect Ubuntu IP from Win10.
    It says certification server name is incorrect, not coming from trusted certification.

  16. @Vick,

    It’s normal that you get a RDP certificate prompt when connecting to Ubuntu..This simply means that the certificate used during the remote session is not trusted by your system..Simply, tick the checkbox “Do not ask me again…” and the popup will appear anymore…

    Can you check that you have the xorgxrdp package installed on your system (using dpkg -l | grep xorgxrdp). If nothing is return, you are basically missing this package…
    Finally, please note that there is a new version of the script that can perform the installation for you (Have a look at http://c-nergy.be/blog/?p=14093 and maybe give it a try)

    P.S. you should upgrade to 18.04.4…..:-)

    Hope this help
    Till next time
    see ya

  17. @Abdulhadi,
    Thanks for visiting our blog and providing feedback. Linux might bring some challenges but usually there is always a workaround that can be implemented

    Linux is maturing every day more and more….

    Till next time
    See ya

  18. I had the problem same as described in your problem part. I followed your instruction to fix the problem. a new problem cam up: the RDP interface disappears. The remote desktop didn’t show up. I guess the remote desktop wasn’t loaded properly. Any idea about the new problem? Is it Windows10’s RDP client issue?
    Many Thanks.

  19. @hx,

    We do not have enough information about your problem. When you say the rdp interface disappear…what do you mean ? Do you see the xRDP login screen ? can you enter your credentials, when credentials are ok, are you almost immediately disconnected ? If this is the case, it means that the user account you are using to perform the remote desktop connection is already logged on locally on your ubuntu machine…. The simplest and recommended way to fix this issue, you have to logout from the local machine and try to login again from the RDP… This should fix your issue…
    More info that might be useful to you http://c-nergy.be/blog/?p=16682 and http://c-nergy.be/blog/?p=16698

    Hope this help
    Till next time
    See ya

  20. Thanks for the article. I have the problem described at the beginning i.e. up on logging in with Remote Desktop Connection from Win7 I get the empty blue desktop which eventually times out with the ‘problem with connection’ message. I’m on Ubuntu 18.04.3. I have installed xfce as suggested in another article but this did not fix the problem. I followed your instructions here for both fixing xdrp and for fresh install and neither worked. Still the same blank blue desktop eventually followed with connection problem message. Will be grateful for any useful suggestions.
    TIA

  21. xrdp status log:

    Jul 06 20:03:19 red systemd[1]: Starting xrdp daemon…
    Jul 06 20:03:19 red xrdp[18475]: (18475)(140632132896576)[DEBUG] Testing if xrdp
    Jul 06 20:03:19 red xrdp[18475]: (18475)(140632132896576)[DEBUG] Closed socket 7
    Jul 06 20:03:19 red systemd[1]: xrdp.service: Can’t open PID file /var/run/xrdp/
    Jul 06 20:03:20 red systemd[1]: Started xrdp daemon.
    Jul 06 20:03:21 red xrdp[18476]: (18476)(140632132896576)[INFO ] starting xrdp w
    Jul 06 20:03:21 red xrdp[18476]: (18476)(140632132896576)[INFO ] listening to po

  22. @Ian,

    sorry for the delay in answering your questions but we are again overloaded with work….
    First, we are noticing that you are referring to an outdated post…. Please always use the latest version of the script which is currently version 1.2.3 and can be found here http://c-nergy.be/blog/?p=16817 including how to use it

    The blue screen can be due to the fact that the xorgxrdp package is not installed on your system…. To try to fix this, I would suggest you to run the latest version of the script and see if this would fix your issue

    Hope this help
    Till next time
    See ya

  23. @Griffon,

    Thanks for the reply, especially given your workload. Much appreciated.

    It’s probably a green screen (I’m a little colour blindish) and looks just like the images you include in the article, but I definitely installed xorgxrdp and even tried the martinx version.
    I manually installed previously, I will now try the script you link to.

    Cheers
    Ian

  24. @Ian,
    Sorry for the late reaction….but here we are… any feedback about your issue… is the latest version of the script fixed you issues ?
    Waiting for your feedback

    Till next time
    See ya

  25. @Victor;

    Thank you for your visit and your positive feedback. Please note that this post is a little bit out dated (but still working) and you might want to check our free xrdp-installer script that can help you setting up easily your xRDP server (see http://www.c-nergy.be/products.html)

    Till next time
    See ya

  26. Hi, I’ve tried this solution and also the newest version(1.4.2). But still, I can’t solve the problem –“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 “.
    Sarah

Leave a Reply