Remote Desktop from Windows to UbuntuMate: XRDP error "Could not acquire name on session bus"

I have installed UbuntuMate Jammy Jellyfish 22.04.3 LTS (64-bit) and have updated the distribution with the usual commands "sudo apt update ; sudo apt -y upgrade" on a Raspberry Pi 3 Model B device.

I have installed XRDP as outlined with the "Remote Desktop from Windows 10 to Ubuntu MATE" using the command "sudo apt install xrdp" and it starts up fine as outlined with the output of the "systemctl status xrdp xrdp-sesman" commands:

● xrdp.service - xrdp daemon
     Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-10-27 21:24:30 BST; 3min 11s ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
    Process: 747 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
    Process: 757 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 762 (xrdp)
      Tasks: 1 (limit: 676)
     Memory: 452.0K
        CPU: 108ms
     CGroup: /system.slice/xrdp.service
             └─762 /usr/sbin/xrdp

Oct 27 21:24:29 raspberrypi systemd[1]: Starting xrdp daemon...
Oct 27 21:24:29 raspberrypi xrdp[757]: [INFO ] address [0.0.0.0] port [3389] mode 1
Oct 27 21:24:29 raspberrypi xrdp[757]: [INFO ] listening to port 3389 on 0.0.0.0
Oct 27 21:24:29 raspberrypi xrdp[757]: [INFO ] xrdp_listen_pp done
Oct 27 21:24:29 raspberrypi systemd[1]: xrdp.service: Can not open PID file /run/xrdp/xrdp.pid (yet?) after start: Operation not permitted
Oct 27 21:24:30 raspberrypi systemd[1]: Started xrdp daemon.
Oct 27 21:24:31 raspberrypi xrdp[762]: [INFO ] starting xrdp with pid 762
Oct 27 21:24:31 raspberrypi xrdp[762]: [INFO ] address [0.0.0.0] port [3389] mode 1
Oct 27 21:24:31 raspberrypi xrdp[762]: [INFO ] listening to port 3389 on 0.0.0.0
Oct 27 21:24:31 raspberrypi xrdp[762]: [INFO ] xrdp_listen_pp done

● xrdp-sesman.service - xrdp session manager
     Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-10-27 21:24:29 BST; 3min 12s ago
       Docs: man:xrdp-sesman(8)
             man:sesman.ini(5)
    Process: 732 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 745 (xrdp-sesman)
      Tasks: 1 (limit: 676)
     Memory: 456.0K
        CPU: 43ms
     CGroup: /system.slice/xrdp-sesman.service
             └─745 /usr/sbin/xrdp-sesman

Oct 27 21:24:28 raspberrypi systemd[1]: Starting xrdp session manager...
Oct 27 21:24:29 raspberrypi xrdp-sesman[745]: [INFO ] starting xrdp-sesman with pid 745
Oct 27 21:24:29 raspberrypi systemd[1]: Started xrdp session manager.

Though, when launching a remote desktop connection with the "mstsc" command under Windows 10 (and specifying the same user name and password when logging when the device is hooked up on the monitor), I am getting an error message "Could not acquire name on session bus" as depicted with the following screen capture:

Capture

After having closed the "mstsc" client, and querying again the status of the XRDP service, firing the commands "systemctl status xrdp xrdp-sesman" on the shell prompt, I am getting the following output containing error messages:

● xrdp.service - xrdp daemon
     Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-10-27 21:24:30 BST; 36min ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
    Process: 747 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
    Process: 757 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 762 (xrdp)
      Tasks: 1 (limit: 676)
     Memory: 2.2M
        CPU: 612ms
     CGroup: /system.slice/xrdp.service
             └─762 /usr/sbin/xrdp

Oct 27 21:28:15 raspberrypi xrdp[4259]: [INFO ] started connecting
Oct 27 21:28:15 raspberrypi xrdp[4259]: [INFO ] lib_mod_connect: connecting via UNIX socket
Oct 27 21:28:18 raspberrypi xrdp[4259]: [INFO ] lib_mod_log_peer: xrdp_pid=4259 connected to X11rdp_pid=4262 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.16>
Oct 27 21:28:18 raspberrypi xrdp[4259]: [INFO ] connected ok
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] xrdp_process_data_in: xrdp_process_loop failed
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Oct 27 22:00:41 raspberrypi xrdp[4259]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed

● xrdp-sesman.service - xrdp session manager
     Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-10-27 21:24:29 BST; 36min ago
       Docs: man:xrdp-sesman(8)
             man:sesman.ini(5)
    Process: 732 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 745 (xrdp-sesman)
      Tasks: 1 (limit: 676)
     Memory: 1.3M
        CPU: 414ms
     CGroup: /system.slice/xrdp-sesman.service
             └─745 /usr/sbin/xrdp-sesman

Oct 27 21:28:15 raspberrypi xrdp-sesman[745]: [INFO ] ++ created session (access granted): username pi, ip ::ffff:192.168.0.21:51585 - socket: 12
Oct 27 21:28:15 raspberrypi xrdp-sesman[745]: [INFO ] starting Xorg session...
Oct 27 21:28:15 raspberrypi xrdp-sesman[745]: [INFO ] Starting session: session_pid 4260, display :10.0, width 1600, height 900, bpp 24, client ip ::ffff:192.168.0.>
Oct 27 21:28:15 raspberrypi xrdp-sesman[4260]: [INFO ] [session start] (display 10): calling auth_start_session from pid 4260

I am trying to figure out on the origin of the problem and how this can be resolved. Any potential pointers from your learning?

2 Likes

check this page ... Getting Started With XRDP On Raspberry Pi (Remote access) – RaspberryTips

3 Likes

Hi, carriba.

This often happens if you are logged in on the physical console using the same user account locally that you are trying to connect with remotely. Either logout from the physical console or use a different user account remotely.

HTH,

Tony.

2 Likes