xRDP Black Screen Issue

Lately I've been doing a lot of work over RDP, even when connecting to Linux machines. In some cases though, I've been met with a black screen instead of the expected desktop environment, particularly when running Kali Linux as a virtual machine on Proxmox. I'm not quite sure why, but I was able to solve the problem by installing a couple of additional packages, on top of xrdp and xrdp-sesman:

sudo apt install xorgxrdp xserver-xorg-core xserver-xorg-input-all

I got the idea to install these packages from this article.