From bc24ef964e159ed4dee00eb1c7b96a175aa44bb5 Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Tue, 5 May 2020 18:03:10 +0800 Subject: [PATCH 1/4] hyper-v enhanced mode fix: port change --- live-build/ubuntu/hooks/040-hyperv-desktop-images.binary | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index 72ab45ed..ae54e90f 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -55,7 +55,8 @@ EOF CHANGED_FILE_SUFFIX=.replaced-by-desktop-img-build -# use vsock transport. +# use vsock transport +sed -i${CHANGED_FILE_SUFFIX} -e 's/port=3389/port=vsock:\/\/-1:3389/g' "${scratch_d}/etc/xrdp/xrdp.ini" sed -i${CHANGED_FILE_SUFFIX} -e 's/use_vsock=false/use_vsock=true/g' "${scratch_d}/etc/xrdp/xrdp.ini" # use rdp security. sed -i${CHANGED_FILE_SUFFIX} -e 's/security_layer=negotiate/security_layer=rdp/g' "${scratch_d}/etc/xrdp/xrdp.ini" From c9a2d8abade358819cccc3a26217d37a33cad2b5 Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Mon, 11 May 2020 19:39:38 +0800 Subject: [PATCH 2/4] Hyper-V: remove legacy option --- live-build/ubuntu/hooks/040-hyperv-desktop-images.binary | 1 - 1 file changed, 1 deletion(-) diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index ae54e90f..f5c5ac63 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -57,7 +57,6 @@ CHANGED_FILE_SUFFIX=.replaced-by-desktop-img-build # use vsock transport sed -i${CHANGED_FILE_SUFFIX} -e 's/port=3389/port=vsock:\/\/-1:3389/g' "${scratch_d}/etc/xrdp/xrdp.ini" -sed -i${CHANGED_FILE_SUFFIX} -e 's/use_vsock=false/use_vsock=true/g' "${scratch_d}/etc/xrdp/xrdp.ini" # use rdp security. sed -i${CHANGED_FILE_SUFFIX} -e 's/security_layer=negotiate/security_layer=rdp/g' "${scratch_d}/etc/xrdp/xrdp.ini" # remove encryption validation. From 8d26a3036c7a6cf297e1792de208fec7a4b45414 Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Mon, 11 May 2020 19:43:27 +0800 Subject: [PATCH 3/4] force to use systemwide config --- live-build/ubuntu/hooks/040-hyperv-desktop-images.binary | 3 +++ 1 file changed, 3 insertions(+) diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index f5c5ac63..8cd4d06e 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -74,6 +74,9 @@ exec /etc/xrdp/startwm.sh EOF chmod a+x "${scratch_d}/etc/xrdp/startubuntu.sh" +# set to use the system Window manager +sed -i${CHANGED_FILE_SUFFIX} -e 's/EnableUserWindowManager=true/EnableUserWindowManager=0/g' "${scratch_d}/etc/xrdp/sesman.ini" + # use the script to setup the ubuntu session sed -i${CHANGED_FILE_SUFFIX} -e 's/startwm/startubuntu/g' "${scratch_d}/etc/xrdp/sesman.ini" From 81b1cbbfc234f0f1d1b76a7a26961bb5211baa02 Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Mon, 11 May 2020 19:45:04 +0800 Subject: [PATCH 4/4] Add extra policy for xrdp session --- live-build/ubuntu/hooks/040-hyperv-desktop-images.binary | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index 8cd4d06e..5bc066c0 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -103,6 +103,15 @@ ResultInactive=no ResultActive=yes EOF +cat >/etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla <