neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.75k stars 1.73k forks source link

Empty xrdp login window #1436

Closed benoit9126 closed 3 years ago

benoit9126 commented 5 years ago

I have an empty login window when I use xrdp to connect to my debian buster...

2019_11_05_XRDP_Login_Page

Then, nothing happens. I can not enter my password so I can not log in...

Here is the content of /var/log/xrdp.log

[20191105-17:39:46] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:127.0.0.1 port 46046
[20191105-17:39:46] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:127.0.0.1 port 3389)
[20191105-17:39:46] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20191105-17:39:46] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20191105-17:39:46] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20191105-17:39:46] [DEBUG] TLSv1.3 enabled
[20191105-17:39:46] [DEBUG] TLSv1.2 enabled
[20191105-17:39:46] [DEBUG] Security layer: requested 3, selected 1
[20191105-17:39:46] [INFO ] connected client computer name: mirabelle
[20191105-17:39:46] [INFO ] TLS connection established from ::ffff:127.0.0.1 port 46046: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20191105-17:39:46] [DEBUG] xrdp_0000310e_wm_login_mode_event_00000001
[20191105-17:39:46] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20191105-17:39:46] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20191105-17:39:46] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20191105-17:39:46] [WARN ] local keymap file for 0x00000000 found and doesn't match built in keymap, using local keymap file
[20191105-17:40:32] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:127.0.0.1 port 3389)
[20191105-17:40:32] [DEBUG] xrdp_mm_module_cleanup

Do you have any idea what is the cause of this bug?

metalefty commented 5 years ago

Why not reveal information about xrdp version and client?

benoit9126 commented 5 years ago

Sorry. I am using the version which is in the debian package repository.

$/usr/sbin/xrdp --version
The log reference is NULL - log not initialized properly
xrdp 0.9.9
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2018 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/var/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -fdebug-prefix-map=/build/xrdp-GQ2R2u/xrdp-0.9.9=. -fstack-protector-strong -Wformat -Werror=format-security
      LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
      PKG_CONFIG_PATH=/build/xrdp-GQ2R2u/xrdp-0.9.9/pkgconfig

  Compiled with OpenSSL 1.1.1d  10 Sep 2019

For the moment, I just wanted to try xrdp so I installed it on my computer

$ uname -a
Linux mirabelle 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

I created a new user and I try to connect from my computer (so to localhost) using vinagre (version of the official debian package repository). I got the result presented in my previous post. I try from an other linux computer using vinagre (debian buster, vinagre from official debian package repository) and I got the same result.

buhtz commented 3 years ago

Please try to open edit /etc/xrdp/startwm.sh.

Add the following lines before the last two lines.

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR

So att the end the file should look liket his

I do not know technical details about this solution. It is based on this blog entry and worked for me (in Debian 11 bullseye). https://serverspace.io/support/help/how-to-configure-xrdp-server-on-ubuntu-18-04/

Please report back if this works.

benoit9126 commented 3 years ago

@Codeberg-AsGithubAlternative-buhtz Thanks for the answer. I succeeded into connecting to my computer using Remmina instead of Vinagre (without adding the two lines you propose, it worked).

It worked when I was on Debian Buster. A few days ago, I updated my computer to Debian Bullseye. It still works with Remmina and I have another problem with Vinagre (the logging windows appears, but the connection fails).

In my opinion, this issue can be closed as the problem seems to be related to the connection software more than to XRDP itself.

matt335672 commented 3 years ago

@benoit9126 - could you post more info on your Bullseye Vinagre issue connection failure? It might clarify what's going on here.

benoit9126 commented 3 years ago

Sure. I have the correct login windows

2020_08_25_Vinagre_1

Then, after entering my password:

2021_08_25_Vinagre_2

In /var/log/xrdp-sesman.log

[20210825-14:58:57] [INFO ] A connection received from ::1 port 50070
[20210825-14:58:59] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)

in /var/log/xrdp.log:

