From b2b4d37b612d47d8bad76d68faffed84c64dee25 Mon Sep 17 00:00:00 2001 From: "Luiz Paulo \"Bills" Date: Wed, 3 Oct 2018 20:09:52 -0300 Subject: [PATCH 1/8] fix code style --- ubuntu/18.04/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ubuntu/18.04/install.sh b/ubuntu/18.04/install.sh index 8b15f4e..92b352c 100644 --- a/ubuntu/18.04/install.sh +++ b/ubuntu/18.04/install.sh @@ -11,7 +11,7 @@ # Update our machine to the latest code if we need to. # -if [ $(id -u) -ne 0 ] ; then +if [ $(id -u) -ne 0 ]; then echo 'This script must be run with root privileges' >&2 exit 1 fi @@ -49,7 +49,7 @@ sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini 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 +if [ ! -e /etc/xrdp/startubuntu.sh ]; then cat >> /etc/xrdp/startubuntu.sh << EOF #!/bin/sh export GNOME_SHELL_SESSION_MODE=ubuntu @@ -69,19 +69,19 @@ sed -i -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc 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 +if [ ! -e /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf ]; then cat >> /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf < /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 < /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla < Date: Wed, 3 Oct 2018 20:11:31 -0300 Subject: [PATCH 2/8] fix code style --- ubuntu/16.04/config-user.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ubuntu/16.04/config-user.sh b/ubuntu/16.04/config-user.sh index f0fcd09..4fce363 100644 --- a/ubuntu/16.04/config-user.sh +++ b/ubuntu/16.04/config-user.sh @@ -7,12 +7,12 @@ # Major thanks to: http://c-nergy.be/blog/?p=10752 for the tips. # -if [ ! $(id -u) ] ; then +if [ ! $(id -u) ]; then echo 'This script must be run with root privileges' >&2 exit 1 fi -bash -c "cat >~/.xsession < ~/.xsession < Date: Wed, 3 Oct 2018 20:12:15 -0300 Subject: [PATCH 3/8] fix code style --- ubuntu/16.04/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu/16.04/install.sh b/ubuntu/16.04/install.sh index 082ad1c..9b7c045 100644 --- a/ubuntu/16.04/install.sh +++ b/ubuntu/16.04/install.sh @@ -11,7 +11,7 @@ # Update our machine to the latest code if we need to. # -if [ $(id -u) -ne 0 ] ; then +if [ $(id -u) -ne 0 ]; then echo 'This script must be run with root privileges' >&2 exit 1 fi @@ -83,7 +83,7 @@ systemctl enable xrdp.service systemctl enable xrdp-sesman.service # Configure the policy xrdp session -bash -c 'cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf < /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf < Date: Wed, 3 Oct 2018 20:13:38 -0300 Subject: [PATCH 4/8] fix code style --- arch/install-config.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/install-config.sh b/arch/install-config.sh index 5034a47..c70d215 100755 --- a/arch/install-config.sh +++ b/arch/install-config.sh @@ -1,24 +1,23 @@ #!/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 +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 +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 +if [ ! pacman -Qs xorgxrdp > /dev/null ]; then echo 'xorgxrdp not installed. Run makepkg.sh first to install xorgxrdp.' >&2 exit 1 fi @@ -51,7 +50,7 @@ echo "allowed_users=anybody" > /etc/X11/Xwrapper.config #Ensure hv_sock gets loaded -if [ ! -e /etc/modules-load.d/hv_sock.conf ] ; then +if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then echo "hv_sock" > /etc/modules-load.d/hv_sock.conf fi @@ -72,7 +71,7 @@ polkit.addRule(function(action, subject) { EOF # Adapt the xrdp pam config -cat >/etc/pam.d/xrdp-sesman < /etc/pam.d/xrdp-sesman < Date: Wed, 3 Oct 2018 20:14:44 -0300 Subject: [PATCH 5/8] fix code style --- ubuntu/16.04/config-user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu/16.04/config-user.sh b/ubuntu/16.04/config-user.sh index 4fce363..b061f68 100644 --- a/ubuntu/16.04/config-user.sh +++ b/ubuntu/16.04/config-user.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash # # This script configures the logged in users xsession to properly From a747f48d3fb786e6cf513baf4e87597a3af7ed8c Mon Sep 17 00:00:00 2001 From: "Luiz Paulo \"Bills" Date: Wed, 3 Oct 2018 20:15:16 -0300 Subject: [PATCH 6/8] fix code style --- arch/install-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/install-config.sh b/arch/install-config.sh index c70d215..2119f46 100755 --- a/arch/install-config.sh +++ b/arch/install-config.sh @@ -1,4 +1,5 @@ #!/bin/bash + # # This script is for Arch Linux to configure XRDP for enhanced session mode # From 12fb39679f5607eab0011d4270b02158182761c0 Mon Sep 17 00:00:00 2001 From: "Luiz Paulo \"Bills" Date: Wed, 3 Oct 2018 20:15:39 -0300 Subject: [PATCH 7/8] fix code style --- arch/makepkg.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/makepkg.sh b/arch/makepkg.sh index 4fda732..c2d8eed 100755 --- a/arch/makepkg.sh +++ b/arch/makepkg.sh @@ -1,9 +1,10 @@ #!/bin/bash + # # This script is for Arch Linux to download and install XRDP+XORGXRDP # -if [ $(id -u) -eq 0 ] ; then +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 From a4e9315d1a1708d6dd6c5d4573a9a2c8bbe8b242 Mon Sep 17 00:00:00 2001 From: "Luiz Paulo \"Bills" Date: Wed, 3 Oct 2018 20:21:52 -0300 Subject: [PATCH 8/8] fix code style --- arch/install-config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/install-config.sh b/arch/install-config.sh index 2119f46..f0a0398 100755 --- a/arch/install-config.sh +++ b/arch/install-config.sh @@ -12,13 +12,13 @@ if [ $(id -u) -ne 0 ]; then fi # Use Qi to check for exact package name -if [ ! pacman -Qi xrdp > /dev/null ]; then +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 +if ! pacman -Qs xorgxrdp > /dev/null ; then echo 'xorgxrdp not installed. Run makepkg.sh first to install xorgxrdp.' >&2 exit 1 fi @@ -56,7 +56,7 @@ if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then fi # Configure the policy xrdp session -cat >/etc/polkit-1/rules.d/02-allow-colord.rules < /etc/polkit-1/rules.d/02-allow-colord.rules <