diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2016-05-23 16:44:45 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2016-05-23 16:44:45 +1200 |
commit | 977c9423dfd501ce6a5973b2e2426af02dc7940d (patch) | |
tree | ad7b7ebebcba940e1f1a1f16c57dcf82f6e5c8c7 | |
parent | a927f0c30e3d57afadda3247f49a1e175b1976c1 (diff) | |
parent | 7b91ed1c08d33bdfdbc1a561c0a6a37ca82bc9cf (diff) | |
download | lightdm-git-977c9423dfd501ce6a5973b2e2426af02dc7940d.tar.gz |
Source prefs.sh as privileged user to allow user modification
-rw-r--r-- | debian/guest-account.sh | 14 | ||||
-rw-r--r-- | debian/guest-session-setup.sh | 7 |
2 files changed, 13 insertions, 8 deletions
diff --git a/debian/guest-account.sh b/debian/guest-account.sh index 5aafac0a..48bbde69 100644 --- a/debian/guest-account.sh +++ b/debian/guest-account.sh @@ -132,12 +132,20 @@ add_account () chown -R ${GUEST_USER}:${GUEST_USER} ${GUEST_HOME} fi - # delay the launch of info dialog - echo "export DIALOG_SLEEP=4" >> ${GUEST_HOME}/.profile - # setup session su ${GUEST_USER} -c "env HOME=${GUEST_HOME} site_gs=${site_gs} ${dist_gs}/setup.sh" + # set possible local guest session preferences + source_local_prefs() { + local USER=${GUEST_USER} + local HOME=${GUEST_HOME} + . ${site_gs}/prefs.sh + chown -R ${USER}:${USER} ${HOME} + } + if [ -f ${site_gs}/prefs.sh ]; then + source_local_prefs + fi + echo ${GUEST_USER} } diff --git a/debian/guest-session-setup.sh b/debian/guest-session-setup.sh index 46cee493..595d0bce 100644 --- a/debian/guest-session-setup.sh +++ b/debian/guest-session-setup.sh @@ -1,7 +1,6 @@ #!/bin/sh HOME=${HOME:-$(getent passwd $(whoami) | cut -f6 -d:)} -site_gs=${site_gs:-/etc/guest-session} # disable some services that are unnecessary for the guest session services="jockey-kde.desktop jockey-gtk.desktop update-notifier.desktop user-dirs-update-gtk.desktop" @@ -30,7 +29,5 @@ echo "hideRestartNotifier=true" >> ${HOME}/.kde/share/config/notificationhelper #dmrc='[Desktop]\nSession=guest-restricted' #/bin/echo -e ${dmrc} > ${HOME}/.dmrc -# set possible local guest session preferences -if [ -f ${site_gs}/prefs.sh ]; then - . ${site_gs}/prefs.sh -fi +# delay the launch of info dialog +echo "export DIALOG_SLEEP=4" >> ${HOME}/.profile |