博文背景
阅读这个脚本可以帮助我们深刻理解Gnome桌面及其远程定制,让我们自己做桌面的主人。
实际操作
Disclaimer : As usual, use this at your own risk !!
#!/bin/bash
#####################################################################################################
# Script_Name : Std-Xrdp-install-0.6.1.sh
# Description : Perform an automated standard installation of xrdp
# on ubuntu 18.04 and later
# Date : Sept 2019
# written by : Griffon
# Web Site :http://www.c-nergy.be - http://www.c-nergy.be/blog
# Version : 0.6.1
# History : 0.6.1 - Added support for Ubuntu 18.04.3
# : 0.6 - Added support for Ubuntu 19.04
# - New code for Look'n feel using xsessionrc method
# - New code for enabling Sound Redirection - compiling from source
# - Removed -g parameter
# : 0.5.3 - Using Unoffical xRDP packages for Ubuntu 18.04.2 issue
# : 0.5.2 - Quick Fix for Ubuntu 18.04.2
# : 0.5.1 - Add support to Ubuntu 18.10
# : 0.5 - Add logic to enable sound redirection
# - re-write code logic to include functions
# - Removed support for Ubuntu 17.10 as reached end of support
# : 0.4 - Add logic to fix GDM lock screen + minor change
# : 0.3 - Adding logic to fix theme and extensions for any users login through xrdp
# 0.2 - Added Logic for Ubuntu 17.10 and 18.04 detection
# - Updated the polkit section
# - New formatting and structure
# : 0.1 - Initial Script
# Disclaimer : Script provided AS IS. Use it at your own risk....
####################################################################################################
#---------------------------------------------------#
# Detecting if Parameters passed to script ....
#---------------------------------------------------#
while getopts s:u: option
do
case "${option}"
in
s) fixSound=${OPTARG};;
u) unofficialRepo=${OPTARG};;
esac
done
#---------------------------------------------------#
# Script Version information Displayed #
#---------------------------------------------------#
echo
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;36m ! Standard XRDP Installation Script - Ver 0.6.1 !\e[0m"
/bin/echo -e "\e[1;36m ! Written by Griffon - Sept 2019 - www.c-nergy.be !\e[0m"
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
echo
#--------------------------------------------------------------------------#
# -----------------------Function Section - DO NOT MODIFY -----------------#
#--------------------------------------------------------------------------#
#-----------------------------------------------------#
# Function 0 - Quick and Dirty Patch Ubuntu 18.04.x #
#-----------------------------------------------------#
install_xservercore()
{
echo
/bin/echo -e "\e[1;33m !----------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Installing xserver-xorg-core Packages...Proceeding... !\e[0m"
/bin/echo -e