Compare commits
83 Commits
Author | SHA1 | Date | |
---|---|---|---|
94a8fcd02c | |||
b68432dbd7 | |||
|
cd10c5b403 | ||
|
c1fb14604a | ||
|
317a90f06f | ||
|
4cde61ece2 | ||
|
f53f7cc5d6 | ||
|
4dcc278f84 | ||
|
aefd66cad4 | ||
|
f189c2751e | ||
|
968bfe08d1 | ||
|
d30ea7e6e9 | ||
|
1a5b61853f | ||
|
4748bda5fb | ||
|
5303c94ebf | ||
|
0b13ac2924 | ||
|
a4e9315d1a | ||
|
12fb39679f | ||
|
a747f48d3f | ||
|
92e8ab88d4 | ||
|
021eb9122c | ||
|
0054c5730a | ||
|
4ed42fda4d | ||
|
b2b4d37b61 | ||
|
aee9e17adc | ||
|
0728c2cc8c | ||
|
29cbeba837 | ||
|
d1954f5fc1 | ||
|
30769e9dbf | ||
|
f489906fb8 | ||
|
b8fd6ea26b | ||
|
fbe36c3508 | ||
|
e6030b7376 | ||
|
8b41356c10 | ||
|
04521fed99 | ||
|
11be5b1225 | ||
|
7b6e807eab | ||
|
044def1d64 | ||
|
0512e124b6 | ||
|
b5fb1f4f47 | ||
|
40d32f2128 | ||
|
8228d3bc40 | ||
|
c14580af75 | ||
|
83818ac15b | ||
|
ace11e1bb1 | ||
|
a552524e87 | ||
|
876f3d5f22 | ||
|
73a25928a1 | ||
|
40981a81a8 | ||
|
994991cf30 | ||
|
1ea3f6624c | ||
|
e86510f7e7 | ||
|
d5aa950f77 | ||
|
df505b729d | ||
|
55dca27fa9 | ||
|
6575b9ed27 | ||
|
e552b35ff0 | ||
|
167e51cf7b | ||
|
87201fa488 | ||
|
ac50616e57 | ||
|
c06cd3a3eb | ||
|
3261fefb8d | ||
|
efe1759a1d | ||
|
a04a8a9523 | ||
|
5ba1db8391 | ||
|
ec119f904b | ||
|
8eff6b70f0 | ||
|
63cf0daaf0 | ||
|
0b596b93eb | ||
|
00fe6a84b3 | ||
|
661c4bdde9 | ||
|
19f8d740b4 | ||
|
4b0cee52ea | ||
|
0432e5888f | ||
|
f0b779fee5 | ||
|
ae012977ab | ||
|
80666ace16 | ||
|
3f933eee18 | ||
|
c9552344b6 | ||
|
2046f6af53 | ||
|
5927c9de2e | ||
|
28e6cc2079 | ||
|
5082f8ce12 |
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
2
README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# This Repo Has Been Archived
|
||||
This repo has been archived. You can continue to use the optimized Ubuntu image that is available by default in the Hyper-V Quick Create Gallery. If you are looking for an integrated Linux developer experience on Windows, we encourage you to check out [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/). WSL 2 lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup. The ability to run Linux GUI apps in WSL is also on the [roadmap](https://devblogs.microsoft.com/commandline/whats-new-in-the-windows-subsystem-for-linux-september-2020/#gui-apps).
|
88
arch/install-config.sh
Executable file
@ -0,0 +1,88 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# This script is for Arch Linux to configure XRDP for enhanced session mode
|
||||
#
|
||||
# The configuration is adapted from the Ubuntu 16.04 script.
|
||||
#
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo 'This script must be run with root privileges' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use Qi to check for exact package name
|
||||
if ! pacman -Qi xrdp > /dev/null ; then
|
||||
echo 'xrdp not installed. Run makepkg.sh first to install xrdp.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use Qs to allow xorgxrdp-devel-git
|
||||
if ! pacman -Qs xorgxrdp > /dev/null ; then
|
||||
echo 'xorgxrdp not installed. Run makepkg.sh first to install xorgxrdp.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Configure XRDP
|
||||
#
|
||||
systemctl enable xrdp
|
||||
systemctl enable xrdp-sesman
|
||||
|
||||
# Configure the installed XRDP ini files.
|
||||
# use vsock transport.
|
||||
sed -i_orig -e 's/port=3389/port=vsock:\/\/-1:3389/g' /etc/xrdp/xrdp.ini
|
||||
# use rdp security.
|
||||
sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
# remove encryption validation.
|
||||
sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
# disable bitmap compression since its local its much faster
|
||||
sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
#
|
||||
# sed -n -e 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini
|
||||
|
||||
# use the default lightdm x display
|
||||
# sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini
|
||||
# rename the redirected drives to 'shared-drives'
|
||||
sed -i_orig -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# Change the allowed_users
|
||||
echo "allowed_users=anybody" > /etc/X11/Xwrapper.config
|
||||
|
||||
|
||||
#Ensure hv_sock gets loaded
|
||||
if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then
|
||||
echo "hv_sock" > /etc/modules-load.d/hv_sock.conf
|
||||
fi
|
||||
|
||||
# Configure the policy xrdp session
|
||||
cat > /etc/polkit-1/rules.d/02-allow-colord.rules <<EOF
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-device" ||
|
||||
action.id == "org.freedesktop.color-manager.create-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-profile") &&
|
||||
subject.isInGroup("users"))
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF
|
||||
|
||||
# Adapt the xrdp pam config
|
||||
cat > /etc/pam.d/xrdp-sesman <<EOF
|
||||
#%PAM-1.0
|
||||
auth include system-remote-login
|
||||
account include system-remote-login
|
||||
password include system-remote-login
|
||||
session include system-remote-login
|
||||
EOF
|
||||
|
||||
|
||||
###############################################################################
|
||||
# .xinitrc has to be modified manually.
|
||||
#
|
||||
echo "You will have to configure .xinitrc to start your windows manager, see https://wiki.archlinux.org/index.php/Xinit"
|
||||
echo "Reboot your machine to begin using XRDP."
|
41
arch/makepkg.sh
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# This script is for Arch Linux to download and install XRDP+XORGXRDP
|
||||
#
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
echo 'This script must be run as a non-root user, as building packages as root is unsupported.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Prepare by installing build tools.
|
||||
#
|
||||
# Partial upgrades aren't supported in arch.
|
||||
sudo pacman -Syu --needed --noconfirm base base-devel git
|
||||
|
||||
# Create a build directory in tmpfs
|
||||
TMPDIR=$(mktemp -d)
|
||||
pushd "$TMPDIR" || exit
|
||||
|
||||
###############################################################################
|
||||
# XRDP
|
||||
#
|
||||
(
|
||||
git clone https://aur.archlinux.org/xrdp.git
|
||||
cd xrdp || exit
|
||||
makepkg -sri --noconfirm
|
||||
)
|
||||
###############################################################################
|
||||
# XORGXRDP
|
||||
# Devel version, because release version includes a bug crashing gnome-settings-daemon
|
||||
(
|
||||
git clone https://aur.archlinux.org/xorgxrdp-devel-git.git
|
||||
cd xorgxrdp-devel-git || exit
|
||||
makepkg -sri --noconfirm
|
||||
)
|
||||
###############################################################################
|
||||
|
||||
#remove build directory
|
||||
rm -rf $TMPDIR
|
111
debian/12/install.sh
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# This script is for Debian 12 Bookworm to download and install XRDP.
|
||||
#
|
||||
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Use HWE kernel packages
|
||||
#
|
||||
HWE=""
|
||||
#HWE="-hwe-18.04"
|
||||
|
||||
###############################################################################
|
||||
# Update our machine to the latest code if we need to.
|
||||
#
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo 'This script must be run with root privileges' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt update && apt upgrade -y
|
||||
|
||||
if [ -f /var/run/reboot-required ]; then
|
||||
echo "A reboot is required in order to proceed with the install." >&2
|
||||
echo "Please reboot and re-run this script to finish the install." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# XRDP
|
||||
#
|
||||
|
||||
# Install hv_kvp utils
|
||||
# Not available on Debian 12.
|
||||
#apt install -y linux-tools-virtual${HWE}
|
||||
#apt install -y linux-cloud-tools-virtual${HWE}
|
||||
|
||||
# Install the xrdp service so we have the auto start behavior
|
||||
apt install -y xrdp
|
||||
|
||||
systemctl stop xrdp
|
||||
systemctl stop xrdp-sesman
|
||||
|
||||
# Configure the installed XRDP ini files.
|
||||
# use vsock transport.
|
||||
sed -i_orig -e 's/use_vsock=false/use_vsock=true/g' /etc/xrdp/xrdp.ini
|
||||
# use rdp security.
|
||||
sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
# remove encryption validation.
|
||||
sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
# disable bitmap compression since its local its much faster
|
||||
sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
|
||||
# Add script to setup the Debian session properly
|
||||
# Tested on Debian 12, should work for at least GNOME and KDE now (probably more).
|
||||
# See https://wiki.archlinux.org/title/Environment_variables#Examples
|
||||
source /etc/os-release
|
||||
if [ ! -e /etc/xrdp/startdebian.sh ]; then
|
||||
cat >> /etc/xrdp/startdebian.sh << EOF
|
||||
#!/bin/sh
|
||||
export GNOME_SHELL_SESSION_MODE=$ID
|
||||
export XDG_CURRENT_DESKTOP=$ID:$XDG_CURRENT_DESKTOP
|
||||
exec /etc/xrdp/startwm.sh
|
||||
EOF
|
||||
chmod a+x /etc/xrdp/startdebian.sh
|
||||
fi
|
||||
|
||||
# use the script to setup the Debian session
|
||||
sed -i_orig -e 's/startwm/startdebian/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# rename the redirected drives to 'shared-drives'
|
||||
sed -i -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# Changed the allowed_users
|
||||
sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
|
||||
|
||||
# Blacklist the vmw module
|
||||
if [ ! -e /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf ]; then
|
||||
cat >> /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf <<EOF
|
||||
blacklist vmw_vsock_vmci_transport
|
||||
EOF
|
||||
fi
|
||||
|
||||
#Ensure hv_sock gets loaded
|
||||
if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then
|
||||
echo "hv_sock" > /etc/modules-load.d/hv_sock.conf
|
||||
fi
|
||||
|
||||
# Configure the policy xrdp session
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
|
||||
[Allow Colord all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
|
||||
ResultAny=no
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
EOF
|
||||
|
||||
# reconfigure the service
|
||||
systemctl daemon-reload
|
||||
systemctl start xrdp
|
||||
|
||||
#
|
||||
# End XRDP
|
||||
###############################################################################
|
||||
|
||||
echo "Install is complete."
|
||||
echo "Reboot your machine to begin using XRDP."
|
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# This script configures the logged in users xsession to properly
|
||||
@ -7,7 +7,12 @@
|
||||
# Major thanks to: http://c-nergy.be/blog/?p=10752 for the tips.
|
||||
#
|
||||
|
||||
sudo bash -c "cat >~/.xsession <<EOF
|
||||
if [ ! "$(id -u)" ]; then
|
||||
echo 'This script must be run with root privileges' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bash -c "cat > ~/.xsession <<EOF
|
||||
|
||||
/usr/lib/gnome-session/gnome-session-binary --session=ubuntu &
|
||||
/usr/lib/x86_64-linux-gnu/unity/unity-panel-service &
|
||||
|
@ -11,22 +11,24 @@
|
||||
# Update our machine to the latest code if we need to.
|
||||
#
|
||||
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo 'This script must be run with root privileges' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
# Get git if we dont have it.
|
||||
sudo apt install -y git
|
||||
apt install -y git
|
||||
|
||||
# Get the linux-azure kernel to add hyper-v sockets to the guest
|
||||
sudo apt install -y linux-azure
|
||||
apt install -y linux-azure
|
||||
|
||||
if [ -f /var/run/reboot-required ]; then
|
||||
echo
|
||||
echo "A reboot is required in order to proceed with the install."
|
||||
echo "Please reboot and re-run this script to finish the install."
|
||||
echo
|
||||
|
||||
exit
|
||||
echo "A reboot is required in order to proceed with the install." >&2
|
||||
echo "Please reboot and re-run this script to finish the install." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
@ -35,10 +37,10 @@ fi
|
||||
export XRDP_PATH=~/git/src/github.com/neutrinolabs/xrdp
|
||||
|
||||
# Install the xrdp service so we have the auto start behavior
|
||||
sudo apt install -y xrdp
|
||||
apt install -y xrdp
|
||||
|
||||
# Get XRDP requirements
|
||||
sudo apt install -y autoconf libtool libssl-dev libpam0g-dev libx11-dev libxfixes-dev libxrandr-dev libjpeg-dev libfuse-dev nasm
|
||||
apt install -y autoconf libtool libssl-dev libpam0g-dev libx11-dev libxfixes-dev libxrandr-dev libjpeg-dev libfuse-dev nasm libopus-dev
|
||||
|
||||
# Get XRDP
|
||||
if [ ! -d $XRDP_PATH ]; then
|
||||
@ -46,53 +48,55 @@ if [ ! -d $XRDP_PATH ]; then
|
||||
fi
|
||||
|
||||
# Configure XRDP
|
||||
cd $XRDP_PATH
|
||||
cd $XRDP_PATH || exit
|
||||
./bootstrap
|
||||
./configure --enable-vsock --enable-jpeg --enable-fuse
|
||||
./configure --enable-ipv6 --enable-jpeg --enable-fuse --enable-rfxcodec --enable-opus --enable-painter --enable-vsock
|
||||
|
||||
# Build/Install XRDP
|
||||
make
|
||||
sudo make install
|
||||
make install
|
||||
|
||||
# Configure the installed XRDP ini files.
|
||||
# use vsock transport.
|
||||
sudo sed -i_orig -e 's/use_vsock=false/use_vsock=true/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/use_vsock=false/use_vsock=true/g' /etc/xrdp/xrdp.ini
|
||||
# use rdp security.
|
||||
sudo sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
# remove encryption validation.
|
||||
sudo sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
# disable bitmap compression since its local its much faster
|
||||
sudo sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
#
|
||||
# sudo sed -n -e 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini
|
||||
# sed -n -e 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini
|
||||
|
||||
# use the default lightdm x display
|
||||
# sudo sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini
|
||||
# sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# rename the redirected drives to 'shared-drives'
|
||||
sed -i_orig -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# 16.04.3 changed the allowed_users
|
||||
sudo sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
|
||||
sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
|
||||
|
||||
# reconfigure the service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable xrdp.service
|
||||
sudo systemctl enable xrdp-sesman.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable xrdp.service
|
||||
systemctl enable xrdp-sesman.service
|
||||
|
||||
# Configure the policy xrdp session
|
||||
sudo bash -c 'cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF
|
||||
# polkit policy definition language changes depending on its version. See issue #61
|
||||
if [[ "$(pkaction --version | sed -E 's/^[[:alnum:] ]*([[:digit:]]+.*)/\1/' - )" != '0.105' ]]; then
|
||||
echo "Error: Policy rule specification probably invalid. Expected version: 0.105 detected $(pkaction --version)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-device" ||
|
||||
action.id == "org.freedesktop.color-manager.create-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-profile") &&
|
||||
subject.isInGroup("{group}"))
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF'
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
|
||||
[Allow Colord all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
|
||||
ResultAny=no
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
EOF
|
||||
|
||||
#
|
||||
# End XRDP
|
||||
@ -104,11 +108,11 @@ EOF'
|
||||
export XORGXRDP_PATH=~/git/src/github.com/neutrinolabs/xorgxrdp
|
||||
|
||||
# Get XORGXRDP requirements
|
||||
sudo apt install -y autoconf libtool xserver-xorg-core xserver-xorg-dev
|
||||
apt install -y autoconf libtool xserver-xorg-core xserver-xorg-dev
|
||||
|
||||
# 16.04.3 is missing fontutil.h
|
||||
if [ ! -f /usr/include/X11/fonts/fontutil.h ]; then
|
||||
sudo apt install -y libxfont1-dev
|
||||
apt install -y libxfont1-dev
|
||||
fi
|
||||
|
||||
# Get XORGXRDP
|
||||
@ -117,13 +121,16 @@ if [ ! -d $XORGXRDP_PATH ]; then
|
||||
fi
|
||||
|
||||
# Configure XORGXRDP
|
||||
cd $XORGXRDP_PATH
|
||||
cd $XORGXRDP_PATH || exit
|
||||
./bootstrap
|
||||
./configure
|
||||
|
||||
# Build/Install XORGXRDP
|
||||
make
|
||||
sudo make install
|
||||
make install
|
||||
|
||||
#Installing xorgxrdp knocks out ubuntu-desktop from running. We need to reinstall it
|
||||
apt-get install -y --reinstall ubuntu-desktop
|
||||
|
||||
#
|
||||
# End XORGXRDP
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# This script is for Ubuntu 18.04 Bionic Beaver to download and install XRDP+XORGXRDP via
|
||||
@ -7,118 +7,102 @@
|
||||
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Use HWE kernel packages
|
||||
#
|
||||
HWE=""
|
||||
#HWE="-hwe-18.04"
|
||||
|
||||
###############################################################################
|
||||
# Update our machine to the latest code if we need to.
|
||||
#
|
||||
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo 'This script must be run with root privileges' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get git if we dont have it.
|
||||
sudo apt install -y git
|
||||
|
||||
# TODO: Remove the custom kernel logic when 18.04 supports hv_sock by default.
|
||||
sudo add-apt-repository ppa:billy-olsen/test-kernels-bionic
|
||||
sudo apt-get update
|
||||
sudo apt install linux-image-4.14.0-17-generic
|
||||
apt update && apt upgrade -y
|
||||
|
||||
if [ -f /var/run/reboot-required ]; then
|
||||
echo
|
||||
echo "A reboot is required in order to proceed with the install."
|
||||
echo "Please reboot and re-run this script to finish the install."
|
||||
echo
|
||||
|
||||
exit
|
||||
echo "A reboot is required in order to proceed with the install." >&2
|
||||
echo "Please reboot and re-run this script to finish the install." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# XRDP
|
||||
#
|
||||
export XRDP_PATH=~/git/src/github.com/neutrinolabs/xrdp
|
||||
|
||||
# Install hv_kvp utils
|
||||
apt install -y linux-tools-virtual${HWE}
|
||||
apt install -y linux-cloud-tools-virtual${HWE}
|
||||
|
||||
# Install the xrdp service so we have the auto start behavior
|
||||
sudo apt install -y xrdp
|
||||
apt install -y xrdp
|
||||
|
||||
# Get XRDP requirements
|
||||
# ./bootstrap requirements 'autoconf libtool pkg-config'
|
||||
# ./configure requirements 'libssl-dev libpam0g-dev libjpeg-dev libfuse-dev libx11-dev libxfixes-dev libxrandr-dev nasm'
|
||||
sudo apt install -y autoconf libtool pkg-config libssl-dev libpam0g-dev libjpeg-dev libfuse-dev libx11-dev libxfixes-dev libxrandr-dev nasm
|
||||
|
||||
# Get XRDP
|
||||
if [ ! -d $XRDP_PATH ]; then
|
||||
git clone https://github.com/neutrinolabs/xrdp $XRDP_PATH
|
||||
fi
|
||||
|
||||
# Configure XRDP
|
||||
cd $XRDP_PATH
|
||||
./bootstrap
|
||||
./configure --enable-vsock --enable-jpeg --enable-fuse
|
||||
|
||||
sudo systemctl stop xrdp
|
||||
sudo systemctl stop xrdp-sesman
|
||||
|
||||
# Build/Install XRDP
|
||||
make
|
||||
sudo make install
|
||||
systemctl stop xrdp
|
||||
systemctl stop xrdp-sesman
|
||||
|
||||
# Configure the installed XRDP ini files.
|
||||
# use vsock transport.
|
||||
sudo sed -i_orig -e 's/use_vsock=false/use_vsock=true/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/use_vsock=false/use_vsock=true/g' /etc/xrdp/xrdp.ini
|
||||
# use rdp security.
|
||||
sudo sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini
|
||||
# remove encryption validation.
|
||||
sudo sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini
|
||||
# disable bitmap compression since its local its much faster
|
||||
sudo sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini
|
||||
|
||||
# use the default lightdm x display
|
||||
# sudo sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini
|
||||
# Add script to setup the ubuntu session properly
|
||||
if [ ! -e /etc/xrdp/startubuntu.sh ]; then
|
||||
cat >> /etc/xrdp/startubuntu.sh << EOF
|
||||
#!/bin/sh
|
||||
export GNOME_SHELL_SESSION_MODE=ubuntu
|
||||
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
|
||||
exec /etc/xrdp/startwm.sh
|
||||
EOF
|
||||
chmod a+x /etc/xrdp/startubuntu.sh
|
||||
fi
|
||||
|
||||
# use the script to setup the ubuntu session
|
||||
sed -i_orig -e 's/startwm/startubuntu/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# rename the redirected drives to 'shared-drives'
|
||||
sed -i -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
|
||||
|
||||
# Changed the allowed_users
|
||||
sudo sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
|
||||
|
||||
# Enable the hv_sock module
|
||||
sudo rmmod vmw_vsock_vmci_transport
|
||||
sudo rmmod vsock
|
||||
sudo modprobe hv_sock
|
||||
sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
|
||||
|
||||
# Blacklist the vmw module
|
||||
sudo bash -c 'echo "blacklist vmw_vsock_vmci_transport" >> /etc/modprobe.d/blacklist.conf <<EOF
|
||||
EOF'
|
||||
if [ ! -e /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf ]; then
|
||||
cat >> /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf <<EOF
|
||||
blacklist vmw_vsock_vmci_transport
|
||||
EOF
|
||||
fi
|
||||
|
||||
#Ensure hv_sock gets loaded
|
||||
sudo bash -c 'echo "hv_sock" >> /etc/modules <<EOF
|
||||
EOF'
|
||||
if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then
|
||||
echo "hv_sock" > /etc/modules-load.d/hv_sock.conf
|
||||
fi
|
||||
|
||||
# Configure the policy xrdp session
|
||||
sudo bash -c 'cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-device" ||
|
||||
action.id == "org.freedesktop.color-manager.create-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-profile") &&
|
||||
subject.isInGroup("{group}"))
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF'
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
|
||||
[Allow Colord all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
|
||||
ResultAny=no
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
EOF
|
||||
|
||||
# reconfigure the service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start xrdp
|
||||
systemctl daemon-reload
|
||||
systemctl start xrdp
|
||||
|
||||
#
|
||||
# End XRDP
|
||||
###############################################################################
|
||||
|
||||
# Install Gmone Tweak
|
||||
sudo apt-get install gnome-tweak-tool -y
|
||||
|
||||
echo
|
||||
echo "Install is complete."
|
||||
echo "Reboot your machine to begin using XRDP."
|
||||
echo
|
||||
|
BIN
wiki/media/connectPrompt.PNG
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
wiki/media/downloadvm.PNG
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
wiki/media/galleryinmenu.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
wiki/media/quickcreate.PNG
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
wiki/media/vmconnect.PNG
Normal file
After Width: | Height: | Size: 393 KiB |
BIN
wiki/media/vmstart.PNG
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
wiki/media/xorglogin.PNG
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
wiki/media/xrdplogin.PNG
Normal file
After Width: | Height: | Size: 50 KiB |