1
0
forked from mir/linux-vm-tools

Properly setup the ubuntu desktop session and drop the installation of

gnome-tweak-tool as it's not needed anymore
This commit is contained in:
Ken VanDine 2018-03-30 10:19:12 -04:00
parent 167e51cf7b
commit e552b35ff0

View File

@ -44,11 +44,25 @@ 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 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
# 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
sed -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 +79,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 +108,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."