neutrinolabs / xrdp

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

unable to get xrdp to connect #2739

Closed Wittytut closed 1 year ago

Wittytut commented 1 year ago

xrdp version

0.9.17

Detailed xrdp version, build options

xrdp 0.9.17
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 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=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-asBei3/xrdp-0.9.17=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security
      LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations
      PKG_CONFIG_PATH=/build/xrdp-asBei3/xrdp-0.9.17/pkgconfig

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Operating system & version

Ubuntu 22.04

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

Xorg

What desktop environment do you use?

Xfce

Environment xrdp running on

Headless ubuntu server

What's your client?

Microsoft RDP

Area(s) with issue?

Session manager (sesman), Other

Steps to reproduce

I am trying to get xrdp running on my ubuntu server. it was headless. I installed xcfe. I tried several fixes listed below to fix this issue. The problem seems to change a bit each time I apply a fix from the links below. Currently when I run: sudo systemctl status xrdp I get this:

[20230623-19:16:25] [INFO ] sesman connect ok
[20230623-19:16:25] [INFO ] sending login info to session manager, please wait...
[20230623-19:16:25] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20230623-19:16:25] [INFO ] login successful for display 10
[20230623-19:16:25] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20230623-19:16:25] [INFO ] started connecting
[20230623-19:16:25] [INFO ] lib_mod_connect: connecting via UNIX socket
[20230623-19:19:55] [INFO ] connection problem, giving up
[20230623-19:19:55] [INFO ] some problem

This is when i try to log in through rdp on a windows machine I'm still very new to github, please let me know if I have done something wrong. If anything else is needed I will gladly produce the information. Thank you

✔️ Expected Behavior

connect to desktop and display

❌ Actual Behavior

does not load desktop. displays : connection problem, giving up some problem after a few seconds of trying to connect

Anything else?

I've tried these fixes: https://github.com/neutrinolabs/xrdp/issues/1412#issuecomment-1109632257 https://github.com/neutrinolabs/xrdp/issues/1412#issuecomment-1361732474 https://github.com/neutrinolabs/xrdp/issues/1412#issuecomment-1546161762 https://github.com/neutrinolabs/xrdp/issues/1412#issuecomment-730311330

     Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-06-23 16:38:56 UTC; 3h 7min ago
       Docs: man:xrdp-sesman(8)
             man:sesman.ini(5)
    Process: 2714405 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 2714410 (xrdp-sesman)
      Tasks: 1 (limit: 154251)
     Memory: 1.5M
        CPU: 43ms
     CGroup: /system.slice/xrdp-sesman.service
             └─2714410 /usr/sbin/xrdp-sesman

Jun 23 16:39:28 servertut xrdp-sesman[2714410]: [INFO ] ++ terminated session:  username usr, display :10.0, session_pid 2715007, ip ::ffff:192.168.1.160:46684 - socket: 12
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [INFO ] Socket 8: AF_INET6 connection received from ::1 port 56848
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [INFO ] ++ created session (access granted): username usr, ip ::ffff:192.168.1.160:47433 - socket: 12
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [INFO ] starting Xorg session...
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [INFO ] Starting session: session_pid 2887319, display :10.0, width 1920, height 1080, bpp 24, client ip ::ffff:192.168.1.160:47433 - socket: 12, user name usr
Jun 23 19:16:25 servertut xrdp-sesman[2887319]: [INFO ] [session start] (display 10): calling auth_start_session from pid 2887319
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [ERROR] sesman_data_in: scp_process_msg failed
Jun 23 19:16:25 servertut xrdp-sesman[2887319]: pam_unix(xrdp-sesman:session): session opened for user usr(uid=1000) by (uid=0)
Jun 23 19:16:25 servertut xrdp-sesman[2714410]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
Jun 23 19:16:35 servertut xrdp-sesman[2714410]: [INFO ] ++ terminated session:  username usr, display :10.0, session_pid 2887319, ip ::ffff:192.168.1.160:47433 - socket: 12
matt335672 commented 1 year ago

@Wittytut - you haven't described what your issue is. What exactly is happening on your machine?

Can you fill in "Expected behaviour" and "Actual behaviour" above?

Thanks.

Wittytut commented 1 year ago

@matt335672 updated. :)

matt335672 commented 1 year ago

Thanks.

There are a few possibilities here. Let's start with the basics

  1. When you say "headless Ubuntu server", are you sure you aren't logged on to the machine console as the same user? This doesn't work on systemd-based systems. See this FAQ
  2. How did you install XFCE?
  3. What does the command update-alternatives --display x-session-manager tell you?
  4. Have you added anything to ~/.xsession or ~/.Xsession?
jp803333 commented 1 year ago

@matt335672 Hi I am facing this similar issue while connecting to ubuntu 22 on azure from mac through microsoft remote desktop.

I do have XFCE4 installed

$ update-alternatives --display x-session-manager
x-session-manager - auto mode
  link best version is /usr/bin/startxfce4
  link currently points to /usr/bin/startxfce4
  link x-session-manager is /usr/bin/x-session-manager
  slave x-session-manager.1.gz is /usr/share/man/man1/x-session-manager.1.gz
/usr/bin/startxfce4 - priority 50
  slave x-session-manager.1.gz: /usr/share/man/man1/startxfce4.1.gz
/usr/bin/xfce4-session - priority 40
  slave x-session-manager.1.gz: /usr/share/man/man1/xfce4-session.1.gz
$ cat .xsession 
xfce4-session
matt335672 commented 1 year ago

@jp803333 - this may not be quite the same thing. Can you raise a separate issue please?

jp803333 commented 1 year ago

Okay Creating one with the sesman logs

jp803333 commented 1 year ago

@matt335672 I have create the issue here.