As a continuation of https://discourse.lubuntu.me/t/lubuntu-20-10-xrdp-working-but-not-the-right-session I would like to add a solution, because the user “wxl” was unhelpful in that topic, it angered me enough to register and post a working solution, because as far as I can tell, noone on the Internet solved this issue.
The tail end of the /etc/xrd/startwm.sh file should look like this (comment out the two lines):
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
env DESKTOP_SESSION=“Lubuntu” XDG_CONFIG_DIRS="/etc/xdg/xdg-Lubuntu:/etc/xdg:/etc:/usr/share" XDG_DATA_DIRS="/usr/share/Lubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop" LXQT_DEFAULT_OPENBOX_CONFIG="/etc/xdg/xdg-Lubuntu/openbox/lxqt-rc.xml" /usr/bin/startlxqt
The reason for this is because Lubuntu Developers have hacked around issues with xdg/sddm/xorg:
I haven’t tried this with Lubuntu 20.10, but it’s easy to check values of aforementioned variables and adjust them accordingly in the startwm.sh script.