69

I have just installed xrdp on my CentOs 7 following the steps in this article but could get as far as inputting my user name and password.

Here's a screenshot of the error that I get after trying to log in:

screenshot

The xrdp-sesman.log file says:

[20161107-20:51:39] [INFO ] listening to port 3350 on 127.0.0.1

[20161107-20:51:56] [INFO ] A connection received from: 127.0.0.1 port 41103

[20161107-20:51:57] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)

and nothing else. I have no idea how to debug this.

Could someone please point me in the right direction?

5
  • I'd like to create answer, but I don't have enought reputation to do so. For that reason I'll link it here: askubuntu.com/a/1219250/490564 Commented Mar 22, 2020 at 12:00
  • I'd like to create answer, but I don't have enought reputation too so here is what did the trick for me: basically what you have to do is : # create two groups using these commands : [sudo groupadd tsusers] [sudo groupadd tsadmins] # then add your user to tsusers group using this command : [sudo usermod -a -G tsusers YOUR_USER[ # restart your xrdp service using this command [sudo service xrdp restart[ then try to connect again . Also here is cool tutorial for setting up remote for few desktops : draculaservers.com/tutorials/install-xrdp-centos
    – Softmixt
    Commented Aug 26, 2020 at 17:15
  • I'm getting this same error
    – S To
    Commented Apr 23, 2021 at 19:42
  • I fixed it by running sudo apt-get install -y xfce4. it is not included by default on some distros Commented May 31, 2023 at 19:14
  • Disable Automatic Logon for your user in settings. You have to be logged of from the system in order to be able to successfully login to xrdp session
    – Serge V.
    Commented Aug 30, 2023 at 5:23

5 Answers 5

37

It is likely that you did not set the username/password correctly.

The session manager tries to use your username/password to unlock the screen. When the username/password are incorrect you get the login failed for display 0 message.

7
  • 2
    On.a related note, I've had Ubuntu VMs in Microsoft Azure that were getting this error and resetting the admin users password for the VM through the Azure Portal to what it was already supposed to be fixed the issue. There seems to be an issue that sometimes the password gets messed up somehow with Ubuntu?... Commented Feb 14, 2019 at 16:56
  • @ChrisPietschmann I had exactly the same problem today. Thanks for the idea to try via Azure Portal. For those who need more details, you can open the VM resource and click the Reset password link in the Support + troubleshooting section. Then, select 'Reset password' and give the username you're using and a new password. Commented Feb 16, 2019 at 12:36
  • great, explain how to do it rather than just saying
    – S To
    Commented Apr 23, 2021 at 19:43
  • 1
    I'm getting the same dialog but unable to login with a domain user which is working fine for SSH. Is there some special group required for xrdp?
    – Marc
    Commented Oct 19, 2021 at 14:58
  • Of note, this is case-sensitive. So if the OS install name was "Foo" and the username was "foo", you must use the second one. Commented Jan 12, 2023 at 19:01
10

I had a lot of trouble with the exact same problem desribed here. I started just installing the gnome-desktop and the xrdp packages.

I realized that I also needed to install a vnc server. I followed everything as described in the following article :

https://peteris.rocks/blog/remote-desktop-and-vnc-on-ubuntu-server/

I finally could connect to my Ubuntu 17.10 VM hosted on Azure from a Win7 desktop using RDP.

Hope that article helps you as it did for me.

2
  • I just tried this and it still works on Ubuntu 14.04. Something to keep in mind for anyone else who tries this: xrdp should not be used. It is a security vulnerability and has been replaced with the much better xserver-xorg-core. And gnome-session-fallback is not available anymore for Ubuntu >14.04 Commented Jan 16, 2021 at 19:51
  • @GabrielFair but gnome-session-flashback still alive
    – eri
    Commented Dec 19, 2021 at 13:24
3

I agree with @Lukas that it is likely that your username/password is not correct. In my case, my companies domain got added in front of the user account (domain\user), while the lab machine was configured to login as user without domain.

2
  • how did you remove domain? I seem to be unable to Commented Apr 2 at 11:51
  • Instead of selecting an account, click on "More choices" and "Use a different account". Then just type in your username without any domain.
    – F1iX
    Commented Apr 4 at 17:14
0

I had the same issue when accessing a virtual machine in Azure. After two days beating with my head against the screen, the following worked for me:

  • Change the password of the user, restart and try again.

Seems unlikely, but it did work for me.

0

Thanks to Lukas's answer pointed out the cause as incorrect password

In my case, I have to set a good password for sudo passwd $USER to get it working - I used short password, and cannot remmina desktop connect to it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .