forked from mir/linux-vm-tools
commit
0b13ac2924
@ -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 <<EOF
|
||||
cat > /etc/polkit-1/rules.d/02-allow-colord.rules <<EOF
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile" ||
|
||||
@ -72,7 +72,7 @@ polkit.addRule(function(action, subject) {
|
||||
EOF
|
||||
|
||||
# Adapt the xrdp pam config
|
||||
cat >/etc/pam.d/xrdp-sesman <<EOF
|
||||
cat > /etc/pam.d/xrdp-sesman <<EOF
|
||||
#%PAM-1.0
|
||||
auth include system-remote-login
|
||||
account include system-remote-login
|
||||
|
@ -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
|
||||
|
@ -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 <<EOF
|
||||
bash -c "cat > ~/.xsession <<EOF
|
||||
|
||||
/usr/lib/gnome-session/gnome-session-binary --session=ubuntu &
|
||||
/usr/lib/x86_64-linux-gnu/unity/unity-panel-service &
|
||||
@ -26,4 +26,4 @@ do
|
||||
\\\${service} &
|
||||
done
|
||||
unity
|
||||
EOF"
|
||||
EOF"
|
||||
|
@ -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 <<EOF
|
||||
bash -c 'cat > /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
|
@ -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 <<EOF
|
||||
blacklist vmw_vsock_vmci_transport
|
||||
EOF
|
||||
fi
|
||||
|
||||
#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/localauthority/50-local.d/45-allow-colord.pkla <<EOF
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
|
||||
[Allow Colord all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
|
||||
|
Loading…
x
Reference in New Issue
Block a user