[X2Go-Commits] [live-build-x2go] 94/108: background setter for minidesktop must run as root, thus moved to if-up script
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 20 22:13:25 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch feature/openbox
in repository live-build-x2go.
commit 01d9a9dface17d15517855a31b4d15796bbf9b80
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Sat Jan 19 20:09:15 2019 +0000
background setter for minidesktop must run as root, thus moved to if-up script
---
.../etc/X11/Xsession.d/60x11-set-xbackground | 16 +---------------
config/includes.chroot/etc/network/if-up.d/0430-getxroot | 15 +++++++++++++++
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground
index f1978bc..63243fe 100644
--- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground
+++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground
@@ -20,21 +20,7 @@ if [ -n "$XROOT" ] ; then
if echo "$XROOT" | grep -q "://" ; then
# this could be an URI
echo -n "\n$(date +'%F | %T | ')'$0' URL detected." | tee -a /dev/tty8
- if [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then
- echo -n "\n$(date +'%F | %T | ')'$0' MiniDesktop mode detected." | tee -a /dev/tty8
- # We're running in X2Go-TCE-MATE-MiniDesktop
- # only 1 image supported (so far)
- # no background colors supported (so far)
- # but, in TCE-MMD, we can use SVG images in addition to PNG, JPG, etc.
- while ! [ $(ls -1 $IMAGEDIR/background/* 2>/dev/null | wc -l) -gt 0 ] ; do
- echo -n "\n$(date +'%F | %T | ')'$0' Waiting for image directory to populate ..." | tee -a /dev/tty8
- sleep 1
- done
- cat $(ls -1 $IMAGEDIR/background/*| head -1) >/etc/x2go/x2gothinclient-minidesktop_background.svg # nasty hack, but seems to work, even for non-svg images
- # update-alternatives --remove desktop-background /usr/share/backgrounds/x2go/x2gothinclient-minidesktop_background.svg
- # update-alternatives --install /usr/share/images/desktop-base/desktop-background desktop-background $(ls -1 $IMAGEDIR/background/*| head -1) 10
- echo -n "\n$(date +'%F | %T | ')'$0' New MiniDesktop background has been set." | tee -a /dev/tty8
- else
+ if ! [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then
(
while ! [ $(ls -1 $IMAGEDIR/background/* 2>/dev/null | wc -l) -gt 0 ] ; do
echo -n "\n$(date +'%F | %T | ')'$0' Waiting for image directory to populate ..." | tee -a /dev/tty8
diff --git a/config/includes.chroot/etc/network/if-up.d/0430-getxroot b/config/includes.chroot/etc/network/if-up.d/0430-getxroot
index 1ec086d..9cdd6f9 100755
--- a/config/includes.chroot/etc/network/if-up.d/0430-getxroot
+++ b/config/includes.chroot/etc/network/if-up.d/0430-getxroot
@@ -42,5 +42,20 @@ if [ -n "$XROOT" ] ; then
fi
echo -en "\n$(date +'%F | %T | ')'$0': X background download complete." | tee -a /dev/tty8
+
+ if [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then
+ echo -n "\n$(date +'%F | %T | ')'$0' MiniDesktop mode detected." | tee -a /dev/tty8
+ # We're running in X2Go-TCE-MATE-MiniDesktop
+ # only 1 image supported (so far)
+ # no background colors supported (so far)
+ # but, in TCE-MMD, we can use SVG images in addition to PNG, JPG, etc.
+
+ cat $(ls -1 $IMAGEDIR/background/*| head -1) >/etc/x2go/x2gothinclient-minidesktop_background.svg # nasty hack, but seems to work, even for non-svg images
+ # update-alternatives --remove desktop-background /usr/share/backgrounds/x2go/x2gothinclient-minidesktop_background.svg
+ # update-alternatives --install /usr/share/images/desktop-base/desktop-background desktop-background $(ls -1 $IMAGEDIR/background/*| head -1) 10
+
+ echo -n "\n$(date +'%F | %T | ')'$0' New MiniDesktop background has been set." | tee -a /dev/tty8
+ fi
+
) &
fi
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
More information about the x2go-commits
mailing list