xRDP – xRDP shows only black screen after authentication windows – HowTo Fix !

Hello World, 

We have noticed that a lot of people hit the same issue over and over again.  When trying to connect via remote desktop protocol (rdp) to the Ubuntu machine, and after providing the credentials in the xRDP Login page,  the user will only see a black screen displayed and the desktop interface is never loaded and displayed.   This post will basically explain why this happens and how to reproduce the issue.  

The “problem” is actually well known and there is really an simple and easy fix for that.  So, let’s explain the situation….. 

Overview

Reproducing the “Black Screen” Situation

Let’s assume that you have performed a successful xRDP installation (manually or using our famous xrdp-installer-xx.sh script) and you are ready to test your rdp connection to your Ubuntu machine.   Let’s also assume that you are still logged on into your Ubuntu machine system locally with your user account (which could be called User1).  So, you move to your Windows machine (or Linux machine), fire up your favorite remote desktop client and provide the ip address or the hostname  

manualxrdp_5

Click on picture for better Resolution

Since xRDP installation has been successful, you will be presented with the xRDP Login page where you will need to provide the user credentials on the Ubuntu machine.  In our example, User1 (yes the one currently logged on locally on the ubuntu machine) account will be used 

u18.04.3_F4

Click on picture for better resolution 

If the credentials are correct, you will see your remote desktop session showing a black screen and that’s it !!!!!  The desktop interface will never load within your remote session 

u18.04.3_F11

Click on picture for better resolution 

Black Screen situation Explained

As mentioned and explained multiple times,  this situation will happen (or can happen) when the same user account is used concurrently locally and remotely.  In other words,  the problem is related to the fact that the same user account is already logged in locally and a remote connection is attempted at the same time.  With xRDP software solution, a specific user account can be logged on either locally or remotely but not both…. 

The (Standard) Solution 

To solve this issue, there is a simple fix.  You need to ensure the account you are using to login via the remote desktop client is not currently logged on locally on the Ubuntu target machine. If this is the case, perform a logout operation as shown in the screenshot below….

xrdp_logout

Click on Picture for better Resolution

Try again the remote desktop session and you will see that magically, you will be able to perform your remote desktop connection and that your desktop interface will be loaded and made available for you 

xrdp_ldap_06

Click on Picture for better Resolution

As mentioned in the title, this is the most command and most standard approach to fix this issue.  This is basically the recommended approach to be used.  

However, there are other techniques (easier to implement that can be used) and we will share them with you soon…. In the next post, we will show you how to implement these techniques

Final Notes 

Voilà ! This is it for today ! 

We hope that this post will be useful to all these people that have encountered the xRDP black screen situation.  We have quickly and simply demonstrated how to overcome this minor but annoying xRDP “issue”.  It’s important to understand how xRDP works and how sessions are created with the software.  When using xRDP software, it will always create a new session for the logged on user.  There is no way (as far as we know) to connect to the console session and start your session where you left it !   

In a coming post, we will show you some tips and tricks that can be used to allow simultaneously local connections and remote connections… 

Till next time 

See ya

 

 

 

17 thoughts on “xRDP – xRDP shows only black screen after authentication windows – HowTo Fix !

  1. @Michael,

    Thank you for your feedback and for visiting our blog. We are always happy when we can help in solving some issues with our modest blog 🙂
    Till next time
    See ya

  2. I wouldn’t even consider myself a novice, but after I removed the group render from my pi user, xRDP would let me remote into my RPi via Windows Remote Desktop.

    Larry

  3. @Larry,

    Thank you for the feedback and for visiting our blog. Since we are not working much with raspberry we cannot provide feedback here. Thank you for sharing the info; this might be valuable to others
    Till next time
    See ya

  4. @John,

    Thank you for visiting our blog and providing positive feedback. Happy to see that the information can be useful and can help people out there 🙂
    Till next time
    See ya

  5. @Sebastian,

    Thank you for the feedback and for visiting our blog. Always nice to see that the info is helpful and nice to see that people confirm that the trick is working 🙂
    Till next time
    See ya

  6. @Betabbs,

    Thank you for visiting our blog and providing feedback.. happy to see that you have been able to solve your issues 🙂
    till next time
    See ya

  7. Thanks for the tips! I thought to try it other way around.
    Perhaps I am wrong somewhere. Here is a list of stuffs I tried out.

    -> launched an ubuntu instance in AWS
    -> logging in to “user1” using CLI (success)
    -> created a “user2” standard account using CLI
    -> logging in over RDP using “user2” (success)

    The RDP session gets launched with a CLI window opened.
    however, the dreaded black screen sustains in background.

  8. @Tapo,
    Thank you for visiting our blog and sharing your experience. This is a known issue with xRDP… a single connection per user… You would have the same behavior if you login locally and quickly login through remote desktop. One session will get the full desktop the other will simply have a command line open and the black screen in background… There are some workarounds that you can use (see https://c-nergy.be/blog/?p=17371 and https://c-nergy.be/blog/?p=16698) but we do not recommend this because this workarounds can lead to other issues….

    Hope this help
    Till next time
    See ya

  9. This is great, oddly enough I AM able to simultaneously have an RDP session from my Windows and run an SSH session from my Windows Linux system at the same time as the same user and have both sessions open and active.

    My colleague on the other hand from her MacBook is getting the Black Screen of Death….

  10. @Anthony,

    Thanks for sharing your findings and visiting our Blog… As explained in this post, black screen is usually due to the fact that the same user account is logged into the system (i.e. locally and remotely). We never tried ssh and at the same time DE for the same user but we think that should prevent user to login…(we will need to test)..;

    We are really usin Macos systems so cannot tell if this is a problem or bug or even if it can be fixed… I would say restart everything and try again.;;first, connect using xrdp and then with ssh

    hope this help
    till next time
    see ya

  11. @Jonathan Baxter,

    Thank you for visiting our blog and providing some feedback. Usually, Black screen have 2 main reasons…
    either same user is logged on locally or remotely
    or the ~/.xsessionrc file is not populated correctly

    Since you are not providing any details about how you have performed your xrdp installation, we cannot really help you here. How did you perform the install ? have you checked the logs, do you have an .xsession or .xsessionrc file created, which Desktop interface are you using (we are assuming Gnome but might be different)

    Till next time
    See ya

Leave a Reply