[20210825-14:58:51] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:10.255.253.2 port 33108
[20210825-14:58:51] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.255.255.2 port 3389)
[20210825-14:58:51] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20210825-14:58:51] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20210825-14:58:51] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20210825-14:58:51] [DEBUG] TLSv1.3 enabled
[20210825-14:58:51] [DEBUG] TLSv1.2 enabled
[20210825-14:58:51] [DEBUG] Security layer: requested 3, selected 1
[20210825-14:58:51] [INFO ] connected client computer name: mirabelle
[20210825-14:58:51] [INFO ] TLS connection established from ::ffff:10.255.253.2 port 33108: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20210825-14:58:52] [DEBUG] xrdp_00003765_wm_login_mode_event_00000001
[20210825-14:58:52] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20210825-14:58:52] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20210825-14:58:52] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20210825-14:58:52] [WARN ] local keymap file for 0x00000000 found and doesn't match built in keymap, using local keymap file
[20210825-14:58:57] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20210825-14:58:57] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20210825-14:58:57] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20210825-14:58:57] [DEBUG] return value from xrdp_mm_connect 0
[20210825-14:58:59] [INFO ] xrdp_wm_log_msg: login failed for display 0
[20210825-14:58:59] [DEBUG] xrdp_mm_module_cleanup
[20210825-14:58:59] [DEBUG] Closed socket 18 (AF_INET6 ::1 port 50070)
[20210825-14:59:03] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.255.255.2 port 3389)
[20210825-14:59:03] [DEBUG] xrdp_mm_module_cleanup

Here, I try to connect to a computer under Ubuntu 20.04 LTS:

$ uname -a
Linux madeleine 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

with xrdp 0.9.12

from my Debian Bullseye

$ uname -a
Linux mirabelle 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

using Vinagre 3.22.0

@matt335672 If you need something else, do not hesitate.

matt335672 commented 3 years ago

Hmmm. I expected more in the sesman log, but maybe that's just me.

The error log in xrdp.log is showing a username/password error. It's possible the keyboard mapping is working differently between the two clients, and the password you're typing in isn't coming out as you expect.

The xrdp log is showing that the client is asking for the default keyboard map, and is loading keymap 0409 which is US English (see this page for a list of Microsoft Locale codes).

When you get the first login window, put your cursor in the username field and type your password characters in. You won't be able to log in like that, but you'll be able to see what the keyboard is doing.

benoit9126 commented 3 years ago

@matt335672 Right. I have a AZERTY (French) keyboard, while the login page consider that my keyboard is a QWERTY... With Remmina, I store the password in the configuration of the connection and I don't even see the login page of XRDP. Thanks a lot for the help.

matt335672 commented 3 years ago

Mystery solved then.

I've had a look at the sources for v0.9.12, and there's no official way to override the default keymap on the xrdp side. I can offer you two possibilities:-

It might work for your case. I can't say for sure if any other side-effects will result, but by all means try it and see what happens.

Let us know what happens.

benoit9126 commented 3 years ago

Last question: I suppose this symlink will force a French keyboard, no matter what is the keyboard of the person who tries to connect?

matt335672 commented 3 years ago

You suppose correctly!

Ideally the client will communicate its layout to the server. What we've done here is simply change the catch-all default.

You could try configuring your keyboard layout explicitly in GNOME (assuming you're using GNOME). vinagre might pick that up, but it's a bit of a long shot.

benoit9126 commented 3 years ago

No need to look further. You can consider this issue as closed. Vinagre does not seem to be as complete as Remmina. I will continue using the latest. People working with me and using Windows already use the Microsoft software "Remote Desktop" which also stores their password, so they don't even see the login page of XRDP.

@matt335672 Thanks again for your help!

kenanrustemlee commented 2 years ago

hello, I have the similar issue to this one. If I provide you with logs xrdp-sesman.log and xrdp.log could you please have a look?

kenanrustemlee commented 2 years ago

@matt335672

matt335672 commented 2 years ago

@kenanrustemlee - this is a closed issue. Feel free to open a new one with details of your platform and the client you're using.

kenanrustemlee commented 2 years ago

I opened new one @matt335672 https://github.com/neutrinolabs/xrdp/issues/2154#issue-1147920783 Thanks a lot :)