I'm trying to connect to my Ubuntu machine from a Windows 10 machine. I'm new to Linux, but have been working at this for a few weeks now.

I have no idea what I need to get this to work. I have installed xrdp and gnome, and am able to remote into the Ubuntu machine. Unfortunately at the login prompt, when I enter the password that I use to connect to my Ubuntu machine, I am receiving a "login failed for display: 0" error. Additionally, how do I even set up a user account to login? Where/how do I set the password? I'm not sure what else I need to set this up.

Would anyone be able to point me in the right direction?

  • What desktop environment are you using? GNOME has known issues
    – unixandria
    Aug 9 '19 at 2:24
  • I had the same problem and I found out although I enter my username in PascalCase - real user was created in lowercase Jun 27 at 22:11

There is a known issue with Ubuntu 18.04.2 and 18.04.3 and xrdp package found in the repository. When you install xrdp from repository on Ubuntu 18.04.2 and later, the package needs xorg-xserver-core packages while these point releases have the xorg-xserver-core-hw* packages installed

Please note also that since Ubuntu 18.04, xRDP is working fine with the GNOME Desktop and you can perform an xRDP connection to the system.

To fix this issue, you can use one of the following options below

BEST OPTION - Install xorgxrdp-hwe-18.04 package

A new compatible xorgxrdp package has been made available for Ubuntu 18.04.2 and 18.04.3. Install it by issuing the following command

sudo apt-get install xorgxrdp-hwe-18.04

OPTION A - Downgrading packages xorg-xserver-core

We assume that you have already installed xRDP package and you want to fix it

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

More info on this blog post

OPTION B - Use compiled packages from Thiago

Note : To use this option, please remove the xrdp package you have installed

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

more info at this blog post

OPTION C - Use the installation scripts

Note : To use this option, please remove the xrdp package you have installed

You can automate the xrdp installation and have it working nicely with Ubuntu Default Desktop using one of the following scripts

  • To use Ubuntu repository packages, read instructions and download the script at this blog page
  • To compile from source (easy way), read instructions and download the script at this blog page
  • I am facing the same problem and neither the best option nor option A worked for me unfortunately. I'll look into option b and c later. I am on Ubuntu 18.04.3.
    – Neergaard
    Feb 3 '20 at 14:51

The issue in my case was that linux username was starting with number. It's possible to create such user without any error or warning (like useradd 1foo). But using this user for xrdp ends up with login failed for display: 0 error message.

Fix for me: username must not have number as first character (e.g. use x1foo or onefoo instead of 1foo).


Please use good enough username and password even simple password had no problem on console:

  1. User name cannot beginning with numbers and cap-letters;
  2. Passwords in high security form is a must, i.e. It should contain characters from at least 3 of the 4 primary categories, including: uppercase letters, lowercase letters, numbers, and characters.

This error occurs if you have not set different username and password than one you are using. Especially when you try to login after getting xrdp from gcloud/aws: Just create new user and password in console:

sudo adduser USERNAME

Set up new PASSWORD. Now you can login with this USERNAME and PASSWORD. Solved for me.


In my case it was the username causing the problem.

I had created a username like 'Myname' (note the CAPITAL first letter). FAILED

I tried to RDP using that username. Nothing I did would make it work. Then! (thanks to this forum) changed the capital letter to lower case.

RDP username that worked was 'myname' (note LOWER CASE first letter) WORKED


That has worked for me, it's incrementing the property "MaxSessions" in sesman.ini. If i'm not mistaken it is 50 by default. So, just increase it to 100 and so on every time it fails

in /etc/xrdp/sesman.ini:

;; X11DisplayOffset - x11 display number offset
; Type: integer
; Default: 10

;; MaxSessions - maximum number of connections to an xrdp server
; Type: integer
; Default: 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.