Created
January 24, 2021 02:44
-
-
Save gusugusu1018/6bbcf39f80f90648412e3e86cb5044bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Add script to setup the ubuntu session properly | |
if [ ! -e /etc/xrdp/startubuntu.sh ]; then | |
cat >> /etc/xrdp/startubuntu.sh << EOF | |
#!/bin/sh | |
export GNOME_SHELL_SESSION_MODE=ubuntu | |
export XDG_CURRENT_DESKTOP=ubuntu:GNOME | |
exec /etc/xrdp/startwm.sh | |
EOF | |
chmod a+x /etc/xrdp/startubuntu.sh | |
fi | |
sed -i_orig -e 's/startwm/startubuntu/g' /etc/xrdp/sesman.ini | |
# rename the redirected drives to 'shared-drives' | |
sed -i -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini | |
# Changed the allowed_users | |
sed -i_orig -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config | |
# Configure the policy xrdp session | |
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 | |
ResultAny=no | |
ResultInactive=no | |
ResultActive=yes | |
EOF | |
# https://askubuntu.com/questions/1193810/authentication-required-to-refresh-system-repositories-in-ubuntu-19-10 | |
cat > /etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla<<EOF | |
[Allow Package Management all Users] | |
Identity=unix-user:* | |
Action=org.freedesktop.packagekit.system-sources-refresh | |
ResultAny=yes | |
ResultInactive=yes | |
ResultActive=yes | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment