@@ -58,63 +58,65 @@ Or to be more precise, xrdp acts as a frontend and Xorg will act as the backend.
5858
59591 . The first thing to do after the first boot is to install the following packages:
6060
61- ``` bash
62- sudo dnf install xrdp xrdp-selinux xorgxrdp hyperv-daemons
63- ```
61+ ``` bash
62+ sudo dnf install xrdp xrdp-selinux xorgxrdp hyperv-daemons
63+ ```
6464
65- This will install the required services needed to run a RDP server with Xorg as the backend.
66- The ` hyperv-daemons ` package is something very essential here. It installs a couple
67- of daemons that enable clipboard integration and other important features.
65+ This will install the required services needed to run a RDP server with Xorg as the backend.
66+ The ` hyperv-daemons` package is something very essential here. It installs a couple
67+ of daemons that enable clipboard integration and other important features.
6868
69692. Before starting the xrdp server, you need to optimize some of its configuration.
70- The following ` sed ` commands will handle the optimizations for you:
7170
72- ``` bash
73- sudo sed -i_orig ' s/port=3389/port=vsock:\/\/-1:3389/g' /etc/xrdp/xrdp.ini
74- sudo sed -i_orig ' s/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
75- sudo sed -i_orig ' s/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
76- sudo sed -i_orig ' s/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
77- ```
71+ The following ` sed` commands will handle the optimizations for you:
72+
73+ ` ` ` bash
74+ sudo sed -i_orig ' s/port=3389/port=vsock:\/\/-1:3389/g' /etc/xrdp/xrdp.ini
75+ sudo sed -i_orig ' s/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
76+ sudo sed -i_orig ' s/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
77+ sudo sed -i_orig ' s/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
78+ ` ` `
7879
79803. One of they daemons installed by ` hyperv-daemons` will automatically mount
80- all drives that are shared with the VM into your home directory. The default name
81- for the mount directory is not very * nice* . The next ` sed ` command renames it
82- to ` shared-drives ` .
8381
84- ``` bash
85- sudo sed -i ' s/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
86- ```
82+ all drives that are shared with the VM into your home directory. The default name
83+ for the mount directory is not very * nice* . The next ` sed` command renames it
84+ to ` shared-drives` .
85+
86+ ` ` ` bash
87+ sudo sed -i ' s/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
88+ ` ` `
8789
88904. Allow everyone to create X server sessions (required because of RDP):
8991
90- ``` bash
91- sudo tee /etc/X11/Xwrapper.config > /dev/null << EOL
92- needs_root_rights=no
93- allowed_users=anybody
94- EOL
95- ```
92+ ` ` ` bash
93+ sudo tee /etc/X11/Xwrapper.config > /dev/null << EOL
94+ needs_root_rights=no
95+ allowed_users=anybody
96+ EOL
97+ ` ` `
9698
97995. Make sure the Hyper-V specific kernel module is enabled:
98100
99- ``` bash
100- echo " hv_sock" | sudo tee /etc/modules-load.d/hv_sock.conf
101- # Make sure VMware kernel module is blacklisted
102- echo " blacklist vmw_vsock_vmci_transport" | sudo tee /etc/modprobe.d/blacklist-vmw_vsock_vmci_transport.conf
103- ```
101+ ` ` ` bash
102+ echo "hv_sock" | sudo tee /etc/modules-load.d/hv_sock.conf
103+ # Make sure VMware kernel module is blacklisted
104+ echo "blacklist vmw_vsock_vmci_transport" | sudo tee /etc/modprobe.d/blacklist-vmw_vsock_vmci_transport.conf
105+ ` ` `
104106
1051076. Enable the xrdp service and shutdown the VM:
106108
107- ``` bash
108- sudo systemctl enable xrdp
109- sudo systemctl enable xrdp-sesman
110- poweroff
111- ```
109+ ` ` ` bash
110+ sudo systemctl enable xrdp
111+ sudo systemctl enable xrdp-sesman
112+ poweroff
113+ ` ` `
112114
1131157. Enable enhanced session mode for the VM (run this as Administrator in powershell):
114116
115- ``` powershell
116- Set-VM "VM NAME" -EnhancedSessionTransportType HVSocket
117- ```
117+ ` ` ` powershell
118+ Set-VM " VM NAME" -EnhancedSessionTransportType HVSocket
119+ ` ` `
118120
119121Now you can start the VM again.
120122A new dialog should now pop up asking you about resolution. Congrats! You are done!
0 commit comments