Skip to content

Commit 4748bda

Browse files
authored
Merge pull request microsoft#63 from WhisperingChaos/master
Addresses Issues microsoft#61 & microsoft#62
2 parents 0b13ac2 + 5303c94 commit 4748bda

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

ubuntu/16.04/install.sh

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,20 @@ systemctl enable xrdp.service
8383
systemctl enable xrdp-sesman.service
8484

8585
# Configure the policy xrdp session
86-
bash -c 'cat > /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF
87-
88-
polkit.addRule(function(action, subject) {
89-
if ((action.id == "org.freedesktop.color-manager.create-device" ||
90-
action.id == "org.freedesktop.color-manager.modify-profile" ||
91-
action.id == "org.freedesktop.color-manager.delete-device" ||
92-
action.id == "org.freedesktop.color-manager.create-profile" ||
93-
action.id == "org.freedesktop.color-manager.modify-profile" ||
94-
action.id == "org.freedesktop.color-manager.delete-profile") &&
95-
subject.isInGroup("users"))
96-
{
97-
return polkit.Result.YES;
98-
}
99-
});
100-
EOF'
86+
# polkit policy definition language changes depending on its version. See issue #61
87+
if [[ "$(pkaction --version | sed -E 's/^[[:alnum:] ]*([[:digit:]]+.*)/\1/' - )" != '0.105' ]]; then
88+
echo "Error: Policy rule specification probably invalid. Expected version: 0.105 detected $(pkaction --version)." >&2
89+
exit 1
90+
fi
91+
92+
cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
93+
[Allow Colord all Users]
94+
Identity=unix-user:*
95+
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
96+
ResultAny=no
97+
ResultInactive=no
98+
ResultActive=yes
99+
EOF
101100

102101
#
103102
# End XRDP
@@ -131,7 +130,7 @@ make
131130
make install
132131

133132
#Installing xorgxrdp knocks out ubuntu-desktop from running. We need to reinstall it
134-
apt-get install --reinstall ubuntu-desktop
133+
apt-get install -y --reinstall ubuntu-desktop
135134

136135
#
137136
# End XORGXRDP

0 commit comments

Comments
 (0)