AUR package that provides Enhanced Session Mode support for the Hyper-V virtual machine. Based on linux-vm-tools.
# install
yay -S hyperv-enhanced-session
# enable session
sudo systemctl enable --now hyperv-enhanced-session
# xrdp reads .xinitrc
echo "/usr/lib/plasma-dbus-run-session-if-needed startplasma-x11" > ~/.xinitrc
chmod +x ~/.xinitrc
# restart xrdp if service already started
sudo systemctl daemon-reload
sudo systemctl restart xrdp
Set-VMhost -EnableEnhancedSessionMode $True
Set-VM -VMName <NameVM> -EnhancedSessionTransportType HvSocket