diff --git a/arch/install-config.sh b/arch/install-config.sh index 5034a47..f0a0398 100755 --- a/arch/install-config.sh +++ b/arch/install-config.sh @@ -6,7 +6,7 @@ # 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 @@ -51,12 +51,12 @@ 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 # Configure the policy xrdp session -cat >/etc/polkit-1/rules.d/02-allow-colord.rules < /etc/polkit-1/rules.d/02-allow-colord.rules </etc/pam.d/xrdp-sesman < /etc/pam.d/xrdp-sesman <&2 exit 1 fi diff --git a/ubuntu/16.04/config-user.sh b/ubuntu/16.04/config-user.sh index f0fcd09..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 @@ -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 <&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 <&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 <