This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/openbox-magic-pixel-workaround-buster in repository live-build-x2go. commit e0a514dc132d3972be9cc109a78e4f51a2449a65 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jun 24 23:23:30 2020 +0200 added support for MATE's screensaver, so our slides will be shown in MMD --- .../60x11-spawn-configure-slideshow-screensaver | 3 ++- .../etc/network/if-up.d/0440-getxscreensaverimgs | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver index a8427a1..4f5d8c5 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver @@ -9,7 +9,8 @@ IMAGEDIR="/var/tmp/images/" SLIDESDIR="${IMAGEDIR}/slides/" -if [ -z "$XSAVERIMAGES" ] && [ -z "$XSAVERIDLETIME" ] && [ -z "$XSAVERIMGTIME" ] ; then +if [ -z "$XSAVERIMAGES" ] && [ -z "$XSAVERIDLETIME" ] && [ -z "$XSAVERIMGTIME" ] || [ -s /etc/lightdm/lightdm.conf ] ; then + # don't run when lightdm is present -> most likely MMD with MATE-Screensaver : # "exit 0" is a bad idea here, so we "NOP" instead else diff --git a/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs b/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs index 8e4a9dc..2921436 100755 --- a/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs +++ b/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs @@ -5,6 +5,18 @@ XSAVERIMAGES=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e IMAGEDIR=/var/tmp/images/ SLIDESDIR="${IMAGEDIR}/slides/" +# if we're a MATE-MiniDesktop, let this be our homedirectory +USERHOME=$(getent passwd x2gothinclient | awk -F':' '{ print $6 }') +# No Match? Then we're a regular TCE-Live. +if [ -z "$USERHOME" ] ; then + USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') +else + # if this is MMD, create a directory for MATE's + # braindead slideshow screensaver that doesn't allow you to + # specify an image directory + mkdir -p ${USERHOME}/Pictures +fi + function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } @@ -49,6 +61,9 @@ if [ -n "$XSAVERIMAGES" ] ; then : # NOP fi + # If this directory exists, then we're a MMD and images need to go there. Hardlinking them to save space. + [ -d ${USERHOME}/Pictures ] && cp -al ${SLIDESDIR} ${USERHOME}/Pictures + echo -en "\n$(date +'%F | %T | ')'$0': Screensaver download complete." | tee -a /dev/tty8 ) & -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git