1
0
forked from mir/linux-vm-tools

Merge pull request #21 from kenvandine/master

Use the Ubuntu session for 18.04
This commit is contained in:
Justin 2018-04-02 08:56:27 -07:00 committed by GitHub
commit df505b729d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,11 +44,22 @@ 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
# use the default lightdm x display
# 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_orig -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini
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
@ -65,7 +76,6 @@ 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
@ -95,8 +105,5 @@ systemctl start xrdp
# End XRDP
###############################################################################
# Install Gmone Tweak
apt-get install gnome-tweak-tool -y
echo "Install is complete."
echo "Reboot your machine to begin using XRDP."