Warning! Only works with Hyper-V host newer than 1803. Make sure you have “Enhanced Session Mode Policy” enabled on your host.
Download and install Hyper-V tools to enable Enhanced session on Linux VM – support for clipboard, custom resolution and spanning across multiple screens.
Tip: If you use remote manager to access Hyper-V console (nested windows) you may not be able to use some of the special shortcuts on Manjaro with i3 window manager. For example, I am using mRemoteNG with RDP connection to my Hyper-V host and I wasn’t able to use “Windows+Enter” to open terminal within the VM. “Windows” key is special “Mod” key that allows interaction with i3 WM.
Two ways to resolve this: use full screen on RDP session to your host or run Hyper-V Manager locally to connect to your host.
On the VM, open Terminal (Windows key + Enter on i3 WM) and download and install VM tools using following commands:
sudo pacman -Sy sudo pacman -S git cd ~/Downloads git clone https://github.com/Microsoft/linux-vm-tools cd linux-vm-tools/arch ./makepkg.sh ./install-config.sh
Edit .xinitrc file and remove following line “–exit-with-session”
sudo vim ~/.xinitrc
Save the file and shut down VM. Using PowerShell modify Enhanced Session Transport Type on the VM to HvSocket (only available from Windows 1803):
Set-VM -VMName __Your_Arch_Machine__ -EnhancedSessionTransportType HvSocket
After you start your VM, you should see a prompt for Enhanced Session:
UPDATE: There is an issue with recent XRDP version (https://github.com/neutrinolabs/xrdp/issues/1403). To fix it, I rolled back XRDP to version 0.9.10 as per GitHub thread, which resolved this problem for the time being.
Some steps and details below.
Check version of xrdp on your VM with pacman:
pacman -Q xrdp
If it’s XRDP 0.9.11-1, enhanced session won’t work properly.
Using wget to download the archive of XRDP 0.9.10:
Extract the archive and build package:
tar -xzvf aur-e228e40ada0b171edf887ff7c1b42aa873674717.tar.gz cd aur-e228e40ada0b171edf887ff7c1b42aa873674717 makepkg -scri
There will be a lot of commands scrolling through the screen while package is being build. Just confirm your choice when you are asked with “Y”.
Once XRDP 0.9.10 is installed, you can restart your VM and close Hyper-V console window. Then start your VM again and re-open the console window and you should see XRDP session manager asking you for credentials: