I installed xrdp on two Raspberry Pi 4 with 4 GB memory. The first one had a fresh installation of Raspberry Pi OS 11 with the full desktop environment, here everything works.
The second one had the normal desktop instead of the full one. On the second Pi with the normal desktop image, connecting to the RDP session doesn't work. After some time, XRDP shows the following error:
In the log file /var/log/xrdp.log I found permission errors:
[ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
The file is owned by user & group root
lrwxrwxrwx 1 root root 36 Nov 22 21:57 cert.pem -> /etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx 1 root root 38 Nov 22 21:57 key.pem -> /etc/ssl/private/ssl-cert-snakeoil.key
so I changed it to the pi user
sudo chown pi:pi /etc/xrdp/{key.pem,cert.pem}
The permission error in the logs is away now, but it doesn't seem to help. It shows the background color without anything on it and the logs shows
[20211122-22:50:39] [INFO ] connecting to sesman ip 127.0.0.1 port 3350
[20211122-22:50:39] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20211122-22:50:39] [INFO ] sesman connect ok
[20211122-22:50:39] [INFO ] sending login info to session manager, please wait...
[20211122-22:50:39] [INFO ] xrdp_wm_log_msg: login successful for display 12
[20211122-22:50:39] [INFO ] login successful for display 12
[20211122-22:50:39] [INFO ] loaded module 'libxup.so' ok, interface size 9456, version 4
[20211122-22:50:39] [INFO ] started connecting
[20211122-22:50:39] [INFO ] lib_mod_connect: connecting via UNIX socket
[20211122-22:54:09] [INFO ] connection problem, giving up
[20211122-22:54:09] [INFO ] some problem
Is this somehow related to the window manager changes in RPI OS 11? The changelogs says that
mutter window manager used instead of openbox on devices with 2GB or more of RAM
I also tried this idea by creating a ~/.xsession file to start mutter without success:
#!/bin/bash
exec /usr/bin/mutter
