This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/openbox in repository live-build-x2go. from 77de310 fixed missing escape new 5f67f9d this adds "earlyblankdpmxfix" as optional kernel parameter - due to modesetting, certain buggy TFTs turn black early in the boot process (even before X starts). This provides a workaround to un-blank them asap. new d2a4a1f fixed permissions for ~/.ssh, fixed description for portableapps partition new 9f6ea6b fixed session file location for dual-mode media new 93e5bd3 typofix new ad0c425 added code to support selection of audio output new eef26a0 fixes missing escape new 3cd69e5 fixed indentation error new 3a62cab fixed indentation error new 93322eb removable device detection was broken new 9a2d1d4 added active audio profile output, moved audio block to end of file so pulseaudio has more time to start up new 48df119 fixed missing escape new c296df9 removed unneccessary quotation marks new 7658766 make sure pulseaudio is responding before pacmd fires new ab0e03d nudging the automounter isn't necessary, and actually doesn't work here (udevd most likely isn't running yet) new 6db8f4b changed how BLOCKDEVS list is created, added various comments to make code more readable/understandable new d6a40aa moved function to top of code block where it belongs, and also fixed indentation new 7bad1e9 removed unnecessary newline new 2a621f0 removed old debug code new 9dfb323 added newline character - it should work with the blank that previously stood in its place, but let's play it safe ... new 6ec7300 changed how BLOCKDEVS list is created new 79d1787 moved function to top of code block where it belongs, and also fixed indentation new a8afba5 fixed error related to chmod, changed *LABEL* mechanism to the one used by 2260-getsshhostkeysfrommedia,added various comments to make code more readable/understandable new 95d8054 fixed bashisms, quoting, whitespace issues new 1537d97 udevadm settle is already running due to the udev service startup. Spawning a second copy causes the second copy to terminate immediately as if there were no open events - which breaks our loop. So instead, we need to monitor when the first/only instance terminates. new 32c61bf moved getportableappsessions right behind the other scripts that mount devices new 32e735a adapted 2280-x2go-getportableappsessions to work more like 2270-getsshclientkeysfrommedia new a253a02 un-hardcoded path new 6b2de45 fixed "touch" file name new cb7dcfc removed umount in case of success, changed ro mount to rw new 974c58a fixed purpose description in comments new 9e8b42f added/fixed return codes of check_for_config new 0977bee exchanged HOTPLUG for RM (REMOVABLE), as lsblk in jessie doesn't understand the HOTPLUG parameter, but RM does what we want new b140c1c last changes broke routines that check fixed disks for our magic label(s), mount them, and "do the needful" with them. This commit should fix this. new 7ef5b46 lsblk output is parsed again later on, which means that this later code block needed to be changed as well, so it understands the new output order (Removable/Fixed Disk on 2nd, rather than 4th position) new d7eb710 removable/non-removable detection per device failed for partitioned devices new e926958 one line of debug output was missing in 2260 new e85df5c typofix new a236e80 added support for x2go session config stored on fixed disk new cfcf0c5 added code to accomodate minidesktop versions in local-sessions-config code new cb5fcdd syntaxfix new 2a912be fixed path new 3ef64ed for various reasons (especially fuseext2 misbehaving occasionally and eating up 100% CPU), it makes more sense to check the volume(s) with the PORTABLEAPP label first new 3472989 typofix new 5c146fe for portableapp/tce-hdd dualmode stick, private keys need to go into x2goclient/ssh new ca0877d attempting to fix race condition between 2270 and the minidesktop init scripts new d78d191 another attempt at fixing the private-keys-get-deleted-in-MMD-mode issue new 73d254b Private keys did not get deleted by MMD but by windows portable mode - must not be placed in x2goclient/ssh, or else they will be gone once x2goclient.exe exits. instead, use x2goclient/.ssh, or x2goclient/sshkeys - as .dotfiles and .dotfolders cannot be created in Windows Explorer, only on commandline. new 794f384 add additional symlink so our workaround re:deleted files in portable mode can actually be used from win and lin without changing paths new e340e9d added two font packages new dce43db fixed unneccessary escapes new 9f0a421 added support for synaptics touchpads new 55a7b0c switched to metapackage xserver-xorg-input-all, which should cover all input devices new c9a47d5 turns out that xserver-xorg-input-wacom isn't included in xserver-xorg-input-all. WTF. new 7cdade2 typofix - chmod 700 was chmod 600 by accident new 32cb6b1 (hopefully) fix missing ~/.ssh creation in MATE-MiniDesktop new 8ad7e5f force bash as default system shell new f736114 (temporary?) workaround to switch the default system shell from dash to bash & silence dpkg-reconfigure new afefc03 moving X startup related things from config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig to config/includes.chroot/etc/X11/Xsession.d/60x11-* new 198ae88 added logging to file for audioout=list, plus some whitespace fixes/formatting new c48fca4 Trying to completely do away with .xsession file and use modular /etc/X11/Xsession.d config files instead new b885ce5 added debug code that was only present in feature/openbox-magic-pixel-workaround so far new 6d78b7e typofix new 5dfd0ef another typofix new eec9bbe feh package was missing new 5bb444f fixed download routine for X background images, would not work with multiple URLs new 8c5f78d This adds an initrdblankdpmsfix parameter - as the name suggests, it will trigger the blankdpmsfix early in the initrd already new 31f9dc1 added local non-locking slideshow screensaver new 72dc17e for some silly reason, this file is needed in two places new a4f9e67 typofix new be91c0f silence wget and make it only download newer files than the ones already present new f97a97a typofix, also, silence wget and make it only download newer files than the ones already present new f6b2c9d earlyblankdpmsfix can now be called as earlyblankdpmsfix=nnnn, where nnnn is the time in microseconds that each screen should remain blank new 5d99ae6 changed default sleeptime from 1ms to 1s new 50537ce second copy of file was not chmodded properly (had # in front of path, so never got changed) new 2e9ec9f we need to make sure we don't fire too early - check that at least one symlink matching fb[0-9]* exists new 550566b we need to make sure this script is executable under busybox sh as well, also, no output is desired when run from inside initrd new e83af98 wiggle mouse by 1 px to trigger remote screensaver password prompt new a9c8d50 almost complete rewrite of 60x11-spawn-configure-slideshow-screensaver, as restoring the foreground app(s) didn't work properly new 34c1770 This script would kill the XServer startup when no XSCREENSAVER-related parameters were set. Also, added defaults for idle and slide display/change time new dfa10c7 added support for background images (well, a single image, actually, and no solid colors) via xroot= boot parameter in MATE-MiniDesktop mode new 6767c79 moved X background download to earlier script and renamed 60x11-set-background to 60x11-set-xbackground, to avoid confusion with the X2GoClient branding background image downloader new 90f0c3b typo- and sloppiness-fixes new b82648e removed "dropper" files from /lib/live/config and placed the actual files directly in /etc/network/if-up.d/ new f6720ca typofix new f041405 check if /etc/x2go/x2gothinclient_sessions exists, move to /etc/x2go/x2gothinclient_sessions_old if yes, touch /etc/x2go/x2gothinclient_sessions_old if no new fb4c586 renamed 0050-settime to ntpdate, to overwrite the package-provided ntpdate script new 990abda the move of x2gothinclient_sessions to x2gothinclient_sessions_old must only be triggered when we're touching an external interface, not "loopback" or similar new c5dc9ac changed method of background image display in mate-minidesktop mode new 3dc9b9d reworked 60x11-set-xbackground: URL takes precedence over Hex color; when in minidesktop mode, wait until file has been downloaded before continuing, else wait in background new dc6423c added log output new 6cbb3ba added some sanity checks and debug output new 1d2db69 we need to add the user ("user" or "x2gothinclient") to the group tty early on, to allow on-screen logging on tty8 and tty9 new c27a99e write permission to tty is now handled by a separate script new 01d9a9d background setter for minidesktop must run as root, thus moved to if-up script new 0cc5bcb added mesa-related package; added ATI Rage 128 xorg driver package for i386 to check if it Segfaults X.org on Jessie i386 (it does on Stretch i386) new cfee4a9 r128 driver can go in for amd64 as well new 6d58d6b variable cleanup new bb41f14 further variable cleanup/fixup new 3b2e206 moved screensaver image download to if-up.d where it belongs new b715838 yet another variable fix new 59e6089 usleep uses microseconds, not milliseconds new 1597696 moved detection regarding which sleep command is to be used into the backgrounded task, added comments new 5c51ed6 added new feature for faster shutdown in non-minidesktop mode new 36d7f27 a variable obviously won't work in single quotes new 111f71f aaand another set of quotes - double quotes - is required here ... new 4016850 split 60x11-spawn-configure-pulseaudio into 60x11-spawn-pulseaudio and 60x11-configure-pulseaudio (so we can remove 60x11-spawn-pulseaudio from the minidesktop branches, where it conflicts with MATE) new bef83bb added script to force pulseaudio volume new 6f5ec03 typofix The 108 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: .../etc/X11/Xsession.d/60x11-blanking-dpms-config | 31 +++ .../etc/X11/Xsession.d/60x11-configure-pulseaudio | 28 +++ .../etc/X11/Xsession.d/60x11-configure-xinerama | 58 ++++++ .../X11/Xsession.d/60x11-force-pulseaudio-volume | 25 +++ .../etc/X11/Xsession.d/60x11-openbox-start | 8 + .../etc/X11/Xsession.d/60x11-set-xbackground | 55 +++++ .../60x11-spawn-configure-slideshow-screensaver | 107 ++++++++++ .../etc/X11/Xsession.d/60x11-spawn-pulseaudio | 7 + .../etc/X11/Xsession.d/61x11-start-x2goclient | 103 ++++++++++ .../initramfs-tools/hooks/0000-initrdblankdpmsfix | 32 +++ .../etc/network/if-up.d/0100-show-sysconf | 52 +++++ .../network/if-up.d/0200-getsshpubkeysfromserver | 48 +++++ .../etc/network/if-up.d/0300-getxorgconf | 46 +++++ .../etc/network/if-up.d/0400-getsessions | 53 +++++ .../etc/network/if-up.d/0410-getbranding | 46 +++++ .../includes.chroot/etc/network/if-up.d/0420-getbg | 46 +++++ .../etc/network/if-up.d/0430-getxroot | 63 ++++++ .../etc/network/if-up.d/0440-getxscreensaverimgs | 50 +++++ config/includes.chroot/etc/network/if-up.d/ntpdate | 49 +++++ .../lib/live/config/0000-earlyblankdpmsfix | 39 ++++ .../includes.chroot/lib/live/config/2000-settime | 66 ------ .../lib/live/config/2100-show-sysconf | 68 ------- .../lib/live/config/2210-adduser2tty | 21 ++ .../lib/live/config/2250-getsshpubkeysfromserver | 67 ------- .../lib/live/config/2260-getsshhostkeysfrommedia | 175 +++++++++------- .../lib/live/config/2270-getsshclientkeysfrommedia | 127 +++++++----- .../live/config/2280-x2go-getportableappsessions | 126 ++++++++++++ .../lib/live/config/2300-xserver-xorg-getxorgconf | 59 ------ .../live/config/2500-x2go-getportableappsessions | 23 --- .../includes.chroot/lib/live/config/2600-tcpprint | 8 +- .../lib/live/config/2700-x2go-getsessions | 62 ------ .../lib/live/config/2710-x2go-getbranding | 61 ------ .../lib/live/config/2720-x2go-getbg | 61 ------ .../lib/live/config/2800-x2go-powerbuttonmonitor | 10 +- .../includes.chroot/lib/live/config/2850-dash2bash | 15 ++ .../lib/live/config/2900-x2go-thinclientconfig | 222 +-------------------- config/package-lists/desktop.list.chroot | 3 + config/package-lists/x2go.list.chroot | 2 + config/package-lists/xbgandscreensaver.list.chroot | 2 + config/preseed/dash.cfg.chroot | 1 + 40 files changed, 1311 insertions(+), 814 deletions(-) create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-configure-pulseaudio create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-configure-xinerama create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver create mode 100644 config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-pulseaudio create mode 100644 config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient create mode 100755 config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix create mode 100755 config/includes.chroot/etc/network/if-up.d/0100-show-sysconf create mode 100755 config/includes.chroot/etc/network/if-up.d/0200-getsshpubkeysfromserver create mode 100755 config/includes.chroot/etc/network/if-up.d/0300-getxorgconf create mode 100755 config/includes.chroot/etc/network/if-up.d/0400-getsessions create mode 100755 config/includes.chroot/etc/network/if-up.d/0410-getbranding create mode 100755 config/includes.chroot/etc/network/if-up.d/0420-getbg create mode 100755 config/includes.chroot/etc/network/if-up.d/0430-getxroot create mode 100755 config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs create mode 100755 config/includes.chroot/etc/network/if-up.d/ntpdate create mode 100755 config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix delete mode 100755 config/includes.chroot/lib/live/config/2000-settime delete mode 100755 config/includes.chroot/lib/live/config/2100-show-sysconf create mode 100755 config/includes.chroot/lib/live/config/2210-adduser2tty delete mode 100755 config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver create mode 100755 config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions delete mode 100755 config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf delete mode 100755 config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions delete mode 100755 config/includes.chroot/lib/live/config/2700-x2go-getsessions delete mode 100755 config/includes.chroot/lib/live/config/2710-x2go-getbranding delete mode 100755 config/includes.chroot/lib/live/config/2720-x2go-getbg create mode 100755 config/includes.chroot/lib/live/config/2850-dash2bash create mode 100644 config/package-lists/xbgandscreensaver.list.chroot create mode 100644 config/preseed/dash.cfg.chroot -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5f67f9dd795904b92ce93376521a91d68dddf199 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 27 15:25:06 2018 +0100 this adds "earlyblankdpmxfix" as optional kernel parameter - due to modesetting, certain buggy TFTs turn black early in the boot process (even before X starts). This provides a workaround to un-blank them asap. --- .../lib/live/config/0000-earlyblankdpmsfix | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix new file mode 100755 index 0000000..cd9245d --- /dev/null +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -0,0 +1,24 @@ +#!/bin/bash + +EarlyBlankDPMSFix () +{ + +# Output startup message +# +echo -n " earlyblankdpmsfix" + +# code to fix blank screen happening with DisplayPort and some buggy TFTs (even xset q reports "Monitor is on" even though it is pitch black) +if grep -q '\W*earlyblankdpmsfix\W*' /proc/cmdline; then + ( + while ! ( [ -d /sys/class/graphics ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do + sleep 1 + done + for FBDEVICE in /sys/class/graphics/fb[0-9]*; do + echo 1 > $FBDEVICE/blank + echo 0 > $FBDEVICE/blank + done + ) & +fi +} + +EarlyBlankDPMSFix -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 d2a4a1f2a6f7e062553c96026d88fe655b6005d9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 3 14:28:12 2018 +0100 fixed permissions for ~/.ssh, fixed description for portableapps partition --- .../lib/live/config/2270-getsshclientkeysfrommedia | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 2a7fc00..91f8171 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -40,7 +40,7 @@ GetSSHClientKeysFromMedia () # search for our magic label X2GOTCELIVELABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}' /var/lib/live/config/opensshkeys) - # support for legacy label value + # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) PORTABLEAPPLABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}' /var/lib/live/config/opensshkeys) # block device list, removable first (we want USB media to be able to override keys on fixed disks) @@ -55,7 +55,11 @@ GetSSHClientKeysFromMedia () echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/./ssh'." | tee -a /dev/tty8 # create .ssh-Directory in case it doesn't exist # - mkdir -p $(readlink -m "$USERHOME/.ssh/") + mkdir -p $(readlink -m "$USERHOME/.ssh") + chown $TARGETUSERNAME: \ + $(readlink -m "$USERHOME/.ssh") + chmod 700 $KEYDESTPATH + $(readlink -m "$USERHOME/.ssh") # any keyfile in the config dir will be copied over to live system # -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 9f6ea6b730c240db9f3f1c7db1f2fbf13392881b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 3 15:12:46 2018 +0100 fixed session file location for dual-mode media --- .../lib/live/config/2500-x2go-getportableappsessions | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions index 4e417db..9d14f3f 100755 --- a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions @@ -13,11 +13,15 @@ echo -n " x2go-getportableappsessions" if [ -L /dev/disk/by-label/PORTABLEAPP ]; then mkdir -p /media/PORTABLEAPP && \ - mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ - ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP + if [ -s /media/PORTABLEAPP/x2goclient/sessions ] ; then + ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + elif [ -s /media/PORTABLEAPP/x2goclient/.x2goclient/sessions ] ; then + ln -sf /media/PORTABLEAPP/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions + else + true + fi else true fi -} - X2GoGetPortableAppSessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 ad0c425b5237aa6bcb4319763c90e30ecc188ce1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 01:25:19 2018 +0100 added code to support selection of audio output --- .../lib/live/config/2900-x2go-thinclientconfig | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index d5adaf7..af18f82 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -27,6 +27,35 @@ cat >/home/user/.xsession <<XSESSION # Spawn PulseAudio pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & +AUDIOOUT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^audioout=/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-@|') + +if [ -n "\$AUDIOOUT" ] ; then + if [ "\$AUDIOOUT" = "list" ] ; then + echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 + AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do + pacmd list-cards | \ + more +/"\$CARD" | \ + grep -m 1 "\$CARD" -A100000 | \ + more +/"profiles:" | \ + grep -m 1 -B10000 "active profile:" | \ + grep -A10000 "profiles" | \ + grep "\W\Woutput:" | \ + grep -v "active profile:" | \ + awk -F'[+:]' '{gsub("\t","",$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; + done | \ + sort -u ) + for AUDIOOUTPUT in \$AUDIOOUTPUTS; do + echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 + done + elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then + $(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') + else + : # NOP + fi +fi + # additional variable instead of "case \$(...) in", as we need the value again later on XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }') -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 93e5bd3a75d33475ea556720355ab290ef5c2075 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 3 20:32:41 2018 +0100 typofix --- config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions index 9d14f3f..be9c641 100755 --- a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions @@ -24,4 +24,5 @@ if [ -L /dev/disk/by-label/PORTABLEAPP ]; then else true fi +} X2GoGetPortableAppSessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 eef26a0c3e7b666d46f7bcecae14331a398f7720 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 12:34:04 2018 +0100 fixes missing escape --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index af18f82..de5b03e 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -43,7 +43,7 @@ if [ -n "\$AUDIOOUT" ] ; then grep -A10000 "profiles" | \ grep "\W\Woutput:" | \ grep -v "active profile:" | \ - awk -F'[+:]' '{gsub("\t","",$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; + awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; done | \ sort -u ) for AUDIOOUTPUT in \$AUDIOOUTPUTS; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 3a62cabcb61a00546077dd0dc313155b2e506579 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 12:44:38 2018 +0100 fixed indentation error --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 91f8171..8def2b4 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -102,7 +102,7 @@ GetSSHClientKeysFromMedia () else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 if grep -q "^0$" /sys/block/*/removable ; then - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 3cd69e56dcf41f8982090164bcbcb83c0146b57e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 12:44:08 2018 +0100 fixed indentation error --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index ae1e5fb..636a145 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -99,7 +99,7 @@ GetSSHHostKeysFromMedia () else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 if grep -q "^0$" /sys/block/*/removable ; then - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 93322eb0f300626bef4c2130ec68537650603baf Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 13:03:04 2018 +0100 removable device detection was broken --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 636a145..8f2add2 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -98,7 +98,7 @@ GetSSHHostKeysFromMedia () fi else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 - if grep -q "^0$" /sys/block/*/removable ; then + if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 8def2b4..5e60ed2 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -101,7 +101,7 @@ GetSSHClientKeysFromMedia () fi else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 - if grep -q "^0$" /sys/block/*/removable ; then + if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 9a2d1d4b0296cffd179f8bb7bbf7e95bed1d6004 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 16:49:03 2018 +0100 added active audio profile output, moved audio block to end of file so pulseaudio has more time to start up --- .../lib/live/config/2900-x2go-thinclientconfig | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index de5b03e..bec11dd 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -31,31 +31,6 @@ AUDIOOUT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's awk -F'=' ' /^audioout=/ { print \$2 }' | \ tr -dc 'a-zA-Z0-9.:_\-@|') -if [ -n "\$AUDIOOUT" ] ; then - if [ "\$AUDIOOUT" = "list" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 - AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do - pacmd list-cards | \ - more +/"\$CARD" | \ - grep -m 1 "\$CARD" -A100000 | \ - more +/"profiles:" | \ - grep -m 1 -B10000 "active profile:" | \ - grep -A10000 "profiles" | \ - grep "\W\Woutput:" | \ - grep -v "active profile:" | \ - awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; - done | \ - sort -u ) - for AUDIOOUTPUT in \$AUDIOOUTPUTS; do - echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 - done - elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - $(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') - else - : # NOP - fi -fi - # additional variable instead of "case \$(...) in", as we need the value again later on XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }') @@ -261,6 +236,32 @@ if [ -n "\$BLANKINGTIME" ]; then fi fi +if [ -n "\$AUDIOOUT" ] ; then + if [ "\$AUDIOOUT" = "list" ] ; then + echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 + AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do + pacmd list-cards | \ + more +/"\$CARD" | \ + grep -m 1 "\$CARD" -A100000 | \ + more +/"profiles:" | \ + grep -m 1 -B10000 "active profile:" | \ + grep -A10000 "profiles" | \ + grep "\W\Woutput:" | \ + grep -v "active profile:" | \ + awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; + done | \ + sort -u ) + for AUDIOOUTPUT in \$AUDIOOUTPUTS; do + echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 + done + echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 + elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then + $(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') + else + : # NOP + fi +fi + eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 48df119d076fbe977f92a6d82c6e287749018b9e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 17:17:33 2018 +0100 fixed missing escape --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index bec11dd..5ae5d71 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -256,7 +256,7 @@ if [ -n "\$AUDIOOUT" ] ; then done echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - $(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') + \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') else : # NOP fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 c296df95de4dcb3c8e36b8e5da2385fa39629210 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 17:23:34 2018 +0100 removed unneccessary quotation marks --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 5ae5d71..ccc5360 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -256,7 +256,7 @@ if [ -n "\$AUDIOOUT" ] ; then done echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile "/' -e 's/\$/"/' -e 's/|/" "/') + \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') else : # NOP fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 7658766773782faab77ad8a41055ef9529c7ce26 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 4 17:57:15 2018 +0100 make sure pulseaudio is responding before pacmd fires --- .../lib/live/config/2900-x2go-thinclientconfig | 50 ++++++++++++---------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index ccc5360..6939b68 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -237,29 +237,35 @@ if [ -n "\$BLANKINGTIME" ]; then fi if [ -n "\$AUDIOOUT" ] ; then - if [ "\$AUDIOOUT" = "list" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 - AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do - pacmd list-cards | \ - more +/"\$CARD" | \ - grep -m 1 "\$CARD" -A100000 | \ - more +/"profiles:" | \ - grep -m 1 -B10000 "active profile:" | \ - grep -A10000 "profiles" | \ - grep "\W\Woutput:" | \ - grep -v "active profile:" | \ - awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; - done | \ - sort -u ) - for AUDIOOUTPUT in \$AUDIOOUTPUTS; do - echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 + ( + while ! pacmd dump 2>&1| grep -q set-card-profile ; do + echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for pulseaudio to start ..." | tee -a /dev/tty8 + sleep 1 done - echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 - elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') - else - : # NOP - fi + if [ "\$AUDIOOUT" = "list" ] ; then + echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 + AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do + pacmd list-cards | \ + more +/"\$CARD" | \ + grep -m 1 "\$CARD" -A100000 | \ + more +/"profiles:" | \ + grep -m 1 -B10000 "active profile:" | \ + grep -A10000 "profiles" | \ + grep "\W\Woutput:" | \ + grep -v "active profile:" | \ + awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; + done | \ + sort -u ) + for AUDIOOUTPUT in \$AUDIOOUTPUTS; do + echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 + done + echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 + elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then + \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') + else + : # NOP + fi + ) & fi eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 ab0e03d9da41680f2309e638c38c5f90933689ec Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 10:45:37 2018 +0100 nudging the automounter isn't necessary, and actually doesn't work here (udevd most likely isn't running yet) --- .../includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 8f2add2..965bdad 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -12,13 +12,6 @@ GetSSHHostKeysFromMedia () sleep 2 done - # nudge automounter, in case device was already plugged in at power-up - if udevadm trigger --action=add ; then - echo -n "\n$(date +'%F | %T | ')'$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 - else - echo -n "\n$(date +'%F | %T | ')'$0' Error while nudging udev-automounter." | tee -a /dev/tty8 - fi - # list devices (and mountpoints, if present) LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT -l) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 d6a40aa700b7b854ba36360de6cf286e04f340b9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:43:26 2018 +0100 moved function to top of code block where it belongs, and also fixed indentation --- .../lib/live/config/2260-getsshhostkeysfrommedia | 111 +++++++++++---------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 81d9af3..6cd58e0 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -7,6 +7,62 @@ GetSSHHostKeysFromMedia () # echo -n " getsshhostkeysfrommedia" ( + check_for_config (){ + if [ -d $1/config/sshdkeys ] ; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/sshdkeys'." | tee -a /dev/tty8 + # any keyfile in the config dir will be copied over to live system + for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do + [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 + if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then + chmod 644 /etc/ssh/$(basename $KEYFILE) + else + chmod 600 /etc/ssh/$(basename $KEYFILE) + fi + done + # no keys present (as detected by flag not being set), but directory is there? Store keys. + if [ -z "$KEYFLAG" ] ; then + echo -n "\n$(date +'%F | %T | ')'$0' No keyfiles were found in the keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + ssh-keygen -A # make sure we have keyfiles for every key the server expects + echo -n "\n$(date +'%F | %T | ')'$0' Attempting to copy current keyfiles to keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + if awk '$2=="'$1'" {print $4 }' /proc/mounts | tr ',' '\n' | grep -q '^ro$' ; then + echo -n "\n$(date +'%F | %T | ')'$0' Attempting to remount '$1' with flags rw and sync." | tee -a /dev/tty8 + if mount -oremount,rw,sync $1 ; then + echo -n "\n$(date +'%F | %T | ')'$0' Successfully remounted '$1'." | tee -a /dev/tty8 + REMOUNT="rws" + else + echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1'." | tee -a /dev/tty8 + fi + fi + if ([ -z "$REMOUNT" ] || [ "$REMOUNT" = "rws" ]) && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ ; then + echo -n "\n$(date +'%F | %T | ')'$0' Copying keyfiles succeeded." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error copying keyfiles." | tee -a /dev/tty8 + fi + if [ -n "$REMOUNT" ] && mount -oremount,ro $1 ; then + echo -n "\n$(date +'%F | %T | ')'$0' Remounted '$1' read-only." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1' read-only." | tee -a /dev/tty8 + fi + + else + if ps -C sshd >/dev/null 2>&1 ; then + # reload sshd config + echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 + if service ssh reload ; then + echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8 + fi + else + echo -n "\n$(date +'%F | %T | ')'$0' sshd not running (yet), so no reloading required." | tee -a /dev/tty8 + fi + fi + return 0 + else + return 1 + fi + } + while ! [ -c /dev/tty8 ] ; do echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 @@ -29,61 +85,6 @@ GetSSHHostKeysFromMedia () # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}') $(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" - check_for_config (){ - if [ -d $1/config/sshdkeys ] ; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/sshdkeys'." | tee -a /dev/tty8 - # any keyfile in the config dir will be copied over to live system - for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do - [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 - if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then - chmod 644 /etc/ssh/$(basename $KEYFILE) - else - chmod 600 /etc/ssh/$(basename $KEYFILE) - fi - done - # no keys present (as detected by flag not being set), but directory is there? Store keys. - if [ -z "$KEYFLAG" ] ; then - echo -n "\n$(date +'%F | %T | ')'$0' No keyfiles were found in the keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 - ssh-keygen -A # make sure we have keyfiles for every key the server expects - echo -n "\n$(date +'%F | %T | ')'$0' Attempting to copy current keyfiles to keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 - if awk '$2=="'$1'" {print $4 }' /proc/mounts | tr ',' '\n' | grep -q '^ro$' ; then - echo -n "\n$(date +'%F | %T | ')'$0' Attempting to remount '$1' with flags rw and sync." | tee -a /dev/tty8 - if mount -oremount,rw,sync $1 ; then - echo -n "\n$(date +'%F | %T | ')'$0' Successfully remounted '$1'." | tee -a /dev/tty8 - REMOUNT="rws" - else - echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1'." | tee -a /dev/tty8 - fi - fi - if ([ -z "$REMOUNT" ] || [ "$REMOUNT" = "rws" ]) && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ ; then - echo -n "\n$(date +'%F | %T | ')'$0' Copying keyfiles succeeded." | tee -a /dev/tty8 - else - echo -n "\n$(date +'%F | %T | ')'$0' Error copying keyfiles." | tee -a /dev/tty8 - fi - if [ -n "$REMOUNT" ] && mount -oremount,ro $1 ; then - echo -n "\n$(date +'%F | %T | ')'$0' Remounted '$1' read-only." | tee -a /dev/tty8 - else - echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1' read-only." | tee -a /dev/tty8 - fi - - else - if ps -C sshd >/dev/null 2>&1 ; then - # reload sshd config - echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 - if service ssh reload ; then - echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8 - else - echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8 - fi - else - echo -n "\n$(date +'%F | %T | ')'$0' sshd not running (yet), so no reloading required." | tee -a /dev/tty8 - fi - fi - return 0 - else - return 1 - fi - } # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6db8f4b105a0e8dd2f45ade2bad28b782ade6830 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:41:58 2018 +0100 changed how BLOCKDEVS list is created, added various comments to make code more readable/understandable --- .../lib/live/config/2260-getsshhostkeysfrommedia | 38 +++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 965bdad..81d9af3 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -11,15 +11,23 @@ GetSSHHostKeysFromMedia () echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 done + while ! service udev status >/dev/null; do + echo -n "\n$(date +'%F | %T | ')'$0' Waiting for udev to start ..." | tee -a /dev/tty8 + sleep 1; + done + while ! udevadm settle; do + echo -n "\n$(date +'%F | %T | ')'$0' Waiting for udev to process all events ..." | tee -a /dev/tty8 + sleep 1; + done # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT -l) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) # search for our magic label - X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) - BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort | awk -F'/' '{print $4}') + BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}') $(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" check_for_config (){ if [ -d $1/config/sshdkeys ] ; then @@ -77,37 +85,59 @@ GetSSHHostKeysFromMedia () fi } + # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do + # check if it also appears in the list of devices carrying our magic label + # this should always be the case since we changed how BLOCKDEVS is assembled NEXTDEVICE=$(echo "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then + # now figure out the mountpoint MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + # and the device name? Wait, this is the magic label instead. NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') if [ -n "$MNTPT" ] ; then + # If the mountpoint variable isn't empty, it means the device is already mounted. echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + # so let's check if we have a config directory at that mountpoint. if check_for_config $MNTPT ; then + # if we managed to pull a config off of it (or save one on it), we make a note of this ... echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys + # and quit right here. exit 0 fi else + # So there's no active mount for the device with our magic label ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + # let's see if this is a fixed disk. if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + # yes, it is, so let's go ahead and try to mount it ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + # obviously, we need a mountpoint for it ... mkdir -p /media/fixeddisks/$NEXTDEVICE + # and now we can try to mount it. Let's do it in readonly mode, just to play it safe. + # a read-write remount is only attempted within check_for_config if it finds an empty + # sshd keys directory. mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + # If we managed to pull a config off of it (or save one on it), ... if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + # we umount, then make a note that we succeeded ... umount /media/fixeddisks/$NEXTDEVICE echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys + # and quit right here. exit 0 fi + # If we didn't succeed in pulling a config, we still need to umount what we mounted. umount /media/fixeddisks/$NEXTDEVICE else + # If a removable disk hasn't been mounted by the automounter, something's amiss and we shouldn't try to meddle with it. + # So let's make a note of this and move on. echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 - : fi fi fi done + # Now let's leave a mark saying that we're done, so the next script can pick up on it. echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys ) & } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 7bad1e9487980b6d7b11fbed0e3212ac88bc5d49 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:44:28 2018 +0100 removed unnecessary newline --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 6cd58e0..d391be0 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -85,7 +85,6 @@ GetSSHHostKeysFromMedia () # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}') $(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" - # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do # check if it also appears in the list of devices carrying our magic label -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 9dfb323732e835a39a9bbdeaaa8e67ab82935865 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:53:30 2018 +0100 added newline character - it should work with the blank that previously stood in its place, but let's play it safe ... --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index d391be0..ec4ac3b 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -83,7 +83,7 @@ GetSSHHostKeysFromMedia () X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) - BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}') $(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" + BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}')\n$(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 2a621f0464378f325e94ca7d2305d0f55d8d16ae Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:48:15 2018 +0100 removed old debug code --- .../includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 5e60ed2..2fa3ba7 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -44,10 +44,8 @@ GetSSHClientKeysFromMedia () PORTABLEAPPLABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}' /var/lib/live/config/opensshkeys) # block device list, removable first (we want USB media to be able to override keys on fixed disks) - BLOCKDEVLOOPCOUNT=0 # this is for debugging/logging; it seems the blockdevs list is empty on Debian stretch while [ -z "$BLOCKDEVS" ] ; do BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') - BLOCKDEVLOOPCOUNT=$((BLOCKDEVLOOPCOUNT+1)) done check_for_config (){ @@ -118,8 +116,7 @@ GetSSHClientKeysFromMedia () fi fi done - echo "BLOCKDEVLOOPCOUNT: '$BLOCKDEVLOOPCOUNT'" > /var/lib/live/config/opensshclientkeys - echo "BLOCKDEVS: '$BLOCKDEVS'" >> /var/lib/live/config/opensshclientkeys + echo "BLOCKDEVS: '$BLOCKDEVS'" > /var/lib/live/config/opensshclientkeys echo "X2GOTCELIVELABELS: '$X2GOTCELIVELABELS'" >> /var/lib/live/config/opensshclientkeys echo "PORTABLEAPPLABELS: '$PORTABLEAPPLABELS'" >> /var/lib/live/config/opensshclientkeys ) & -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6ec73005a6cb866b236d08f22a55d09822ff1926 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:55:20 2018 +0100 changed how BLOCKDEVS list is created --- .../lib/live/config/2270-getsshclientkeysfrommedia | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 2fa3ba7..492ee17 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -38,15 +38,13 @@ GetSSHClientKeysFromMedia () fi # search for our magic label - X2GOTCELIVELABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}' /var/lib/live/config/opensshkeys) + X2GOTCELIVELABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4 }' /var/lib/live/config/opensshkeys) # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) - PORTABLEAPPLABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}' /var/lib/live/config/opensshkeys) + PORTABLEAPPLABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4 }' /var/lib/live/config/opensshkeys) # block device list, removable first (we want USB media to be able to override keys on fixed disks) - while [ -z "$BLOCKDEVS" ] ; do - BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') - done + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" check_for_config (){ if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 a8afba5d2899685682f5757f29d1bf73bf1e9cf6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 12:19:15 2018 +0100 fixed error related to chmod, changed *LABEL* mechanism to the one used by 2260-getsshhostkeysfrommedia,added various comments to make code more readable/understandable --- .../lib/live/config/2270-getsshclientkeysfrommedia | 32 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 8090eee..a04800d 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -23,7 +23,7 @@ GetSSHClientKeysFromMedia () mkdir -p $(readlink -m "$USERHOME/.ssh") chown $TARGETUSERNAME: \ $(readlink -m "$USERHOME/.ssh") - chmod 700 $KEYDESTPATH + chmod 700 \ $(readlink -m "$USERHOME/.ssh") # any keyfile in the config dir will be copied over to live system @@ -74,46 +74,68 @@ GetSSHClientKeysFromMedia () TARGETUSERNAME="x2gothinclient" fi - # search for our magic label - X2GOTCELIVELABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4 }' /var/lib/live/config/opensshkeys) + # list devices (and mountpoints, if present) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) + + # search for our magic label + X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) - PORTABLEAPPLABELS=$(awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4 }' /var/lib/live/config/opensshkeys) + PORTABLEAPPLABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override keys on fixed disks) BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" + # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do + # check if it also appears in the list of devices carrying our magic label + # this should always be the case since we changed how BLOCKDEVS is assembled NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then + # now figure out the mountpoint MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + # and the device name? Wait, this is the magic label instead. NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') echo -n "\n$(date +'%F | %T | ')'$0' Checking status of Device '$NEXTDEVICE' for BLOCKDEV '$BLOCKDEV'." | tee -a /dev/tty8 if [ -n "$MNTPT" ] ; then + # If the mountpoint variable isn't empty, it means the device is already mounted. echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + # so let's check if we have a config directory at that mountpoint. if check_for_config $MNTPT ; then + # if we managed to pull a config off of it (or save one on it), we make a note of this ... touch /var/lib/live/config/opensshclientkeys + # and quit right here. exit 0 fi else + # So there's no active mount for the device with our magic label ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + # let's see if this is a fixed disk. if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + # yes, it is, so let's go ahead and try to mount it ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + # obviously, we need a mountpoint for it ... mkdir -p /media/fixeddisks/$NEXTDEVICE + # and now we can try to mount it. Let's do it in readonly mode, just to play it safe. mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + # we umount, then make a note that we succeeded ... umount /media/fixeddisks/$NEXTDEVICE touch /var/lib/live/config/opensshclientkeys + # and quit right here. exit 0 fi + # If we didn't succeed in pulling a config, we still need to umount what we mounted. umount /media/fixeddisks/$NEXTDEVICE else + # If a removable disk hasn't been mounted by the automounter, something's amiss and we shouldn't try to meddle with it. + # So let's make a note of this and move on. echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 - : fi fi fi done + # Now let's leave a mark saying that we're done, so the next script can pick up on it. echo "BLOCKDEVS: '$BLOCKDEVS'" > /var/lib/live/config/opensshclientkeys echo "X2GOTCELIVELABELS: '$X2GOTCELIVELABELS'" >> /var/lib/live/config/opensshclientkeys echo "PORTABLEAPPLABELS: '$PORTABLEAPPLABELS'" >> /var/lib/live/config/opensshclientkeys -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 79d1787cc729306b4db888bdcd82772da68130f0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 11:57:21 2018 +0100 moved function to top of code block where it belongs, and also fixed indentation --- .../lib/live/config/2270-getsshclientkeysfrommedia | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 492ee17..8090eee 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -15,6 +15,43 @@ GetSSHClientKeysFromMedia () # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions. # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. + check_for_config (){ + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/./ssh'." | tee -a /dev/tty8 + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh") + chown $TARGETUSERNAME: \ + $(readlink -m "$USERHOME/.ssh") + chmod 700 $KEYDESTPATH + $(readlink -m "$USERHOME/.ssh") + + # any keyfile in the config dir will be copied over to live system + # + for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do + ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue + egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8 + KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" + touch "$KEYDESTPATH" + chown $TARGETUSERNAME: \ + $KEYDESTPATH + chmod 600 $KEYDESTPATH + cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + + done + + # this is so the path name in the sessions file matches again + # (cannot use .ssh on FAT, for example) + # + ln -s $USERHOME/.ssh $USERHOME/ssh + + return 0 + else + return 1 + fi + } + while ! [ -c /dev/tty8 ] ; do echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 @@ -46,43 +83,6 @@ GetSSHClientKeysFromMedia () # block device list, removable first (we want USB media to be able to override keys on fixed disks) BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" - check_for_config (){ - if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/./ssh'." | tee -a /dev/tty8 - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$USERHOME/.ssh") - chown $TARGETUSERNAME: \ - $(readlink -m "$USERHOME/.ssh") - chmod 700 $KEYDESTPATH - $(readlink -m "$USERHOME/.ssh") - - # any keyfile in the config dir will be copied over to live system - # - for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do - ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue - egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8 - KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" - touch "$KEYDESTPATH" - chown $TARGETUSERNAME: \ - $KEYDESTPATH - chmod 600 $KEYDESTPATH - cat $(readlink -m "$KEYFILE")>$KEYDESTPATH - - done - - # this is so the path name in the sessions file matches again - # (cannot use .ssh on FAT, for example) - # - ln -s $USERHOME/.ssh $USERHOME/ssh - - return 0 - else - return 1 - fi - } - for BLOCKDEV in $BLOCKDEVS; do NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 32c61bf2929b61a079deff0dfb59778f123bf9f0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 00:35:55 2018 +0100 moved getportableappsessions right behind the other scripts that mount devices --- ...{2500-x2go-getportableappsessions => 2280-x2go-getportableappsessions} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions similarity index 100% rename from config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions rename to config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 95d80544b937352db9cf20ad28853f07d03a8948 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Feb 6 15:55:40 2018 +0100 fixed bashisms, quoting, whitespace issues --- .../lib/live/config/2260-getsshhostkeysfrommedia | 10 +++++----- .../lib/live/config/2270-getsshclientkeysfrommedia | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index ec4ac3b..c5f4594 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -80,10 +80,10 @@ GetSSHHostKeysFromMedia () LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) # search for our magic label - X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) - BLOCKDEVS="$(echo $X2GOTCELIVELABELS | awk '$3 == "0" {print $2}')\n$(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')" + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$3 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$3 == "1" {print $2}' )" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do @@ -102,7 +102,7 @@ GetSSHHostKeysFromMedia () # so let's check if we have a config directory at that mountpoint. if check_for_config $MNTPT ; then # if we managed to pull a config off of it (or save one on it), we make a note of this ... - echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys + echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys # and quit right here. exit 0 fi @@ -123,7 +123,7 @@ GetSSHHostKeysFromMedia () if check_for_config /media/fixeddisks/$NEXTDEVICE ; then # we umount, then make a note that we succeeded ... umount /media/fixeddisks/$NEXTDEVICE - echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys + echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys # and quit right here. exit 0 fi @@ -138,7 +138,7 @@ GetSSHHostKeysFromMedia () fi done # Now let's leave a mark saying that we're done, so the next script can pick up on it. - echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys + echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys ) & } diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index a04800d..4c8672e 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -78,10 +78,10 @@ GetSSHClientKeysFromMedia () LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) # search for our magic label - X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) - PORTABLEAPPLABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') + PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override keys on fixed disks) BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 1537d97814cd13a4926b5f20ba263e7bca9ad24a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Feb 7 23:49:52 2018 +0100 udevadm settle is already running due to the udev service startup. Spawning a second copy causes the second copy to terminate immediately as if there were no open events - which breaks our loop. So instead, we need to monitor when the first/only instance terminates. --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index c5f4594..acd6ddf 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -71,7 +71,7 @@ GetSSHHostKeysFromMedia () echo -n "\n$(date +'%F | %T | ')'$0' Waiting for udev to start ..." | tee -a /dev/tty8 sleep 1; done - while ! udevadm settle; do + while ps --no-header -C udevadm | grep -q udevadm ; do echo -n "\n$(date +'%F | %T | ')'$0' Waiting for udev to process all events ..." | tee -a /dev/tty8 sleep 1; done -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 32e735a85801112856c7834c8ebabf91886a8063 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 00:56:16 2018 +0100 adapted 2280-x2go-getportableappsessions to work more like 2270-getsshclientkeysfrommedia --- .../live/config/2280-x2go-getportableappsessions | 123 +++++++++++++++++---- 1 file changed, 102 insertions(+), 21 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index be9c641..873345b 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -3,26 +3,107 @@ X2GoGetPortableAppSessions () { -# Output startup message -# -echo -n " x2go-getportableappsessions" - -# This script is for using the iso-hybrid image along with the "second partition" patch -# it allows you to share a configuration between X2GoClient for Windows in portable -# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions - -if [ -L /dev/disk/by-label/PORTABLEAPP ]; then - mkdir -p /media/PORTABLEAPP && \ - mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP - if [ -s /media/PORTABLEAPP/x2goclient/sessions ] ; then - ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions - elif [ -s /media/PORTABLEAPP/x2goclient/.x2goclient/sessions ] ; then - ln -sf /media/PORTABLEAPP/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions - else - true - fi -else - true -fi + # Output startup message + # + echo -n " x2go-getportableappsessions" + + ( + # This script is for using the iso-hybrid image along with the "second partition" patch + # it allows you to share a configuration between X2GoClient for Windows in portable + # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + + check_for_config (){ + if [ -s /media/PORTABLEAPP/x2goclient/sessions ] ; then + ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + elif [ -s /media/PORTABLEAPP/x2goclient/.x2goclient/sessions ] ; then + ln -sf /media/PORTABLEAPP/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions + else + true + fi + + } + + while ! [ -c /dev/tty8 ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + + # always wait for getsshhostkeysfrommedia (config/opensshkeys) + while ! [ -e /var/lib/live/config/opensshkeys ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for getsshhostkeysfrommedia to finish." + sleep 2 + done + + # if copysecring is set, also wait for getsshclientkeysfrommedia (config/opensshclientkeys) + if grep -q "\W*copysecring\W*" /proc/cmdline ; then + while ! [ -e /var/lib/live/config/opensshclientkeys ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for getsshclientkeysfrommedia to finish." + sleep 2 + done + + fi + + # list devices (and mountpoints, if present) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) + + # search for our magic label + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + + # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) + PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') + + # block device list, removable first (we want USB media to be able to override keys on fixed disks) + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" + + # for every block device in our list, do ... + for BLOCKDEV in $BLOCKDEVS; do + # check if it also appears in the list of devices carrying our magic label + # this should always be the case since we changed how BLOCKDEVS is assembled + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + # now figure out the mountpoint + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + # and the device name? Wait, this is the magic label instead. + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + echo -n "\n$(date +'%F | %T | ')'$0' Checking status of Device '$NEXTDEVICE' for BLOCKDEV '$BLOCKDEV'." | tee -a /dev/tty8 + if [ -n "$MNTPT" ] ; then + # If the mountpoint variable isn't empty, it means the device is already mounted. + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + # so let's check if we have a config directory at that mountpoint. + if check_for_config $MNTPT ; then + # if we managed to pull a config off of it (or save one on it), we make a note of this ... + touch /var/lib/live/config/opensshclientkeys + # and quit right here. + exit 0 + fi + else + # So there's no active mount for the device with our magic label ... + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + # let's see if this is a fixed disk. + if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + # yes, it is, so let's go ahead and try to mount it ... + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + # obviously, we need a mountpoint for it ... + mkdir -p /media/fixeddisks/$NEXTDEVICE + # and now we can try to mount it. Let's do it in readonly mode, just to play it safe. + mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + # we umount, then make a note that we succeeded ... + umount /media/fixeddisks/$NEXTDEVICE + touch /var/lib/live/config/opensshclientkeys + # and quit right here. + exit 0 + fi + # If we didn't succeed in pulling a config, we still need to umount what we mounted. + umount /media/fixeddisks/$NEXTDEVICE + else + # If a removable disk hasn't been mounted by the automounter, something's amiss and we shouldn't try to meddle with it. + # So let's make a note of this and move on. + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 + fi + fi + fi + done + ) & } X2GoGetPortableAppSessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 a253a0259998e8af0b737177bec75ec4c8e2da99 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 10:07:00 2018 +0100 un-hardcoded path --- .../lib/live/config/2280-x2go-getportableappsessions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 873345b..b3ea1a7 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -13,10 +13,10 @@ X2GoGetPortableAppSessions () # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions check_for_config (){ - if [ -s /media/PORTABLEAPP/x2goclient/sessions ] ; then - ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions - elif [ -s /media/PORTABLEAPP/x2goclient/.x2goclient/sessions ] ; then - ln -sf /media/PORTABLEAPP/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions + if [ -s $1/x2goclient/sessions ] ; then + ln -sf $1/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + elif [ -s $1/x2goclient/.x2goclient/sessions ] ; then + ln -sf $1/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions else true fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6b2de453dcbdb082398b765831c5a63eb11b26a1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 14:05:00 2018 +0100 fixed "touch" file name --- .../includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index b3ea1a7..cedd90a 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -72,7 +72,7 @@ X2GoGetPortableAppSessions () # so let's check if we have a config directory at that mountpoint. if check_for_config $MNTPT ; then # if we managed to pull a config off of it (or save one on it), we make a note of this ... - touch /var/lib/live/config/opensshclientkeys + touch /var/lib/live/config/x2goportableappsessions # and quit right here. exit 0 fi @@ -90,7 +90,7 @@ X2GoGetPortableAppSessions () if check_for_config /media/fixeddisks/$NEXTDEVICE ; then # we umount, then make a note that we succeeded ... umount /media/fixeddisks/$NEXTDEVICE - touch /var/lib/live/config/opensshclientkeys + touch /var/lib/live/config/x2goportableappsessions # and quit right here. exit 0 fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 0977bee64bcbd74058e5f73cbec23d2c844950d0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 9 00:34:22 2018 +0100 exchanged HOTPLUG for RM (REMOVABLE), as lsblk in jessie doesn't understand the HOTPLUG parameter, but RM does what we want --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index acd6ddf..dc5ddd6 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -77,7 +77,7 @@ GetSSHHostKeysFromMedia () done # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) # search for our magic label X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 4c8672e..97345d0 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -75,7 +75,7 @@ GetSSHClientKeysFromMedia () fi # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) # search for our magic label X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 659535e..dc45e39 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -46,7 +46,7 @@ X2GoGetPortableAppSessions () fi # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln) + LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) # search for our magic label X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 974c58a3fe648dc0d5bf1afdb3f009be302109b4 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 14:09:26 2018 +0100 fixed purpose description in comments --- .../includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index d352181..183fa89 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -49,10 +49,10 @@ X2GoGetPortableAppSessions () # search for our magic label X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') - # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) + # support for second label value (for dual-mode media where config is stored on the windows-readable partition) PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') - # block device list, removable first (we want USB media to be able to override keys on fixed disks) + # block device list, removable first (we want USB media to be able to override configs on fixed disks) BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" # for every block device in our list, do ... -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 cb7dcfcf55b6371fcffead3d7de54035d0373fab Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 14:07:13 2018 +0100 removed umount in case of success, changed ro mount to rw --- .../lib/live/config/2280-x2go-getportableappsessions | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index cedd90a..d352181 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -85,11 +85,10 @@ X2GoGetPortableAppSessions () echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 # obviously, we need a mountpoint for it ... mkdir -p /media/fixeddisks/$NEXTDEVICE - # and now we can try to mount it. Let's do it in readonly mode, just to play it safe. - mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + # and now we can try to mount it. Needs to be in rw mode, as in minidesktop mode, people might want to try to save back changes. + mount -/dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then - # we umount, then make a note that we succeeded ... - umount /media/fixeddisks/$NEXTDEVICE + # if we managed to pull a config off of it (or save one on it), we make a note of this ... touch /var/lib/live/config/x2goportableappsessions # and quit right here. exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 9e8b42fb9e6d18e47aad6cd717dc485fa3daa666 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 8 14:15:26 2018 +0100 added/fixed return codes of check_for_config --- .../includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 183fa89..659535e 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -15,10 +15,12 @@ X2GoGetPortableAppSessions () check_for_config (){ if [ -s $1/x2goclient/sessions ] ; then ln -sf $1/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + return 0 elif [ -s $1/x2goclient/.x2goclient/sessions ] ; then ln -sf $1/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions + return 0 else - true + return 1 fi } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 e92695807bab2758f80a0f48bb4484e300a4a215 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 00:32:39 2018 +0100 one line of debug output was missing in 2260 --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 1978f2e..c76d481 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -95,7 +95,7 @@ GetSSHHostKeysFromMedia () MNTPT=$(echo $NEXTDEVICE | awk '{print $3}') # and the device name NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $2}') - + echo -n "\n$(date +'%F | %T | ')'$0' Checking status of Device '$NEXTDEVICE' for BLOCKDEV '$BLOCKDEV'." | tee -a /dev/tty8 if [ -n "$MNTPT" ] ; then # If the mountpoint variable isn't empty, it means the device is already mounted. echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | 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
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 a236e80e67d68c664b28776e71b1b65dc14cd59e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 16:50:54 2018 +0100 added support for x2go session config stored on fixed disk --- .../includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 5a807a3..48a7ca2 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -19,6 +19,9 @@ X2GoGetPortableAppSessions () elif [ -s $1/x2goclient/.x2goclient/sessions ] ; then ln -sf $1/x2goclient/.x2goclient/sessions /etc/x2go/x2gothinclient_sessions return 0 + elif [ -s $1/config/x2goclient/sessions ] ; then + ln -sf $1/config/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + return 0 else return 1 fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 e85df5c5c648bf6fd85adf15234cc74b0273cf24 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 14:07:59 2018 +0100 typofix --- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 76ee95b..5a807a3 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -88,7 +88,7 @@ X2GoGetPortableAppSessions () # obviously, we need a mountpoint for it ... mkdir -p /media/fixeddisks/$NEXTDEVICE # and now we can try to mount it. Needs to be in rw mode, as in minidesktop mode, people might want to try to save back changes. - mount -/dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then # if we managed to pull a config off of it (or save one on it), we make a note of this ... touch /var/lib/live/config/x2goportableappsessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 b140c1cb63a01ca5b0faae520abbc0e6a7148c5b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 9 22:08:43 2018 +0100 last changes broke routines that check fixed disks for our magic label(s), mount them, and "do the needful" with them. This commit should fix this. --- .../lib/live/config/2260-getsshhostkeysfrommedia | 12 ++++++------ .../lib/live/config/2270-getsshclientkeysfrommedia | 8 ++++---- .../lib/live/config/2280-x2go-getportableappsessions | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index dc5ddd6..d7f1071 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -76,14 +76,14 @@ GetSSHHostKeysFromMedia () sleep 1; done - # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) + # list devices (and mountpoints, if present) + LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln) - # search for our magic label - X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + # search for our magic label + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') - # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) - BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$3 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$3 == "1" {print $2}' )" + # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$1 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$1 == "1" {print $2}' )" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 97345d0..0170290 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -75,16 +75,16 @@ GetSSHClientKeysFromMedia () fi # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) + LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln) # search for our magic label - X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # support for second label value (for dual-mode media where keys are stored on the windows-readable partition) - PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') + PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override keys on fixed disks) - BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index dc45e39..61dee77 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -46,16 +46,16 @@ X2GoGetPortableAppSessions () fi # list devices (and mountpoints, if present) - LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln) + LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln) # search for our magic label - X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') + X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}') # support for second label value (for dual-mode media where config is stored on the windows-readable partition) - PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}') + PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override configs on fixed disks) - BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')" + BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 7ef5b46bb9e40c10db56fccbf4d723479868eb47 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 10 14:14:57 2018 +0100 lsblk output is parsed again later on, which means that this later code block needed to be changed as well, so it understands the new output order (Removable/Fixed Disk on 2nd, rather than 4th position) --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 6 +++--- .../includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 6 +++--- .../lib/live/config/2280-x2go-getportableappsessions | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index d7f1071..3f047ab 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -92,9 +92,9 @@ GetSSHHostKeysFromMedia () NEXTDEVICE=$(echo "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then # now figure out the mountpoint - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - # and the device name? Wait, this is the magic label instead. - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + MNTPT=$(echo $NEXTDEVICE | awk '{print $3}') + # and the device name + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $2}') if [ -n "$MNTPT" ] ; then # If the mountpoint variable isn't empty, it means the device is already mounted. diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 0170290..6be457c 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -93,9 +93,9 @@ GetSSHClientKeysFromMedia () NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then # now figure out the mountpoint - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - # and the device name? Wait, this is the magic label instead. - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + MNTPT=$(echo $NEXTDEVICE | awk '{print $3}') + # and the device name + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $2}') echo -n "\n$(date +'%F | %T | ')'$0' Checking status of Device '$NEXTDEVICE' for BLOCKDEV '$BLOCKDEV'." | tee -a /dev/tty8 if [ -n "$MNTPT" ] ; then # If the mountpoint variable isn't empty, it means the device is already mounted. diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 61dee77..57d6f05 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -64,9 +64,9 @@ X2GoGetPortableAppSessions () NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then # now figure out the mountpoint - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - # and the device name? Wait, this is the magic label instead. - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + MNTPT=$(echo $NEXTDEVICE | awk '{print $3}') + # and the device name + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $2}') echo -n "\n$(date +'%F | %T | ')'$0' Checking status of Device '$NEXTDEVICE' for BLOCKDEV '$BLOCKDEV'." | tee -a /dev/tty8 if [ -n "$MNTPT" ] ; then # If the mountpoint variable isn't empty, it means the device is already mounted. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 d7eb7102647dea92527f7cdc4d320a33bda8c7b4 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 00:27:29 2018 +0100 removable/non-removable detection per device failed for partitioned devices --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 3f047ab..1978f2e 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -110,7 +110,7 @@ GetSSHHostKeysFromMedia () # So there's no active mount for the device with our magic label ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 # let's see if this is a fixed disk. - if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + if [ $(lsblk -oRM -nl /dev/$BLOCKDEV) -eq 0 ] ; then # yes, it is, so let's go ahead and try to mount it ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 # obviously, we need a mountpoint for it ... diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 6be457c..09b4054 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -111,7 +111,7 @@ GetSSHClientKeysFromMedia () # So there's no active mount for the device with our magic label ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 # let's see if this is a fixed disk. - if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + if [ $(lsblk -oRM -nl /dev/$BLOCKDEV) -eq 0 ] ; then # yes, it is, so let's go ahead and try to mount it ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 # obviously, we need a mountpoint for it ... diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 57d6f05..76ee95b 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -82,7 +82,7 @@ X2GoGetPortableAppSessions () # So there's no active mount for the device with our magic label ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 # let's see if this is a fixed disk. - if grep -q "^0$" /sys/block/$BLOCKDEV/removable ; then + if [ $(lsblk -oRM -nl /dev/$BLOCKDEV) -eq 0 ] ; then # yes, it is, so let's go ahead and try to mount it ... echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 # obviously, we need a mountpoint for it ... -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 cfcf0c5d243a62bb631d1f6d60a7518ed8e0e03b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 21:40:50 2018 +0100 added code to accomodate minidesktop versions in local-sessions-config code --- .../lib/live/config/2280-x2go-getportableappsessions | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index 48a7ca2..b609141 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -28,6 +28,13 @@ X2GoGetPortableAppSessions () } + check_for_minidesktop { + if [ -L /etc/x2go/x2gothinclient_sessions ] && [ -d ~x2gothinclient ] ; then + mkdir -p ~x2gothinclient/.x2gothinclient + ln -sf /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2gothinclient/sessions + fi + } + while ! [ -c /dev/tty8 ] ; do echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 @@ -76,7 +83,10 @@ X2GoGetPortableAppSessions () echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 # so let's check if we have a config directory at that mountpoint. if check_for_config $MNTPT ; then - # if we managed to pull a config off of it (or save one on it), we make a note of this ... + # if we managed to pull a config off of it (or save one on it), we + # check if we need to make any changes due to us being a minidesktop-TCE ... + check_for_minidesktop + # then we make a note that we're done ... touch /var/lib/live/config/x2goportableappsessions # and quit right here. exit 0 @@ -93,7 +103,10 @@ X2GoGetPortableAppSessions () # and now we can try to mount it. Needs to be in rw mode, as in minidesktop mode, people might want to try to save back changes. mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE if check_for_config /media/fixeddisks/$NEXTDEVICE ; then - # if we managed to pull a config off of it (or save one on it), we make a note of this ... + # if we managed to pull a config off of it (or save one on it), we + # check if we need to make any changes due to us being a minidesktop-TCE ... + check_for_minidesktop + # then we make a note that we're done ... touch /var/lib/live/config/x2goportableappsessions # and quit right here. exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 2a912bee7d9ed3f7c655045bc5d552e63c3291eb Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 23:32:26 2018 +0100 fixed path --- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index cdd3570..a1a97a5 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -31,7 +31,7 @@ X2GoGetPortableAppSessions () check_for_minidesktop () { if [ -L /etc/x2go/x2gothinclient_sessions ] && [ -d ~x2gothinclient ] ; then mkdir -p ~x2gothinclient/.x2gothinclient - ln -sf /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2gothinclient/sessions + ln -sf /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2goclient/sessions fi } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 cb5fcdd42399dc9f980a10a70b2d8e68e9a11da2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 11 22:46:33 2018 +0100 syntaxfix --- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index b609141..cdd3570 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -28,7 +28,7 @@ X2GoGetPortableAppSessions () } - check_for_minidesktop { + check_for_minidesktop () { if [ -L /etc/x2go/x2gothinclient_sessions ] && [ -d ~x2gothinclient ] ; then mkdir -p ~x2gothinclient/.x2gothinclient ln -sf /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2gothinclient/sessions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 3ef64edb89890d3658ee0a20f443af735449788b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Feb 12 01:03:45 2018 +0100 for various reasons (especially fuseext2 misbehaving occasionally and eating up 100% CPU), it makes more sense to check the volume(s) with the PORTABLEAPP label first --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 09b4054..66c4fb4 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -84,7 +84,7 @@ GetSSHClientKeysFromMedia () PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override keys on fixed disks) - BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')" + BLOCKDEVS="$(echo "$PORTABLEAPPLABELS\n$X2GOTCELIVELABELS" | awk '$1 == "1" {print $2}') $(echo "$PORTABLEAPPLABELS\n$X2GOTCELIVELABELS" | awk '$1 == "0" {print $2}')" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions index a1a97a5..9d4db41 100755 --- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions +++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions @@ -65,7 +65,7 @@ X2GoGetPortableAppSessions () PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}') # block device list, removable first (we want USB media to be able to override configs on fixed disks) - BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')" + BLOCKDEVS="$(echo "$PORTABLEAPPLABELS\n$X2GOTCELIVELABELS" | awk '$1 == "1" {print $2}') $(echo "$PORTABLEAPPLABELS\n$X2GOTCELIVELABELS" | awk '$1 == "0" {print $2}')" # for every block device in our list, do ... for BLOCKDEV in $BLOCKDEVS; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 73d254b7de2e73e906ec8cf16e632450bb4dad01 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Feb 19 12:03:59 2018 +0100 Private keys did not get deleted by MMD but by windows portable mode - must not be placed in x2goclient/ssh, or else they will be gone once x2goclient.exe exits. instead, use x2goclient/.ssh, or x2goclient/sshkeys - as .dotfiles and .dotfolders cannot be created in Windows Explorer, only on commandline. --- .../includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index bf6e34b..9802706 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -16,8 +16,8 @@ GetSSHClientKeysFromMedia () # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. check_for_config (){ - if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/x2goclient/ssh ] || [ -d $1/.ssh ]; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', '$1/x2goclient/ssh', or '$1/.ssh'." | tee -a /dev/tty8 + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/x2goclient/.ssh ] || [ -d $1/x2goclient/sshkeys ] || [ -d $1/.ssh ]; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', '$1/x2goclient/.ssh', or '$1/.ssh'." | tee -a /dev/tty8 if [ "$TARGETUSERNAME" = "x2gothinclient" ] ; then while ! [ -f $USERHOME/.x2goclient/settings ] ; do echo -n "\n$(date +'%F | %T | ')'$0' Waiting until minidesktop-init script has finished before we populate '~/.ssh' ." | tee -a /dev/tty8 @@ -34,7 +34,7 @@ GetSSHClientKeysFromMedia () fi # any keyfile in the config dir will be copied over to live system # - for KEYFILE in $1/config/ssh/* $1/ssh/* $1/x2goclient/ssh/* $1/.ssh/* ; do + for KEYFILE in $1/config/ssh/* $1/ssh/* $1/x2goclient/.ssh/* $1/x2goclient/sshkeys/* $1/.ssh/* ; do ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | 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
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 ca0877da319559174bec0f7eeaf8d1300c357927 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 18 22:28:24 2018 +0100 attempting to fix race condition between 2270 and the minidesktop init scripts --- .../lib/live/config/2270-getsshclientkeysfrommedia | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index b0cad9b..2db020b 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -18,14 +18,20 @@ GetSSHClientKeysFromMedia () check_for_config (){ if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/x2goclient/ssh ] || [ -d $1/.ssh ]; then echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', '$1/x2goclient/ssh', or '$1/.ssh'." | tee -a /dev/tty8 - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$USERHOME/.ssh") - chown $TARGETUSERNAME: \ - $(readlink -m "$USERHOME/.ssh") - chmod 700 \ - $(readlink -m "$USERHOME/.ssh") - + if [ "$TARGETUSERNAME" = "x2gothinclient" ] ; then + while ! [ -d $USERHOME/.ssh ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' Waiting until minidesktop-init created '~/.ssh' ." | tee -a /dev/tty8 + sleep 1 + done + else + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh") + chown $TARGETUSERNAME: \ + $(readlink -m "$USERHOME/.ssh") + chmod 700 \ + $(readlink -m "$USERHOME/.ssh") + fi # any keyfile in the config dir will be copied over to live system # for KEYFILE in $1/config/ssh/* $1/ssh/* $1/x2goclient/ssh/* $1/.ssh/* ; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 34729895c323f5ba98d6640c3f1a53495c41773a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 18 17:59:31 2018 +0100 typofix --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 66c4fb4..72639e8 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -17,7 +17,7 @@ GetSSHClientKeysFromMedia () check_for_config (){ if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/./ssh'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/.ssh'." | tee -a /dev/tty8 # create .ssh-Directory in case it doesn't exist # mkdir -p $(readlink -m "$USERHOME/.ssh") -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 d78d1918c18b24710d8bbea8310af20fbf734279 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Feb 19 11:28:12 2018 +0100 another attempt at fixing the private-keys-get-deleted-in-MMD-mode issue --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 2db020b..bf6e34b 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -19,8 +19,8 @@ GetSSHClientKeysFromMedia () if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/x2goclient/ssh ] || [ -d $1/.ssh ]; then echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', '$1/x2goclient/ssh', or '$1/.ssh'." | tee -a /dev/tty8 if [ "$TARGETUSERNAME" = "x2gothinclient" ] ; then - while ! [ -d $USERHOME/.ssh ] ; do - echo -n "\n$(date +'%F | %T | ')'$0' Waiting until minidesktop-init created '~/.ssh' ." | tee -a /dev/tty8 + while ! [ -f $USERHOME/.x2goclient/settings ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' Waiting until minidesktop-init script has finished before we populate '~/.ssh' ." | tee -a /dev/tty8 sleep 1 done else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5c146fe4ad0a4b0bf090e2b5abe2006d19c9aaa7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 18 18:09:45 2018 +0100 for portableapp/tce-hdd dualmode stick, private keys need to go into x2goclient/ssh --- .../includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 72639e8..b0cad9b 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -16,8 +16,8 @@ GetSSHClientKeysFromMedia () # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. check_for_config (){ - if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', or '$1/.ssh'." | tee -a /dev/tty8 + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/x2goclient/ssh ] || [ -d $1/.ssh ]; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1/ssh', '$1/x2goclient/ssh', or '$1/.ssh'." | tee -a /dev/tty8 # create .ssh-Directory in case it doesn't exist # mkdir -p $(readlink -m "$USERHOME/.ssh") @@ -28,7 +28,7 @@ GetSSHClientKeysFromMedia () # any keyfile in the config dir will be copied over to live system # - for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do + for KEYFILE in $1/config/ssh/* $1/ssh/* $1/x2goclient/ssh/* $1/.ssh/* ; do ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | 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
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 dce43dba13623854d43bae4f83a275f1d0815b81 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Apr 22 19:05:59 2018 +0200 fixed unneccessary escapes --- config/includes.chroot/lib/live/config/2600-tcpprint | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index c9266ac..09d6187 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -34,7 +34,7 @@ if grep -q "\W*tcpprint\W*" /proc/cmdline ; then [ -d /dev/usb ] && PRINTERDEVICES=$(find /dev/usb -type c -name "lp*" | sort) PRINTERDEVICES="$PRINTERDEVICES $(find /dev/ -maxdepth 1 -type c -name "lp*" | sort)" - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 # Create a listening port for a TCP/9100-RAW-printer # @@ -58,21 +58,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty8 PRINTERCOUNT=$((PRINTERCOUNT+1)) done echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect if ps -C xinetd --no-header >/dev/null ; then - echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty8 if /etc/init.d/xinetd restart; then echo -n " success. All done." | tee -a /dev/tty8 else echo -n " error." | tee -a /dev/tty8 fi else - echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty8 fi ) & -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 794f384efd92c9213ffaae951d187bfe234f1864 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Feb 19 12:32:53 2018 +0100 add additional symlink so our workaround re:deleted files in portable mode can actually be used from win and lin without changing paths --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 9802706..8429935 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -48,9 +48,10 @@ GetSSHClientKeysFromMedia () done # this is so the path name in the sessions file matches again - # (cannot use .ssh on FAT, for example) + # (cannot create .ssh on FAT using Windows Explorer, for example) # ln -s $USERHOME/.ssh $USERHOME/ssh + ln -s $USERHOME/.ssh $USERHOME/sshkeys # this is because x2goclient --portable currently deletes .ssh and ssh (which is dumb) return 0 else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 e340e9db5f91b329a319eaf0ade018b0ac27c04a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Feb 19 16:07:42 2018 +0100 added two font packages --- config/package-lists/x2go.list.chroot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 06e85dc..c1f1765 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -54,7 +54,9 @@ rdesktop udev x2goclient x2gousbmount +xfonts-100dpi xfonts-75dpi +xfonts-base xfonts-scalable xnest xserver-xephyr -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 c9a47d58a5a95c11f4436c02b00b5a98f3fbb60a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed May 2 00:50:00 2018 +0200 turns out that xserver-xorg-input-wacom isn't included in xserver-xorg-input-all. WTF. --- config/package-lists/desktop.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 819a298..0719ad3 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -1,6 +1,7 @@ x11vnc x11vnc-data xserver-xorg-input-all +xserver-xorg-input-wacom xserver-xorg-video-all # for i386 only #xserver-xorg-video-geode xserver-xorg-video-qxl -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 9f0a42157109f501d607d1c7dcff45ffb35d6917 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed May 2 00:34:12 2018 +0200 added support for synaptics touchpads --- config/package-lists/desktop.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 9d571b0..6d1b002 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -1,6 +1,7 @@ x11vnc x11vnc-data xserver-xorg-input-wacom +xserver-xorg-input-synaptics xserver-xorg-video-all # for i386 only #xserver-xorg-video-geode xserver-xorg-video-qxl -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 55a7b0ccd9915562ab6138ebd69179bf581d1cba Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed May 2 00:37:21 2018 +0200 switched to metapackage xserver-xorg-input-all, which should cover all input devices --- config/package-lists/desktop.list.chroot | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 6d1b002..819a298 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -1,7 +1,6 @@ x11vnc x11vnc-data -xserver-xorg-input-wacom -xserver-xorg-input-synaptics +xserver-xorg-input-all xserver-xorg-video-all # for i386 only #xserver-xorg-video-geode xserver-xorg-video-qxl -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 7cdade23c8ef1462e764e45aa5771eb2b14221d6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Dec 14 23:08:21 2018 +0100 typofix - chmod 700 was chmod 600 by accident --- config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 0326ee5..8a27c3e 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -34,7 +34,7 @@ fi # Set Keyfile # mkdir -p /root/.ssh - chmod 600 /root/.ssh + chmod 700 /root/.ssh touch /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 32cb6b15252d44e9277f373934d2d64796cb2de9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Dec 14 23:25:58 2018 +0100 (hopefully) fix missing ~/.ssh creation in MATE-MiniDesktop --- .../lib/live/config/2270-getsshclientkeysfrommedia | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 8429935..26726db 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -23,15 +23,16 @@ GetSSHClientKeysFromMedia () echo -n "\n$(date +'%F | %T | ')'$0' Waiting until minidesktop-init script has finished before we populate '~/.ssh' ." | tee -a /dev/tty8 sleep 1 done - else - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$USERHOME/.ssh") - chown $TARGETUSERNAME: \ - $(readlink -m "$USERHOME/.ssh") - chmod 700 \ - $(readlink -m "$USERHOME/.ssh") fi + + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh") + chown $TARGETUSERNAME: \ + $(readlink -m "$USERHOME/.ssh") + chmod 700 \ + $(readlink -m "$USERHOME/.ssh") + # any keyfile in the config dir will be copied over to live system # for KEYFILE in $1/config/ssh/* $1/ssh/* $1/x2goclient/.ssh/* $1/x2goclient/sshkeys/* $1/.ssh/* ; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 8ad7e5f4fd890c03a04c3b849ce4911c6e0d970d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 15 21:51:31 2018 +0100 force bash as default system shell --- config/preseed/dash.cfg.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/preseed/dash.cfg.chroot b/config/preseed/dash.cfg.chroot new file mode 100644 index 0000000..42bf1e3 --- /dev/null +++ b/config/preseed/dash.cfg.chroot @@ -0,0 +1 @@ +dash dash/sh boolean false -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 f736114cb8c09f3413827649d619acd0af1b2cae Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Dec 16 01:19:04 2018 +0100 (temporary?) workaround to switch the default system shell from dash to bash & silence dpkg-reconfigure --- config/includes.chroot/lib/live/config/2850-dash2bash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2850-dash2bash b/config/includes.chroot/lib/live/config/2850-dash2bash new file mode 100755 index 0000000..ccb29ea --- /dev/null +++ b/config/includes.chroot/lib/live/config/2850-dash2bash @@ -0,0 +1,15 @@ +#!/bin/sh + +# (temporary?) workaround to switch the default system shell from dash to bash +Init () +{ + echo -n " dash2bash" +} + +Config () +{ + dpkg-reconfigure --default-priority dash >/dev/null 2>&1 +} + +Init +Config -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 afefc032b9a83456d3a999f0938d15f9563d815a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Dec 16 01:54:12 2018 +0100 moving X startup related things from config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig to config/includes.chroot/etc/X11/Xsession.d/60x11-* --- .../etc/X11/Xsession.d/60x11-blanking-dpms-config | 31 +++++++++ .../etc/X11/Xsession.d/60x11-openbox-start | 4 ++ .../etc/X11/Xsession.d/60x11-set-background | 43 +++++++++++++ .../Xsession.d/60x11-spawn-configure-pulseaudio | 32 ++++++++++ .../lib/live/config/2900-x2go-thinclientconfig | 74 ---------------------- 5 files changed, 110 insertions(+), 74 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config b/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config new file mode 100644 index 0000000..128c503 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config @@ -0,0 +1,31 @@ +# code to fix blank screen happening with DisplayPort and some buggy TFTs (xset q reports "Monitor is on" even though it is pitch black) +if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then + xset dpms force suspend +fi + +BLANKINGTIME=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "blank" { print $2 }' | tr -dc '0-9:') +if [ -n "$BLANKINGTIME" ]; then + DPMSARR=($(echo $BLANKINGTIME | awk -F ':' '$1 ~/^[0-9]*$/ && $2 ~/^[0-9]*$/ && $3 ~/^[0-9]*$/ { print $1 " " $2 " " $3}')) + if [ ${DPMSARR[0]} -eq 0 ]; then + # Disable screensaver and DPMS Power Saving if requested + xset s off + if grep -q '\W*nodpms\W*' /proc/cmdline; then + xset -dpms + fi + else + xset s on + xset s ${DPMSARR[0]} + if ! grep -q '\W*nodpms\W*' /proc/cmdline; then + # Yes, "+dpms dpms" is intentional. + xset +dpms dpms ${DPMSARR[0]} ${DPMSARR[1]} ${DPMSARR[2]} + fi + fi +fi + +if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then + xset dpms force on + xset dpms 0 0 0 + xset -dpms +fi + + diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start b/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start new file mode 100644 index 0000000..9835ae9 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start @@ -0,0 +1,4 @@ +# Spawn openbox +openbox & +echo -en "\n$(date +'%F | %T | ')'$0' spawned OpenBox." | tee -a /dev/tty8 + diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background new file mode 100644 index 0000000..bb6f052 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -0,0 +1,43 @@ +# set screen background to X2Go default blue on all detected screens, unless color or image is specified +XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&') +XROOTMODE=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xrootmode"==$1 {print $2}') +IMAGEDIR=/var/tmp/images/ + +# TODO: mate-minidesktop: image is stored as /usr/share/backgrounds/x2go/x2gothinclient-minidesktop_background.svg - needs to be svg + +if [ -n "$XROOT" ] ; then + XROOTSHORT=$(echo "$XROOT" | tr -dc '0-9a-fA-Fx') + + if echo "$XROOTSHORT" | grep -q '^0x' && [ 8 = ${#XROOTSHORT} ] ; then + # this should be a hex color string + HEXCOLOR=${XROOTSHORT#0x} + if [ 6 = ${HEXCOLOR} ] ; then + xsetroot -solid "#$HEXCOLOR" # set requested color + else + xsetroot -grey # show that something's amiss + fi + elif echo "$XROOT" | grep -q "://" ; then + # this could be an URI + # TODO move this download part to an earlier script + wget -P $IMAGEDIR/background/ "${XROOT/|/ }" + if [ $(ls $IMAGEDIR 2>/dev/null| wc -l) -gt 0 ] ; then + #input validation + case "${XROOTMODE,,}" in # force lowercase + "center") POSITION=center ;; + "fill") POSITION=fill ;; + "scale") POSITION=scale ;; + "tile") POSITION=tile ;; + *) POSITION=max ;; + esac + # POSITION: center fill max scale tile; default: max + feh --nofehbg --bg-$POSITION $IMAGEDIR/background/* + else + xsetroot -grey # show that something's amiss + fi + fi + +else + # set our default color + xsetroot -solid "#246ed8" +fi + diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio new file mode 100644 index 0000000..157cbb6 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio @@ -0,0 +1,32 @@ +# Spawn PulseAudio +if ! ps -C pulseaudio >/dev/null ; then + pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & +fi + +AUDIOOUT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^audioout=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@|') + +if [ -n "$AUDIOOUT" ] ; then + ( + while ! pacmd dump 2>&1| grep -q set-card-profile ; do + echo -en "\n$(date +'%F | %T | ')'$0': Waiting for pulseaudio to start ..." | tee -a /dev/tty8 + sleep 1 + done + if [ "$AUDIOOUT" = "list" ] ; then + echo -en "\n$(date +'%F | %T | ')'$0': Available audio outputs:" | tee -a /dev/tty8 + AUDIOOUTPUTS=$( for CARD in $(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' $2 == "name:" { print $4 }'); do + pacmd list-cards | more +/"$CARD" | grep -m 1 "$CARD" -A100000 | + more +/"profiles:" | grep -m 1 -B10000 "active profile:" | grep -A10000 "profiles" | gre +p "\W\Woutput:" | grep -v "active profile:" | awk -F'[+:]' '{gsub("\t","",$1) ; print "\"'$CARD'|" $1 ":" $2 "\""} '; + done | sort -u ) + for AUDIOOUTPUT in $AUDIOOUTPUTS; do + echo -en "\n$(date +'%F | %T | ')'$0': $AUDIOOUTPUT" | tee -a /dev/tty8 + done + echo -en "\n$(date +'%F | %T | ')'$0': $(pacmd list | 'grep active profile')" | tee -a /dev/tty8 + elif (echo "$AUDIOOUT" | grep -q '^[^|]*|[^|]*$') ; then + $(echo "$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') + else + : # NOP + fi + ) & +fi + diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 6939b68..9685d8a 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -24,13 +24,6 @@ cat >/home/user/.xsession <<XSESSION # http://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=displaymanag... # check the above file for ideas before reinventing the wheel -# Spawn PulseAudio -pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & - -AUDIOOUT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^audioout=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-@|') - # additional variable instead of "case \$(...) in", as we need the value again later on XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }') @@ -86,17 +79,6 @@ for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' THIS_DISPLAY=\$NEXT_DISPLAY done -# code to fix blank screen happening with DisplayPort and some buggy TFTs (xset q reports "Monitor is on" even though it is pitch black) -if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then - xset dpms force suspend -fi - -# Spawn openbox -openbox & - -# set screen background to X2Go default blue on all detected screens -xsetroot -solid "#246ed8" - # Get X2GoConfig BROKERURL=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ awk -F'=' ' /^broker-url=/ { print \$2 }' | \ @@ -212,62 +194,6 @@ if [ -n "\$THROTTLEVALUES" ]; then fi fi -# code to fix blank screen happening with DisplayPort and some buggy TFTs (xset q reports "Monitor is on" even though it is pitch black) -if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then - xset dpms force on dpms 0 0 0 -dpms -fi - -BLANKINGTIME=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "blank" { print \$2 }' | tr -dc '0-9:') -if [ -n "\$BLANKINGTIME" ]; then - DPMSARR=(\$(echo \$BLANKINGTIME | awk -F ':' '\$1 ~/^[0-9]*\$/ && \$2 ~/^[0-9]*\$/ && \$3 ~/^[0-9]*\$/ { print \$1 " " \$2 " " \$3}')) - if [ \${DPMSARR[0]} -eq 0 ]; then - # Disable screensaver and DPMS Power Saving if requested - xset s off - if grep -q '\W*nodpms\W*' /proc/cmdline; then - xset -dpms - fi - else - xset s on - xset s \${DPMSARR[0]} - if ! grep -q '\W*nodpms\W*' /proc/cmdline; then - # Yes, "+dpms dpms" is intentional. - xset +dpms dpms \${DPMSARR[0]} \${DPMSARR[1]} \${DPMSARR[2]} - fi - fi -fi - -if [ -n "\$AUDIOOUT" ] ; then - ( - while ! pacmd dump 2>&1| grep -q set-card-profile ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for pulseaudio to start ..." | tee -a /dev/tty8 - sleep 1 - done - if [ "\$AUDIOOUT" = "list" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 - AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do - pacmd list-cards | \ - more +/"\$CARD" | \ - grep -m 1 "\$CARD" -A100000 | \ - more +/"profiles:" | \ - grep -m 1 -B10000 "active profile:" | \ - grep -A10000 "profiles" | \ - grep "\W\Woutput:" | \ - grep -v "active profile:" | \ - awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; - done | \ - sort -u ) - for AUDIOOUTPUT in \$AUDIOOUTPUTS; do - echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 - done - echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 - elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') - else - : # NOP - fi - ) & -fi - eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 198ae88f3ebead776cadf504e34011bfd8394c14 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Dec 16 02:32:37 2018 +0100 added logging to file for audioout=list, plus some whitespace fixes/formatting --- .../etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio index 157cbb6..bbaf2d8 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio @@ -3,7 +3,7 @@ if ! ps -C pulseaudio >/dev/null ; then pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & fi -AUDIOOUT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^audioout=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@|') +AUDIOOUT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^audioout=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@|') if [ -n "$AUDIOOUT" ] ; then ( @@ -12,16 +12,16 @@ if [ -n "$AUDIOOUT" ] ; then sleep 1 done if [ "$AUDIOOUT" = "list" ] ; then - echo -en "\n$(date +'%F | %T | ')'$0': Available audio outputs:" | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')'$0': Available audio outputs:" | tee -a /dev/tty8 | tee -a /tmp/audiolog AUDIOOUTPUTS=$( for CARD in $(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' $2 == "name:" { print $4 }'); do - pacmd list-cards | more +/"$CARD" | grep -m 1 "$CARD" -A100000 | - more +/"profiles:" | grep -m 1 -B10000 "active profile:" | grep -A10000 "profiles" | gre -p "\W\Woutput:" | grep -v "active profile:" | awk -F'[+:]' '{gsub("\t","",$1) ; print "\"'$CARD'|" $1 ":" $2 "\""} '; - done | sort -u ) + pacmd list-cards | more +/"$CARD" | grep -m 1 "$CARD" -A100000 | more +/"profiles:" | grep -m 1 -B10000 "active profile:" | \ + grep -A10000 "profiles" | grep "\W\Woutput:" | grep -v "active profile:" | \ + awk -F'[+:]' '{gsub("\t","",$1) ; print "\"'$CARD'|" $1 ":" $2 "\""} '; + done | sort -u ) for AUDIOOUTPUT in $AUDIOOUTPUTS; do - echo -en "\n$(date +'%F | %T | ')'$0': $AUDIOOUTPUT" | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')'$0': $AUDIOOUTPUT" | tee -a /dev/tty8 | tee -a /tmp/audiolog done - echo -en "\n$(date +'%F | %T | ')'$0': $(pacmd list | 'grep active profile')" | tee -a /dev/tty8 + echo -en "\n$(date +'%F | %T | ')'$0': $(pacmd list | 'grep active profile')" | tee -a /dev/tty8 | tee -a /tmp/audiolog elif (echo "$AUDIOOUT" | grep -q '^[^|]*|[^|]*$') ; then $(echo "$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5dfd0efd5fcbdb2e6eed6e0dc80b3fb6ebdc1ae9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 4 20:40:12 2019 +0100 another typofix --- config/includes.chroot/etc/X11/Xsession.d/60x11-set-background | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background index aded4ed..1bb981e 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -30,7 +30,7 @@ if [ -n "$XROOT" ] ; then *) POSITION=max ;; esac # POSITION: center fill max scale tile; default: max - feh --nofehbg --bg-$POSITION $IMAGEDIR/background/* + feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* else xsetroot -grey # show that something's amiss fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 eec9bbe9171a3371f0ee903a26d4d25899c51446 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 4 20:41:36 2019 +0100 feh package was missing --- config/package-lists/xbackground.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/package-lists/xbackground.list.chroot b/config/package-lists/xbackground.list.chroot new file mode 100644 index 0000000..875156c --- /dev/null +++ b/config/package-lists/xbackground.list.chroot @@ -0,0 +1 @@ +feh -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 b885ce5cdafef318071a524df769cd1913c1a315 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jan 2 22:51:27 2019 +0100 added debug code that was only present in feature/openbox-magic-pixel-workaround so far --- .../includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index bce0cc7..bc59285 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -19,6 +19,16 @@ sed -i -e '\#<applications>#a<application title="X2Go Client" type="normal">' -e #make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient sed -i -e '/ToggleMaximize/d' /etc/xdg/openbox/rc.xml +# this is so that xsession can log to tty8 +adduser user tty + +# this is for additional debug logging +if grep -q ' tcedebug' /proc/cmdline; then + touch /var/log/x2goclient + chmod 666 /var/log/x2goclient + DEBUGPARAMS='--debug 2>&1 | tee /var/log/x2goclient >/dev/tty9' +fi + # This is needed for File Sharing support (USB media and the like) mkdir -p /home/user/{export,logins,mounts} chown user:user /home/user/{export,logins,mounts} -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 c48fca4d81e88e3727b8c1079e08599c3f6889a5 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jan 2 20:59:17 2019 +0100 Trying to completely do away with .xsession file and use modular /etc/X11/Xsession.d config files instead --- .../etc/X11/Xsession.d/60x11-configure-xinerama | 58 +++++++ .../etc/X11/Xsession.d/61x11-start-x2goclient | 103 ++++++++++++ .../lib/live/config/2900-x2go-thinclientconfig | 181 --------------------- 3 files changed, 161 insertions(+), 181 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-configure-xinerama b/config/includes.chroot/etc/X11/Xsession.d/60x11-configure-xinerama new file mode 100644 index 0000000..2fa5356 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-configure-xinerama @@ -0,0 +1,58 @@ +# inspired by +# http://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=displaymanag... +# check the above file for ideas before reinventing the wheel + +# additional variable instead of "case $(...) in", as we need the value again later on +XRANDRCMDTAINTED=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xinerama" { print $2 }') + +# sanitize input +case $XRANDRCMDTAINTED in +"above") + XRANDRCMD="above" + ;; +"below") + XRANDRCMD="below" + ;; +"same-as") + XRANDRCMD="same-as" + ;; +"right-of") + XRANDRCMD="right-of" + ;; +*) + XRANDRCMD="left-of" # default + ;; +esac + +# find out how many touch devices we have +TOUCHDEVICESCOUNT=$(LANG=C xsetwacom --list devices | wc -l) + +# find out how many mouse devices we have +MICECOUNT=$(find /dev/input -maxdepth 1 -name "mouse*" | wc -l) + +# loop through the following code block for all connected display devices +for NEXT_DISPLAY in $(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1); do + + #remove trailing newline from NEXT_DISPLAY + NEXT_DISPLAY=${NEXT_DISPLAY%$'\n'} + + # THIS_DISPLAY won't be defined until the second time the loop is executed, which is a + # neat way of running xrandr only if there are at least two connected display devices + if [ -n "${THIS_DISPLAY+x}" ] ; then + + if [ $TOUCHDEVICESCOUNT -gt 0 ] && [ $MICECOUNT -lt 1 ] && [ -z $XRANDRCMDTAINTED ]; then + # we have a touch device and no mice, and no xinerama parameter was set, + # so switch to clone view to make the touch device usable + /usr/bin/xrandr --output $NEXT_DISPLAY --same-as $THIS_DISPLAY + + else + # else use whatever is in XRANDRCMD (which is either our default of "left-of", + # or a valid xinerama kernel parameter value) + /usr/bin/xrandr --output $NEXT_DISPLAY --$XRANDRCMD $THIS_DISPLAY + fi + + fi + # now set THIS_DISPLAY -> every subsequent iteration of the loop will now enter the code block + # above where [ -n ${THIS_DISPLAY+x} ] is the conditional + THIS_DISPLAY=$NEXT_DISPLAY +done diff --git a/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient b/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient new file mode 100644 index 0000000..e22b47e --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/61x11-start-x2goclient @@ -0,0 +1,103 @@ +# Get X2GoConfig +BROKERURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^broker-url=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:/?%_\-@') +SESSIONSELECT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^session=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:/ _\-@') +LDAP=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | sed 's/^ldap=/ldap#/' | awk -F'#' ' /^ldap#/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@') +LDAP1=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | sed 's/^ldap1=/ldap1#/' | awk -F'#' ' /^ldap1#/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@') +LDAP2=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | sed 's/^ldap2=/ldap2#/' | awk -F'#' ' /^ldap2#/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@') + + +# Check for background and branding SVGs +BRANDING='' +OLDCON='' +if grep -q ' branding=' /proc/cmdline; then + while ! [ -s "/etc/x2go/branding.svg" ]; do + [ -z "$OLDCON" ] && OLDCON="$(fgconsole)" + chvt "1" + echo "'$0' is waiting for a valid '/etc/x2go/branding.svg' file." + sleep "2" + done + [ -n "$OLDCON" ] && chvt "$OLDCON" + BRANDING='--branding=/etc/x2go/branding.svg' +fi +BACKGROUND='' +OLDCON='' +if grep -q ' bg=' /proc/cmdline; then + while ! [ -s "/etc/x2go/bg.svg" ]; do + [ -z "$OLDCON" ] && OLDCON="$(fgconsole)" + chvt "1" + echo "'$0' is waiting for a valid '/etc/x2go/bg.svg' file." + sleep "2" + done + [ -n "$OLDCON" ] && chvt "$OLDCON" + BACKGROUND='--background=/etc/x2go/bg.svg' +fi + +# Spawn X2GoClient +if [ -n "$SESSIONSELECT" ]; then + STARTSESSION="--session='$SESSIONSELECT'" +fi +if [ -n "$BROKERURL" ]; then + SESSIONFROM="--broker-url=$BROKERURL" +else + SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions" + OLDCON='' + while ! [ -s "/etc/x2go/x2gothinclient_sessions" ]; do + [ -z "$OLDCON" ] && OLDCON="$(fgconsole)" + chvt "1" + echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." + sleep "2" + done + [ -n "$OLDCON" ] && chvt "$OLDCON" +fi +if [ -n "$LDAP" ] ; then + if [ -n "$LDAP1" ] ; then + BACKUPLDAP="--ldap1=$LDAP1" + if [ -n "$LDAP2" ] ; then + BACKUPLDAP="$BACKUPLDAP --ldap2=$LDAP2" + fi + fi + LDAPPARAMS="--ldap=$LDAP $BACKUPLDAP" +else + LDAPPARAMS="" +fi + + +THROTTLINGCOMMAND="" +THROTTLEVALUES=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "throttle" { print $2 }' | tr -dc '0-9.:u') +if [ -n "$THROTTLEVALUES" ]; then + # determine maximum line speed + # look for all interfaces in state "up", then read their speed value from the file named speed + # just ignore the output if there is none, then sort numeric, unique, and read last line=highest, + # then sanitize + MAXSPEEDMBIT=$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') + MAXSPEEDKBYTE=$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte + + THROTTLEARR=($(echo $THROTTLEVALUES | awk -F ':' '$1 ~/^[0-9\.u]*$/ && $2 ~/^[0-9\.u]*$/ && $3 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ && $4 ~/^[0-9\.u]*$/ { print $1 " " $2 " " $3 " " $4 " " $5}')) + if [ -n "${THROTTLEARR[0]}" ] && [ "${THROTTLEARR[0]}" != "u" ]; then + THROTTLEDOWN="-d ${THROTTLEARR[0]}" # default 10, never used + elif [ "${THROTTLEARR[0]}" = "u" ]; then + THROTTLEDOWN="-d $MAXSPEEDKBYTE" + fi + if [ -n "${THROTTLEARR[1]}" ] && [ "${THROTTLEARR[1]}" != "u" ]; then + THROTTLEUP="-u ${THROTTLEARR[1]}" # default 10, never used + elif [ "${THROTTLEARR[1]}" = "u" ]; then + THROTTLEUP="-d $MAXSPEEDKBYTE" + elif [ -z "${THROTTLEARR[1]}" ] ; then + THROTTLEUP="-d ${THROTTLEARR[0]}" # set up=down if only 1 param + fi + if [ -n "${THROTTLEARR[2]}" ] ; then + THROTTLETIME="-t ${THROTTLEARR[2]}" # default 3.0 + fi + if [ -n "${THROTTLEARR[3]}" ] ; then + THROTTLELENGTH="-l ${THROTTLEARR[3]}" # default 20 + fi + if [ -n "${THROTTLEARR[4]}" ] ; then + THROTTLELATENCY="-L ${THROTTLEARR[4]}" # default 0 + fi + # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly + if [ -n "$THROTTLEUP" ] || [ -n "$THROTTLEDOWN" ] || [ -n "$THROTTLETIME" ] || [ -n "$THROTTLELENGTH" ] || [ -n "$THROTTLELATENCY" ]; then + THROTTLINGCOMMAND="trickle -s $THROTTLEDOWN $THROTTLEUP $THROTTLETIME $THROTTLELENGTH $THROTTLELATENCY" + fi +fi + +eval $THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export $LDAPPARAMS $SESSIONFROM $BACKGROUND $BRANDING $STARTSESSION diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 9685d8a..bce0cc7 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -19,187 +19,6 @@ sed -i -e '\#<applications>#a<application title="X2Go Client" type="normal">' -e #make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient sed -i -e '/ToggleMaximize/d' /etc/xdg/openbox/rc.xml -cat >/home/user/.xsession <<XSESSION -# inspired by -# http://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=displaymanag... -# check the above file for ideas before reinventing the wheel - -# additional variable instead of "case \$(...) in", as we need the value again later on -XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }') - -# sanitize input -case \$XRANDRCMDTAINTED in -"above") - XRANDRCMD="above" - ;; -"below") - XRANDRCMD="below" - ;; -"same-as") - XRANDRCMD="same-as" - ;; -"right-of") - XRANDRCMD="right-of" - ;; -*) - XRANDRCMD="left-of" # default - ;; -esac - -# find out how many touch devices we have -TOUCHDEVICESCOUNT=\$(LANG=C xsetwacom --list devices | wc -l) - -# find out how many mouse devices we have -MICECOUNT=\$(find /dev/input -maxdepth 1 -name "mouse*" | wc -l) - -# loop through the following code block for all connected display devices -for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1); do - - #remove trailing newline from NEXT_DISPLAY - NEXT_DISPLAY=\${NEXT_DISPLAY%\$'\n'} - - # THIS_DISPLAY won't be defined until the second time the loop is executed, which is a - # neat way of running xrandr only if there are at least two connected display devices - if [ -n "\${THIS_DISPLAY+x}" ] ; then - - if [ \$TOUCHDEVICESCOUNT -gt 0 ] && [ \$MICECOUNT -lt 1 ] && [ -z \$XRANDRCMDTAINTED ]; then - # we have a touch device and no mice, and no xinerama parameter was set, - # so switch to clone view to make the touch device usable - /usr/bin/xrandr --output \$NEXT_DISPLAY --same-as \$THIS_DISPLAY - - else - # else use whatever is in XRANDRCMD (which is either our default of "left-of", - # or a valid xinerama kernel parameter value) - /usr/bin/xrandr --output \$NEXT_DISPLAY --\$XRANDRCMD \$THIS_DISPLAY - fi - - fi - # now set THIS_DISPLAY -> every subsequent iteration of the loop will now enter the code block - # above where [ -n \${THIS_DISPLAY+x} ] is the conditional - THIS_DISPLAY=\$NEXT_DISPLAY -done - -# Get X2GoConfig -BROKERURL=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^broker-url=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-@') -SESSIONSELECT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^session=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/ _\-@') -LDAP=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - sed 's/^ldap=/ldap#/' | \ - awk -F'#' ' /^ldap#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-@') -LDAP1=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - sed 's/^ldap1=/ldap1#/' | \ - awk -F'#' ' /^ldap1#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-@') -LDAP2=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - sed 's/^ldap2=/ldap2#/' | \ - awk -F'#' ' /^ldap2#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-@') - - -# Check for background and branding SVGs -BRANDING='' -OLDCON='' -if grep -q ' branding=' /proc/cmdline; then - while ! [ -s "/etc/x2go/branding.svg" ]; do - [ -z "\$OLDCON" ] && OLDCON="\$(fgconsole)" - chvt "1" - echo "'\$0' is waiting for a valid '/etc/x2go/branding.svg' file." - sleep "2" - done - [ -n "\$OLDCON" ] && chvt "\$OLDCON" - BRANDING='--branding=/etc/x2go/branding.svg' -fi -BACKGROUND='' -OLDCON='' -if grep -q ' bg=' /proc/cmdline; then - while ! [ -s "/etc/x2go/bg.svg" ]; do - [ -z "\$OLDCON" ] && OLDCON="\$(fgconsole)" - chvt "1" - echo "'\$0' is waiting for a valid '/etc/x2go/bg.svg' file." - sleep "2" - done - [ -n "\$OLDCON" ] && chvt "\$OLDCON" - BACKGROUND='--background=/etc/x2go/bg.svg' -fi - -# Spawn X2GoClient -if [ -n "\$SESSIONSELECT" ]; then - STARTSESSION="--session='\$SESSIONSELECT'" -fi -if [ -n "\$BROKERURL" ]; then - SESSIONFROM="--broker-url=\$BROKERURL" -else - SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions" - OLDCON='' - while ! [ -s "/etc/x2go/x2gothinclient_sessions" ]; do - [ -z "\$OLDCON" ] && OLDCON="\$(fgconsole)" - chvt "1" - echo "'\$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." - sleep "2" - done - [ -n "\$OLDCON" ] && chvt "\$OLDCON" -fi -if [ -n "\$LDAP" ] ; then - if [ -n "\$LDAP1" ] ; then - BACKUPLDAP="--ldap1=\$LDAP1" - if [ -n "\$LDAP2" ] ; then - BACKUPLDAP="\$BACKUPLDAP --ldap2=\$LDAP2" - fi - fi - LDAPPARAMS="--ldap=\$LDAP \$BACKUPLDAP" -else - LDAPPARAMS="" -fi - - -THROTTLINGCOMMAND="" -THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:u') -if [ -n "\$THROTTLEVALUES" ]; then - # determine maximum line speed - # look for all interfaces in state "up", then read their speed value from the file named speed - # just ignore the output if there is none, then sort numeric, unique, and read last line=highest, - # then sanitize - MAXSPEEDMBIT=\$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') - MAXSPEEDKBYTE=\$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte - - THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.u]*\$/ && \$2 ~/^[0-9\.u]*\$/ && \$3 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) - if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; then - THROTTLEDOWN="-d \${THROTTLEARR[0]}" # default 10, never used - elif [ "\${THROTTLEARR[0]}" = "u" ]; then - THROTTLEDOWN="-d \$MAXSPEEDKBYTE" - fi - if [ -n "\${THROTTLEARR[1]}" ] && [ "\${THROTTLEARR[1]}" != "u" ]; then - THROTTLEUP="-u \${THROTTLEARR[1]}" # default 10, never used - elif [ "\${THROTTLEARR[1]}" = "u" ]; then - THROTTLEUP="-d \$MAXSPEEDKBYTE" - elif [ -z "\${THROTTLEARR[1]}" ] ; then - THROTTLEUP="-d \${THROTTLEARR[0]}" # set up=down if only 1 param - fi - if [ -n "\${THROTTLEARR[2]}" ] ; then - THROTTLETIME="-t \${THROTTLEARR[2]}" # default 3.0 - fi - if [ -n "\${THROTTLEARR[3]}" ] ; then - THROTTLELENGTH="-l \${THROTTLEARR[3]}" # default 20 - fi - if [ -n "\${THROTTLEARR[4]}" ] ; then - THROTTLELATENCY="-L \${THROTTLEARR[4]}" # default 0 - fi - # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly - if [ -n "\$THROTTLEUP" ] || [ -n "\$THROTTLEDOWN" ] || [ -n "\$THROTTLETIME" ] || [ -n "\$THROTTLELENGTH" ] || [ -n "\$THROTTLELATENCY" ]; then - THROTTLINGCOMMAND="trickle -s \$THROTTLEDOWN \$THROTTLEUP \$THROTTLETIME \$THROTTLELENGTH \$THROTTLELATENCY" - fi -fi - -eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION -XSESSION - -chown user:user /home/user/.xsession -chmod 644 /home/user/.xsession - # This is needed for File Sharing support (USB media and the like) mkdir -p /home/user/{export,logins,mounts} chown user:user /home/user/{export,logins,mounts} -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6d78b7eda9e30f36d0cde36cf59c6312cc01eafc Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 4 19:47:08 2019 +0100 typofix --- config/includes.chroot/etc/X11/Xsession.d/60x11-set-background | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background index bb6f052..aded4ed 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -11,7 +11,7 @@ if [ -n "$XROOT" ] ; then if echo "$XROOTSHORT" | grep -q '^0x' && [ 8 = ${#XROOTSHORT} ] ; then # this should be a hex color string HEXCOLOR=${XROOTSHORT#0x} - if [ 6 = ${HEXCOLOR} ] ; then + if [ 6 = ${#HEXCOLOR} ] ; then xsetroot -solid "#$HEXCOLOR" # set requested color else xsetroot -grey # show that something's amiss -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 72dc17eaab31e5dfdf640b30d03e4364f07c1be6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 20:57:57 2019 +0000 for some silly reason, this file is needed in two places --- .../etc/initramfs-tools/hooks/0000-initrdblankdpmsfix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix index de63dcc..5648b29 100755 --- a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix +++ b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix @@ -21,6 +21,7 @@ if [ ! -x "../../lib/live/config/0000-earlyblankdpmsfix" ]; then exit 0 fi -sed -e 's/early/initrd/g' -e 's/Early/Initrd/g' ../../lib/live/config/0000-earlyblankdpmsfix >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" -chmod 755 "${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +# for some silly reason, this file is needed in two places +sed -e 's/early/initrd/g' -e 's/Early/Initrd/g' ../../lib/live/config/0000-earlyblankdpmsfix | tee "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +chmod 755 "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" #"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 31f9dc1219eb8e94a50c0bdc67686493a9e053f9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 15:19:29 2019 +0000 added local non-locking slideshow screensaver --- .../60x11-spawn-configure-slideshow-screensaver | 52 ++++++++++++++++++++++ config/package-lists/xbackground.list.chroot | 1 - config/package-lists/xbgandscreensaver.list.chroot | 2 + 3 files changed, 54 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 new file mode 100644 index 0000000..8fbdc60 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver @@ -0,0 +1,52 @@ +# enable a non-locking local slideshow screensaver +XSAVERIMAGES=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xsaverimages" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') + +XSAVERIDLETIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xsaveridletime"==$1 {print $2}' | tr -dc '0-9') + +XSAVERIMGTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xsaverimgtime"==$1 {print $2}' | tr -dc '0-9') + +IMAGEDIR="/var/tmp/images/" + +SLIDESDIR="${IMAGEDIR}/slides/" + +if [ -z "$XSAVERIMAGES" ] && [ -z "$XSAVERIDLETIME" ] && [ -z "$XSAVERIMGTIME" ] ; then + exit 0 +else + + if echo "$XSAVERIMAGES" | grep -q "://" ; then + # this could be an URI + # TODO move this download part to an earlier script + mkdir -p $IMAGEDIR/slides/ + wget -P $IMAGEDIR/slides/ ${XSAVERIMAGES/|/ } + fi + + IDLE_TIME=$(($XSAVERIDLETIME*1000)) + + BLACK=false + while sleep 1; do + idle=$(xprintidle) + [ -z "$idle" ] && exit 1 + if [ $idle -ge $IDLE_TIME ] && ! $BLACK ; then + # hide all things nxproxy + ps -C nxproxy -opid= | xargs -n 1 --no-run-if-empty -I XXX xdotool search --pid XXX . | xargs --no-run-if-empty -n 1 xdotool windowunmap + if [ $(ls $SLIDESDIR 2>/dev/null| wc -l) -gt 0 ] ; then + if ! ps -C feh >/dev/null ; then + feh -Y -x -F -D $XSAVERIMGTIME -Z -B black -q "$SLIDESDIR" & + fi + else + xsetroot -solid "#000000" + fi + BLACK=true + + else + if [ $idle -lt $IDLE_TIME ] && $BLACK ; then + if ps -C feh >/dev/null; then + killall feh + fi + # show all things nxproxy + ps -C nxproxy -opid= | xargs -n 1 --no-run-if-empty -I XXX xdotool search --pid XXX . | xargs --no-run-if-empty -n 1 xdotool windowmap + BLACK=false + fi + fi + done & +fi diff --git a/config/package-lists/xbackground.list.chroot b/config/package-lists/xbackground.list.chroot deleted file mode 100644 index 875156c..0000000 --- a/config/package-lists/xbackground.list.chroot +++ /dev/null @@ -1 +0,0 @@ -feh diff --git a/config/package-lists/xbgandscreensaver.list.chroot b/config/package-lists/xbgandscreensaver.list.chroot new file mode 100644 index 0000000..14eecfe --- /dev/null +++ b/config/package-lists/xbgandscreensaver.list.chroot @@ -0,0 +1,2 @@ +feh +xprintidle -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5bb444f0f3464efc4255f43765bca70e0af48ce8 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 4 21:00:31 2019 +0100 fixed download routine for X background images, would not work with multiple URLs --- config/includes.chroot/etc/X11/Xsession.d/60x11-set-background | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background index 1bb981e..9d932af 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -1,5 +1,5 @@ # set screen background to X2Go default blue on all detected screens, unless color or image is specified -XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&') +XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') XROOTMODE=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xrootmode"==$1 {print $2}') IMAGEDIR=/var/tmp/images/ @@ -19,7 +19,7 @@ if [ -n "$XROOT" ] ; then elif echo "$XROOT" | grep -q "://" ; then # this could be an URI # TODO move this download part to an earlier script - wget -P $IMAGEDIR/background/ "${XROOT/|/ }" + wget -P $IMAGEDIR/background/ ${XROOT/|/ } if [ $(ls $IMAGEDIR 2>/dev/null| wc -l) -gt 0 ] ; then #input validation case "${XROOTMODE,,}" in # force lowercase -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 8c5f78d8ff045adb7938cc52cdec5c73c448818e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 00:48:05 2019 +0000 This adds an initrdblankdpmsfix parameter - as the name suggests, it will trigger the blankdpmsfix early in the initrd already --- .../initramfs-tools/hooks/0000-initrdblankdpmsfix | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix new file mode 100755 index 0000000..de63dcc --- /dev/null +++ b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix @@ -0,0 +1,26 @@ +#!/bin/sh +# inject screen blanking/unblanking script into initrd + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions +# Begin real processing below this line + +if [ ! -x "../../lib/live/config/0000-earlyblankdpmsfix" ]; then + exit 0 +fi + +sed -e 's/early/initrd/g' -e 's/Early/Initrd/g' ../../lib/live/config/0000-earlyblankdpmsfix >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +chmod 755 "${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 a4f9e67cb9574e3843d545f37da6e0628891199d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 21:05:28 2019 +0000 typofix --- .../etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver | 2 +- 1 file changed, 1 insertion(+), 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 8fbdc60..1891377 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 @@ -17,7 +17,7 @@ else # this could be an URI # TODO move this download part to an earlier script mkdir -p $IMAGEDIR/slides/ - wget -P $IMAGEDIR/slides/ ${XSAVERIMAGES/|/ } + wget -P $IMAGEDIR/slides/ ${XSAVERIMAGES//|/ } fi IDLE_TIME=$(($XSAVERIDLETIME*1000)) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 f97a97a88e79e4f21cfa712fadbe2a975c6e22de Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 21:13:08 2019 +0000 typofix, also, silence wget and make it only download newer files than the ones already present --- config/includes.chroot/etc/X11/Xsession.d/60x11-set-background | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background index 9d932af..1643523 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -19,7 +19,7 @@ if [ -n "$XROOT" ] ; then elif echo "$XROOT" | grep -q "://" ; then # this could be an URI # TODO move this download part to an earlier script - wget -P $IMAGEDIR/background/ ${XROOT/|/ } + wget -q -P $IMAGEDIR/background/ -N ${XROOT//|/ } if [ $(ls $IMAGEDIR 2>/dev/null| wc -l) -gt 0 ] ; then #input validation case "${XROOTMODE,,}" in # force lowercase -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 be91c0f549cd3a6bcda549bc0cb640dda9d30bf9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 21:10:32 2019 +0000 silence wget and make it only download newer files than the ones already present --- .../etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver | 2 +- 1 file changed, 1 insertion(+), 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 1891377..aafb412 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 @@ -17,7 +17,7 @@ else # this could be an URI # TODO move this download part to an earlier script mkdir -p $IMAGEDIR/slides/ - wget -P $IMAGEDIR/slides/ ${XSAVERIMAGES//|/ } + wget -q -P $IMAGEDIR/slides/ -N ${XSAVERIMAGES//|/ } fi IDLE_TIME=$(($XSAVERIDLETIME*1000)) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 f6b2c9d495e4510ab694d86bb1e05031cffc6707 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 6 23:57:59 2019 +0000 earlyblankdpmsfix can now be called as earlyblankdpmsfix=nnnn, where nnnn is the time in microseconds that each screen should remain blank --- config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix index cd9245d..cfe0d23 100755 --- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -8,13 +8,22 @@ EarlyBlankDPMSFix () echo -n " earlyblankdpmsfix" # code to fix blank screen happening with DisplayPort and some buggy TFTs (even xset q reports "Monitor is on" even though it is pitch black) -if grep -q '\W*earlyblankdpmsfix\W*' /proc/cmdline; then +if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then + SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"earlyblankdpmsfix"==$1 {print $2}' | tr -dc '0-9') + [ -z "$SLEEPTIME" ] && SLEEPTIME=1 + if [ -x /bin/usleep ] ; then + SLEEPCOMMAND="/bin/usleep $SLEEPTIME" + else + SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk works for fractions so we don't need bc + SLEEPCOMMAND="/bin/sleep $SLEEPTIME" + fi ( while ! ( [ -d /sys/class/graphics ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do sleep 1 done for FBDEVICE in /sys/class/graphics/fb[0-9]*; do echo 1 > $FBDEVICE/blank + $SLEEPCOMMAND echo 0 > $FBDEVICE/blank done ) & -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5d99ae64b91767f88e06219511762f8b7977a407 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jan 8 09:02:49 2019 +0000 changed default sleeptime from 1ms to 1s --- config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix index cfe0d23..9e5360f 100755 --- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -10,7 +10,7 @@ echo -n " earlyblankdpmsfix" # code to fix blank screen happening with DisplayPort and some buggy TFTs (even xset q reports "Monitor is on" even though it is pitch black) if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"earlyblankdpmsfix"==$1 {print $2}' | tr -dc '0-9') - [ -z "$SLEEPTIME" ] && SLEEPTIME=1 + [ -z "$SLEEPTIME" ] && SLEEPTIME=1000 if [ -x /bin/usleep ] ; then SLEEPCOMMAND="/bin/usleep $SLEEPTIME" else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 2e9ec9f474441d99caaa838be616dbcc615f6e8f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 11 14:00:09 2019 +0000 we need to make sure we don't fire too early - check that at least one symlink matching fb[0-9]* exists --- config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix index 9e5360f..bc5db17 100755 --- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -18,7 +18,7 @@ if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then SLEEPCOMMAND="/bin/sleep $SLEEPTIME" fi ( - while ! ( [ -d /sys/class/graphics ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do + while ! ( [ -d /sys/class/graphics ] && [ -n "$(find /sys/class/graphics/ -maxdepth 1 -type l -name "fb[0-9]*")" ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do sleep 1 done for FBDEVICE in /sys/class/graphics/fb[0-9]*; do -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 e83af989ab7f86f90acdb6b34e668b825be85968 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 11 14:35:13 2019 +0000 wiggle mouse by 1 px to trigger remote screensaver password prompt --- .../etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver | 2 ++ 1 file changed, 2 insertions(+) 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 aafb412..dca1fe0 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 @@ -45,6 +45,8 @@ else fi # show all things nxproxy ps -C nxproxy -opid= | xargs -n 1 --no-run-if-empty -I XXX xdotool search --pid XXX . | xargs --no-run-if-empty -n 1 xdotool windowmap + # wiggle mouse by 1 px to trigger remote screensaver password prompt + xdotool mousemove_relative -- 1 0 ; xdotool mousemove_relative -- -1 0 BLACK=false fi fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 550566bae0897dd08c2a588f93b512617a4f05b2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 11 14:02:19 2019 +0000 we need to make sure this script is executable under busybox sh as well, also, no output is desired when run from inside initrd --- .../etc/initramfs-tools/hooks/0000-initrdblankdpmsfix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix index 3bbdfbe..f2e2a8d 100755 --- a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix +++ b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix @@ -22,6 +22,11 @@ if [ ! -x "../../lib/live/config/0000-earlyblankdpmsfix" ]; then fi # for some silly reason, this file is needed in two places -sed -e 's/early/initrd/g' -e 's/Early/Initrd/g' ../../lib/live/config/0000-earlyblankdpmsfix | tee "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +sed \ + -e 's#/bin/bash#/bin/sh#' \ + -e '/^echo -n/d' \ + -e 's/early/initrd/g' \ + -e 's/Early/Initrd/g' \ +../../lib/live/config/0000-earlyblankdpmsfix | tee "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" chmod 755 "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" "${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 50537ce5793436099dcbf36f6512b33ff6e09155 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 11 12:27:42 2019 +0000 second copy of file was not chmodded properly (had # in front of path, so never got changed) --- .../includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix index 5648b29..3bbdfbe 100755 --- a/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix +++ b/config/includes.chroot/etc/initramfs-tools/hooks/0000-initrdblankdpmsfix @@ -23,5 +23,5 @@ fi # for some silly reason, this file is needed in two places sed -e 's/early/initrd/g' -e 's/Early/Initrd/g' ../../lib/live/config/0000-earlyblankdpmsfix | tee "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" >"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" -chmod 755 "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" #"${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" +chmod 755 "${DESTDIR}/lib/live/boot/0000-initrdblankdpmsfix" "${DESTDIR}/bin/boot/0000-initrdblankdpmsfix" exit 0 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 34c17705a40b775fddd35d13fe966f88e6259dc0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jan 16 18:27:16 2019 +0000 This script would kill the XServer startup when no XSCREENSAVER-related parameters were set. Also, added defaults for idle and slide display/change time --- .../etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver | 5 ++++- 1 file changed, 4 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 1fa1f68..b924f90 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 @@ -10,7 +10,7 @@ IMAGEDIR="/var/tmp/images/" SLIDESDIR="${IMAGEDIR}/slides/" if [ -z "$XSAVERIMAGES" ] && [ -z "$XSAVERIDLETIME" ] && [ -z "$XSAVERIMGTIME" ] ; then - exit 0 + : # "exit 0" is a bad idea here, so we "NOP" instead else if echo "$XSAVERIMAGES" | grep -q "://" ; then @@ -20,6 +20,9 @@ else wget -q -P $IMAGEDIR/slides/ -N ${XSAVERIMAGES//|/ } fi + [ -z "$XSAVERIDLETIME" ] && XSAVERIDLETIME=300 # default to 5 minutes if parameter wasn't set + [ -z "$XSAVERIMGTIME" ] && XSAVERIMGTIME=30 # default to 30 seconds if parameter wasn't set + IDLE_TIME=$(($XSAVERIDLETIME*1000)) BLACK=false -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 a9c8d50b6579501f044e3a3ccaacee8e0b0df610 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 12 13:52:20 2019 +0000 almost complete rewrite of 60x11-spawn-configure-slideshow-screensaver, as restoring the foreground app(s) didn't work properly --- .../60x11-spawn-configure-slideshow-screensaver | 111 ++++++++++++++++----- 1 file changed, 84 insertions(+), 27 deletions(-) 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 dca1fe0..1fa1f68 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 @@ -23,32 +23,89 @@ else IDLE_TIME=$(($XSAVERIDLETIME*1000)) BLACK=false - while sleep 1; do - idle=$(xprintidle) - [ -z "$idle" ] && exit 1 - if [ $idle -ge $IDLE_TIME ] && ! $BLACK ; then - # hide all things nxproxy - ps -C nxproxy -opid= | xargs -n 1 --no-run-if-empty -I XXX xdotool search --pid XXX . | xargs --no-run-if-empty -n 1 xdotool windowunmap - if [ $(ls $SLIDESDIR 2>/dev/null| wc -l) -gt 0 ] ; then - if ! ps -C feh >/dev/null ; then - feh -Y -x -F -D $XSAVERIMGTIME -Z -B black -q "$SLIDESDIR" & - fi - else - xsetroot -solid "#000000" - fi - BLACK=true - - else - if [ $idle -lt $IDLE_TIME ] && $BLACK ; then - if ps -C feh >/dev/null; then - killall feh + while sleep 1; do + idle=$(xprintidle) + [ -z "$idle" ] && exit 1 + if [ $idle -ge $IDLE_TIME ] && ! $BLACK ; then + # idletime has been exceeded and screen isn't black, so let's take action + + xdotool search --name . set_window --class "hideme" %@ # tag all present windows + xsetroot -solid "#000000" # set background to black so the next command doesn't "flash" the screen with the background color + xdotool search --class "hideme" windowunmap %@ # now move all windows to the background + # if we have local images to show, spawn feh, if it isn't already running + if [ $(ls $SLIDESDIR 2>/dev/null| wc -l) -gt 0 ] ; then + if ! ps -C feh >/dev/null ; then + feh -Y -x -F -D $XSAVERIMGTIME -Z -B black -q "$SLIDESDIR" & + fi + fi + + BLACK=true # set flag showing that we're done + + else + if [ $idle -lt $IDLE_TIME ] && $BLACK ; then + # user action detected and screen is black, so let's take action + + # first, kill feh, if it is running + if ps -C feh >/dev/null; then + killall feh + fi + + # restore all hidden windows to foreground + xdotool search --class "hideme" windowmap %@ + + if ps -C nxproxy >/dev/null ; then # do we have an nxproxy task running? + # if so, keep kicking it into the foreground until it has focus + while [ "$(xdotool getwindowfocus)" != "$(xdotool search --classname "X2GoAgent|NXAgent")" ] ; do + xdotool search --classname "X2GoAgent|NXAgent" windowmap --sync windowfocus --sync + done + # wiggle mouse by 11 px to trigger remote screensaver password prompt (10 px is xscreensaver's default hysteresis) + xdotool sleep 0.1 mousemove_relative -- 11 0 sleep 0.1 mousemove_relative -- -11 0 + ## Option: toggle NumLock instead + # xdotool sleep 0.1 key Num_Lock sleep 0.1 key Num_Lock + elif ps -C Xephyr >/dev/null ; then # do we have a Xephyr task running? + # if so, keep kicking it into the foreground until it has focus + while [ "$(xdotool getwindowfocus)" != "$(xdotool search --classname "Xephyr")" ] ; do + xdotool search --classname "Xephyr" windowmap --sync windowfocus --sync + done + # wiggle mouse by 11 px to trigger remote screensaver password prompt (10 px is xscreensaver's default hysteresis) + xdotool sleep 0.1 mousemove_relative -- 11 0 sleep 0.1 mousemove_relative -- -11 0 + ## Option: toggle NumLock instead + # xdotool sleep 0.1 key Num_Lock sleep 0.1 key Num_Lock + elif ps -C Xnest >/dev/null ; then # do we have an Xnest task running? + # if so, keep kicking it into the foreground until it has focus + while [ "$(xdotool getwindowfocus)" != "$(xdotool search --name "^Xnest$")" ] ; do + xdotool search --name "^Xnest$" windowmap --sync windowfocus --sync + done + # wiggle mouse by 11 px to trigger remote screensaver password prompt (10 px is xscreensaver's default hysteresis) + xdotool sleep 0.1 mousemove_relative -- 11 0 sleep 0.1 mousemove_relative -- -11 0 + ## Option: toggle NumLock instead + # xdotool sleep 0.1 key Num_Lock sleep 0.1 key Num_Lock + elif ps -C xfreerdp >/dev/null ; then # do we have an xfreerdp task running? + # if so, keep kicking it into the foreground until it has focus + while [ "$(xdotool getwindowfocus)" != "$(xdotool search --classname "xfreerdp")" ] ; do + xdotool search --classname "xfreerdp" windowmap --sync windowfocus --sync + done + # wiggle mouse by 11 px to trigger remote screensaver password prompt (10 px is xscreensaver's default hysteresis) + xdotool sleep 0.1 mousemove_relative -- 11 0 sleep 0.1 mousemove_relative -- -11 0 + ## Option: toggle NumLock instead + # xdotool sleep 0.1 key Num_Lock sleep 0.1 key Num_Lock + elif ps -C rdesktop >/dev/null ; then # do we have an rdesktop task running? + # if so, keep kicking it into the foreground until it has focus + while [ "$(xdotool getwindowfocus)" != "$(xdotool search --classname "rdesktop")" ] ; do + xdotool search --classname "rdesktop" windowmap --sync windowfocus --sync + done + # wiggle mouse by 11 px to trigger remote screensaver password prompt (10 px is xscreensaver's default hysteresis) + xdotool sleep 0.1 mousemove_relative -- 11 0 sleep 0.1 mousemove_relative -- -11 0 + ## Option: toggle NumLock instead + # xdotool sleep 0.1 key Num_Lock sleep 0.1 key Num_Lock + else + # if there's no nxproxy/Xephyr/Xnest window, we're likely to be in the login screen, so restore fullscreen X2GoClient Login window + xdotool search --onlyvisible --classname "X2GoClient" windowsize --sync 100% 100% || echo $? fi - # show all things nxproxy - ps -C nxproxy -opid= | xargs -n 1 --no-run-if-empty -I XXX xdotool search --pid XXX . | xargs --no-run-if-empty -n 1 xdotool windowmap - # wiggle mouse by 1 px to trigger remote screensaver password prompt - xdotool mousemove_relative -- 1 0 ; xdotool mousemove_relative -- -1 0 - BLACK=false - fi - fi - done & + + xsetroot -solid "#$HEXCOLOR" # restore old background color + BLACK=false + fi + fi + done & fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 b82648e357db470000243d0a79d15c229adaab5c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 00:34:48 2019 +0000 removed "dropper" files from /lib/live/config and placed the actual files directly in /etc/network/if-up.d/ --- .../etc/network/if-up.d/0050-settime | 49 ++++++++++++++++ .../etc/network/if-up.d/0100-show-sysconf | 52 +++++++++++++++++ .../network/if-up.d/0200-getsshpubkeysfromserver | 48 +++++++++++++++ .../etc/network/if-up.d/0300-getxorgconf | 46 +++++++++++++++ .../etc/network/if-up.d/0400-getsessions | 49 ++++++++++++++++ .../etc/network/if-up.d/0410-getbranding | 46 +++++++++++++++ .../includes.chroot/etc/network/if-up.d/0420-getbg | 46 +++++++++++++++ .../etc/network/if-up.d/0430-getxroot | 46 +++++++++++++++ .../includes.chroot/lib/live/config/2000-settime | 66 --------------------- .../lib/live/config/2100-show-sysconf | 68 ---------------------- .../lib/live/config/2250-getsshpubkeysfromserver | 67 --------------------- .../lib/live/config/2300-xserver-xorg-getxorgconf | 59 ------------------- .../lib/live/config/2700-x2go-getsessions | 62 -------------------- .../lib/live/config/2710-x2go-getbranding | 61 ------------------- .../lib/live/config/2720-x2go-getbg | 61 ------------------- .../lib/live/config/2730-x2go-getxbackground | 61 ------------------- 16 files changed, 382 insertions(+), 505 deletions(-) diff --git a/config/includes.chroot/etc/network/if-up.d/0050-settime b/config/includes.chroot/etc/network/if-up.d/0050-settime new file mode 100755 index 0000000..eead814 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0050-settime @@ -0,0 +1,49 @@ +#!/bin/bash +export TERM=linux; + +if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 +fi + +NTPSERVERS=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^ntp=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.\- ' | \ + tr '[:upper:]' '[:lower:]' ) + +if [ "$NTPSERVERS" = "false" ] || [ "$NTPSERVERS" = "off" ] || [ "$NTPSERVERS" = "0" ] ; then + NTPCOMMAND="false" +elif [ -n "$NTPSERVERS" ] ; then + echo -en "\n$(date +'%F | %T | ')'$0': Using ntp server(s) '$NTPSERVERS'. First working one in list will be used." | tee -a /dev/tty8 + NTPCOMMAND="ntpdate -s -b $NTPSERVERS" +else + echo -en "\n$(date +'%F | %T | ')'$0': Using Debian's default ntp servers." | tee -a /dev/tty8 + NTPCOMMAND="ntpdate-debian -s -b" +fi + + +( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n'$0' is waiting for tty8 to become available." + sleep 2 + done + + while [ -z "$(hostname -I)" ] ; do + echo -en "\n'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + while [ -f /var/lock/ntpdate ] ; do + echo -en "\n'$0' is waiting for a previous ntpdate call to finish." | tee -a /dev/tty8 + sleep 2 + done + echo -en "\n$(date +'%F | %T | ')'$0': Interface '$IFACE' is up - attempting to set time via ntp in 20 seconds ..." | tee -a /dev/tty8 + + sleep 20 # make sure IP, Route, DNS are all up + + if [ "$NTPCOMMAND" = "false" ] ; then + echo -en "\n$(date +'%F | %T | ')'$0' - NTP disabled via boot parameter. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 + elif $NTPCOMMAND && hwclock --systohc ; then + echo -en "\n$(date +'%F | %T | ')'$0' - time has been set." | tee -a /dev/tty8 + else + echo -en "\n$(date +'%F | %T | ')'$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 + fi +) & diff --git a/config/includes.chroot/etc/network/if-up.d/0100-show-sysconf b/config/includes.chroot/etc/network/if-up.d/0100-show-sysconf new file mode 100755 index 0000000..14ac8a4 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0100-show-sysconf @@ -0,0 +1,52 @@ +#!/bin/bash +export TERM=linux; + +# Make sure no language-specific stuff interferes with our matching +# grep: highlight everything that matches "inet" to the end of its line +# and also (-E, |$) show every line that has an end => Everything else + +if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 +fi + +( + if grep -q findiso /proc/cmdline ; then + BOOTEDENV=$(basename $(dirname $(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' $1 == "findiso" { print $2 }')) | tr -dc 'a-zA-Z0-9. _\-') + fi + for TIMESTAMPFILE in /lib/live/mount/rootfs/*/lib; do + TIMESTAMP=$(stat -c %Y $TIMESTAMPFILE) + HUMANTIMESTAMP=$(date --date="@$TIMESTAMP") + done + + # clear old entries + sed -i '/^- /d' /etc/issue + # delete motd call from pam login, so we don't get the same greeting twice when logging in locally + sed -i '/^session optional pam_motd.so/d' /etc/pam.d/login + + + ## enable banner in sshd config if it was disabled + #sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config + + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + IPMSG=$(LANG=C \ + /sbin/ip a | \ + /bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \ + GREP_COLOR="1;32" \ + /bin/grep -P --color=always "link/ether .*? |$" ) + + IPMSG=$( sed 's/^/- /' <<< "$IPMSG" ) + echo "$IPMSG" | tee -a /etc/motd >> /etc/issue + [ -n "$BOOTEDENV" ] && echo "- Booted Environment: $BOOTEDENV" | tee -a /etc/motd >> /etc/issue + [ -n "$TIMESTAMP" ] && echo "- Build Version: $TIMESTAMP ($HUMANTIMESTAMP)" | tee -a /etc/motd >> /etc/issue + + # make sure all unused VTs show the new /etc/issue + ps -C getty --no-header | awk '{ print $1 }' | xargs -n 1 kill -1 +) & diff --git a/config/includes.chroot/etc/network/if-up.d/0200-getsshpubkeysfromserver b/config/includes.chroot/etc/network/if-up.d/0200-getsshpubkeysfromserver new file mode 100755 index 0000000..89ff745 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0200-getsshpubkeysfromserver @@ -0,0 +1,48 @@ +#!/bin/bash +export TERM=linux; +PUBKEYURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^pubkey=/ { print $2 }' |\ + tr -dc 'a-zA-Z0-9.:/?%_\-') + +if [ -n "$PUBKEYURL" ] ; then + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + # Set Keyfile + # + mkdir -p /root/.ssh + chmod 700 /root/.ssh + touch /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting SSH public keyfile download ..." | tee -a /dev/tty8 + if echo "$PUBKEYURL" | grep -q "^tftp://" ; then + PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$PUBKEYSERVER" ] && [ -n "$PUBKEYPATH" ] ; then + while ! atftp "$PUBKEYSERVER" -g -r "$PUBKEYPATH" -l /root/.ssh/authorized_keys ; do + echo -en "\n$(date +'%F | %T | ')'$0': still waiting for download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O - "$PUBKEYURL" >/root/.ssh/authorized_keys ; do + echo -en "\n$(date +'%F | %T | ')'$0': still waiting for download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + echo -en "\n$(date +'%F | %T | ')'$0': SSH public keyfile download complete." | tee -a /dev/tty8 + ) & +fi diff --git a/config/includes.chroot/etc/network/if-up.d/0300-getxorgconf b/config/includes.chroot/etc/network/if-up.d/0300-getxorgconf new file mode 100755 index 0000000..80e376f --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0300-getxorgconf @@ -0,0 +1,46 @@ +#!/bin/bash +export TERM=linux; +XORGCONFURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^xorgconfurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') +if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then + XORGCONFDESTINATION=/etc/X11/xorg.conf.new + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting xorg.conf download ..." | tee -a /dev/tty8 + if echo "$XORGCONFURL" | grep -q "^tftp://" ; then + XORGCONFSERVER=$(echo "$XORGCONFURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$XORGCONFSERVER" ] && [ -n "$XORGCONFPATH" ] ; then + while ! atftp "$XORGCONFSERVER" -g -r "$XORGCONFPATH" -l $XORGCONFDESTINATION ; do + echo -en "\n$(date +'%F | %T | ')'$0': still waiting for xorg.conf download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O $XORGCONFDESTINATION "$XORGCONFURL" ; do + echo -en "\n$(date +'%F | %T | ')'$0': still waiting for xorg.conf download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n$(date +'%F | %T | ')'$0': xorg.conf download complete." | tee -a /dev/tty8 + + if [ -s $XORGCONFDESTINATION ] ; then + mv $XORGCONFDESTINATION /etc/X11/xorg.conf + fi + ) & +fi diff --git a/config/includes.chroot/etc/network/if-up.d/0400-getsessions b/config/includes.chroot/etc/network/if-up.d/0400-getsessions new file mode 100755 index 0000000..d28face --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0400-getsessions @@ -0,0 +1,49 @@ +#!/bin/bash +export TERM=linux; + +SESSIONSURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') +if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + # only mv this file if SESSIONSURL was set. If not, leave it in place - as + # it might have been customized at image creation time + mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old + SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting session config data download ..." | tee -a /dev/tty8 + if echo "$SESSIONSURL" | grep -q "^tftp://" ; then + SESSIONSSERVER=$(echo "$SESSIONSURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$SESSIONSSERVER" ] && [ -n "$SESSIONSPATH" ] ; then + while ! atftp "$SESSIONSSERVER" -g -r "$SESSIONSPATH" -l $SESSIONSDESTINATION ; do + echo -en "\n$(date +'%F | %T | ')still waiting for session config data (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O $SESSIONSDESTINATION "$SESSIONSURL" ; do + echo -en "\n$(date +'%F | %T | ')still waiting for session config data (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n$(date +'%F | %T | ')'$0': session config data download complete." | tee -a /dev/tty8 + if [ -s $SESSIONSDESTINATION ] ; then + mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions + fi + ) & +fi diff --git a/config/includes.chroot/etc/network/if-up.d/0410-getbranding b/config/includes.chroot/etc/network/if-up.d/0410-getbranding new file mode 100755 index 0000000..97e3ca1 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0410-getbranding @@ -0,0 +1,46 @@ +#!/bin/bash +export TERM=linux; +BRANDINGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^branding=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') +BRANDINGDESTINATION=/etc/x2go/branding.svg + +if [ -n "$BRANDINGURL" ] ; then + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting branding SVG download ..." | tee -a /dev/tty8 + if echo "$BRANDINGURL" | grep -q "^tftp://" ; then + BRANDINGSERVER=$(echo "$BRANDINGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) + BRANDINGPATH=$(echo "$BRANDINGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) + if [ -n "$BRANDINGSERVER" ] && [ -n "$BRANDINGPATH" ] ; then + while ! atftp "$BRANDINGSERVER" -g -r "$BRANDINGPATH" -l ${BRANDINGDESTINATION}.tmp ; do + echo -en "\n$(date +'%F | %T | ')still waiting for branding SVG download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O ${BRANDINGDESTINATION}.tmp "$BRANDINGURL" ; do + echo -en "\n$(date +'%F | %T | ')still waiting for branding SVG download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n$(date +'%F | %T | ')'$0': branding SVG download complete." | tee -a /dev/tty8 + if [ -s ${BRANDINGDESTINATION}.tmp ] ; then + mv ${BRANDINGDESTINATION}.tmp $BRANDINGDESTINATION + fi + ) & +fi diff --git a/config/includes.chroot/etc/network/if-up.d/0420-getbg b/config/includes.chroot/etc/network/if-up.d/0420-getbg new file mode 100755 index 0000000..323c091 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0420-getbg @@ -0,0 +1,46 @@ +#!/bin/bash +export TERM=linux; +BGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ + awk -F'=' ' /^bg=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') +BGDESTINATION=/etc/x2go/bg.svg + +if [ -n "$BGURL" ] ; then + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting background SVG download ..." | tee -a /dev/tty8 + if echo "$BGURL" | grep -q "^tftp://" ; then + BGSERVER=$(echo "$BGURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + BGPATH=$(echo "$BGURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$BGSERVER" ] && [ -n "$BGPATH" ] ; then + while ! atftp "$BGSERVER" -g -r "$BGPATH" -l ${BGDESTINATION}.tmp ; do + echo -en "\n$(date +'%F | %T | ')still waiting for background SVG download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O ${BGDESTINATION}.tmp "$BGURL" ; do + echo -en "\n$(date +'%F | %T | ')still waiting for background SVG download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n$(date +'%F | %T | ')'$0': background SVG download complete." | tee -a /dev/tty8 + if [ -s ${BGDESTINATION}.tmp ] ; then + mv ${BGDESTINATION}.tmp $BGDESTINATION + fi + ) & +fi diff --git a/config/includes.chroot/etc/network/if-up.d/0430-getxroot b/config/includes.chroot/etc/network/if-up.d/0430-getxroot new file mode 100755 index 0000000..c710cc1 --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0430-getxroot @@ -0,0 +1,46 @@ +#!/bin/bash +export TERM=linux; +XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') +IMAGEDIR=/var/tmp/images/ +mkdir -p $IMAGEDIR/background + +if [ -n "$XROOT" ] ; then + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting X background download ..." | tee -a /dev/tty8 + if echo "$XROOT" | grep -q "^tftp://" ; then + for SINGLEURL in ${XROOT//|/ }; do + XROOTSERVER=$(echo "$SINGLEROOT" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + XROOTPATH=$(echo "$SINGLEROOT" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$XROOTSERVER" ] && [ -n "$XROOTPATH" ] ; then + while ! (cd ${IMAGEDIR}/background/ && atftp "$XROOTSERVER" -g -r "$XROOTPATH") ; do + echo -en "\n$(date +'%F | %T | ')still waiting for X background download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + done + elif echo "$XROOT" | grep -q "^://" ; then + while ! wget -q -N -P $IMAGEDIR/background ${XROOT//|/ } ; do + echo -en "\n$(date +'%F | %T | ')still waiting for X background download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + else + : # NOP + fi + + echo -en "\n$(date +'%F | %T | ')'$0': X background download complete." | tee -a /dev/tty8 + ) & +fi diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime deleted file mode 100755 index 62242a3..0000000 --- a/config/includes.chroot/lib/live/config/2000-settime +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -SetTime () -{ - -# Output startup message -# -echo -n " settime" - -cat >/etc/network/if-up.d/0050-settime <<SETTIME -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -NTPSERVERS=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ - awk -F'=' ' /^ntp=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.\- ' | \ - tr '[:upper:]' '[:lower:]' ) - -if [ "\$NTPSERVERS" = "false" ] || [ "\$NTPSERVERS" = "off" ] || [ "\$NTPSERVERS" = "0" ] ; then - NTPCOMMAND="false" -elif [ -n "\$NTPSERVERS" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0': Using ntp server(s) '\$NTPSERVERS'. First working one in list will be used." | tee -a /dev/tty8 - NTPCOMMAND="ntpdate -s -b \$NTPSERVERS" -else - echo -en "\n\$(date +'%F | %T | ')'\$0': Using Debian's default ntp servers." | tee -a /dev/tty8 - NTPCOMMAND="ntpdate-debian -s -b" -fi - - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n'\$0' is waiting for tty8 to become available." - sleep 2 - done - - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - while [ -f /var/lock/ntpdate ] ; do - echo -en "\n'\$0' is waiting for a previous ntpdate call to finish." | tee -a /dev/tty8 - sleep 2 - done - echo -en "\n\$(date +'%F | %T | ')'\$0': Interface '\$IFACE' is up - attempting to set time via ntp in 20 seconds ..." | tee -a /dev/tty8 - - sleep 20 # make sure IP, Route, DNS are all up - - if [ "\$NTPCOMMAND" = "false" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0' - NTP disabled via boot parameter. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 - elif \$NTPCOMMAND && hwclock --systohc ; then - echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty8 - else - echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 - fi -) & -SETTIME - -chmod 755 /etc/network/if-up.d/0050-settime - -} - -SetTime diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf deleted file mode 100755 index 70c6625..0000000 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -ShowSysConf () -{ - -# Output startup message -# -echo -n " show-sysconf" - -# Make sure no language-specific stuff interferes with our matching -# grep: highlight everything that matches "inet" to the end of its line -# and also (-E, |$) show every line that has an end => Everything else -cat >/etc/network/if-up.d/0100-show-sysconf <<SHOWSYSCONF -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' \$1 == "findiso" { print \$2 }')) | tr -dc 'a-zA-Z0-9. _\-') - fi - for TIMESTAMPFILE in /lib/live/mount/rootfs/*/lib; do - TIMESTAMP=\$(stat -c %Y \$TIMESTAMPFILE) - HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") - done - - # clear old entries - sed -i '/^- /d' /etc/issue - # delete motd call from pam login, so we don't get the same greeting twice when logging in locally - sed -i '/^session optional pam_motd.so/d' /etc/pam.d/login - - - ## enable banner in sshd config if it was disabled - #sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config - - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - IPMSG=\$(LANG=C \ - /sbin/ip a | \ - /bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \ - GREP_COLOR="1;32" \ - /bin/grep -P --color=always "link/ether .*? |$" ) - - IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ) - echo "\$IPMSG" | tee -a /etc/motd >> /etc/issue - [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" | tee -a /etc/motd >> /etc/issue - [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" | tee -a /etc/motd >> /etc/issue - - # make sure all unused VTs show the new /etc/issue - ps -C getty --no-header | awk '{ print \$1 }' | xargs -n 1 kill -1 -) & -SHOWSYSCONF - -chmod 755 /etc/network/if-up.d/0100-show-sysconf - -} - -ShowSysConf diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver deleted file mode 100755 index 8a27c3e..0000000 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -GetSSHPubKeysFromServer () -{ - - # Output startup message - # - echo -n " getsshpubkeysfromserver" - - - PUBKEYURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^pubkey=/ { print $2 }' |\ - tr -dc 'a-zA-Z0-9.:/?%_\-') - - if [ -n "$PUBKEYURL" ] ; then - cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - # Set Keyfile - # - mkdir -p /root/.ssh - chmod 700 /root/.ssh - touch /root/.ssh/authorized_keys - chmod 600 /root/.ssh/authorized_keys - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting SSH public keyfile download ..." | tee -a /dev/tty8 - if echo "$PUBKEYURL" | grep -q "^tftp://" ; then - PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) - if [ -n "\$PUBKEYSERVER" ] && [ -n "\$PUBKEYPATH" ] ; then - while ! atftp "\$PUBKEYSERVER" -g -r "\$PUBKEYPATH" -l /root/.ssh/authorized_keys ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for download (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - else - while ! wget -q -O - "$PUBKEYURL" >/root/.ssh/authorized_keys ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for download (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - echo -en "\n\$(date +'%F | %T | ')'\$0': SSH public keyfile download complete." | tee -a /dev/tty8 -) & -GETPUBKEY - - chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver - fi - -} - -GetSSHPubKeysFromServer - diff --git a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf deleted file mode 100755 index 60b4b56..0000000 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -XServerXorgGetXorgConf () -{ -# Output startup message -# -echo -n " xserver-xorg-getxorgconf" - - XORGCONFURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^xorgconfurl=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') - if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then - XORGCONFDESTINATION=/etc/X11/xorg.conf.new - cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting xorg.conf download ..." | tee -a /dev/tty8 - if echo "$XORGCONFURL" | grep -q "^tftp://" ; then - XORGCONFSERVER=$(echo "$XORGCONFURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) - if [ -n "\$XORGCONFSERVER" ] && [ -n "\$XORGCONFPATH" ] ; then - while ! atftp "\$XORGCONFSERVER" -g -r "\$XORGCONFPATH" -l $XORGCONFDESTINATION ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for xorg.conf download (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - else - while ! wget -q -O $XORGCONFDESTINATION "$XORGCONFURL" ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for xorg.conf download (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - - echo -en "\n\$(date +'%F | %T | ')'\$0': xorg.conf download complete." | tee -a /dev/tty8 - - if [ -s $XORGCONFDESTINATION ] ; then - mv $XORGCONFDESTINATION /etc/X11/xorg.conf - fi -) & -GETXORG - chmod 755 /etc/network/if-up.d/0300-getxorgconf - fi -} -XServerXorgGetXorgConf diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions deleted file mode 100755 index d668cff..0000000 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -X2GoGetSessions () -{ - # Output startup message - # - echo -n " x2go-getsessions" - - SESSIONSURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') - if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then - # only mv this file if SESSIONSURL was set. If not, leave it in place - as - # it might have been customized at image creation time - mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old - SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - cat >/etc/network/if-up.d/0400-getsessions <<GETSESS -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting session config data download ..." | tee -a /dev/tty8 - if echo "$SESSIONSURL" | grep -q "^tftp://" ; then - SESSIONSSERVER=$(echo "$SESSIONSURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) - if [ -n "\$SESSIONSSERVER" ] && [ -n "\$SESSIONSPATH" ] ; then - while ! atftp "\$SESSIONSSERVER" -g -r "\$SESSIONSPATH" -l $SESSIONSDESTINATION ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for session config data (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - else - while ! wget -q -O $SESSIONSDESTINATION "$SESSIONSURL" ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for session config data (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - - echo -en "\n\$(date +'%F | %T | ')'\$0': session config data download complete." | tee -a /dev/tty8 - if [ -s $SESSIONSDESTINATION ] ; then - mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions - fi -) & -GETSESS - chmod 755 /etc/network/if-up.d/0400-getsessions - fi -} - -X2GoGetSessions diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding deleted file mode 100755 index 6147dd6..0000000 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -X2GoGetBranding () -{ - # Output startup message - # - echo -n " x2go-getbranding" - - - BRANDINGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^branding=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') - BRANDINGDESTINATION=/etc/x2go/branding.svg - - if [ -n "$BRANDINGURL" ] ; then - cat >/etc/network/if-up.d/0410-getbranding <<GETBRAND -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting branding SVG download ..." | tee -a /dev/tty8 - if echo "$BRANDINGURL" | grep -q "^tftp://" ; then - BRANDINGSERVER=$(echo "$BRANDINGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) - BRANDINGPATH=$(echo "$BRANDINGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) - if [ -n "\$BRANDINGSERVER" ] && [ -n "\$BRANDINGPATH" ] ; then - while ! atftp "\$BRANDINGSERVER" -g -r "\$BRANDINGPATH" -l ${BRANDINGDESTINATION}.tmp ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - else - while ! wget -q -O ${BRANDINGDESTINATION}.tmp "$BRANDINGURL" ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - - echo -en "\n\$(date +'%F | %T | ')'\$0': branding SVG download complete." | tee -a /dev/tty8 - if [ -s ${BRANDINGDESTINATION}.tmp ] ; then - mv ${BRANDINGDESTINATION}.tmp $BRANDINGDESTINATION - fi -) & -GETBRAND - chmod 755 /etc/network/if-up.d/0410-getbranding - fi -} - -X2GoGetBranding diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg deleted file mode 100755 index 67a5660..0000000 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -X2GoGetBG () -{ - # Output startup message - # - echo -n " x2go-getbg" - - - BGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ - awk -F'=' ' /^bg=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') - BGDESTINATION=/etc/x2go/bg.svg - - if [ -n "$BGURL" ] ; then - cat >/etc/network/if-up.d/0420-getbg <<GETBG -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting background SVG download ..." | tee -a /dev/tty8 - if echo "$BGURL" | grep -q "^tftp://" ; then - BGSERVER=$(echo "$BGURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - BGPATH=$(echo "$BGURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) - if [ -n "\$BGSERVER" ] && [ -n "\$BGPATH" ] ; then - while ! atftp "\$BGSERVER" -g -r "\$BGPATH" -l ${BGDESTINATION}.tmp ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - else - while ! wget -q -O ${BGDESTINATION}.tmp "$BGURL" ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - - echo -en "\n\$(date +'%F | %T | ')'\$0': background SVG download complete." | tee -a /dev/tty8 - if [ -s ${BGDESTINATION}.tmp ] ; then - mv ${BGDESTINATION}.tmp $BGDESTINATION - fi -) & -GETBG - chmod 755 /etc/network/if-up.d/0420-getbg - fi -} - -X2GoGetBG diff --git a/config/includes.chroot/lib/live/config/2730-x2go-getxbackground b/config/includes.chroot/lib/live/config/2730-x2go-getxbackground deleted file mode 100755 index 9e818a4..0000000 --- a/config/includes.chroot/lib/live/config/2730-x2go-getxbackground +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -X2GoGetXROOT () -{ - # Output startup message - # - echo -n " x2go-getxroot" - - - XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') - IMAGEDIR=/var/tmp/images/ - mkdir -p $IMAGEDIR/background - - if [ -n "$XROOT" ] ; then - cat >/etc/network/if-up.d/0430-getxroot <<GETXROOT -#!/bin/bash -export TERM=linux; - -if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then - exit 0 -fi - -( - while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." - sleep 2 - done - while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - sleep 2 - done - - echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting X background download ..." | tee -a /dev/tty8 - if echo "$XROOT" | grep -q "^tftp://" ; then - for SINGLEURL in ${XROOT//|/ }; do - XROOTSERVER=$(echo "$SINGLEROOT" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - XROOTPATH=$(echo "$SINGLEROOT" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) - if [ -n "\$XROOTSERVER" ] && [ -n "\$XROOTPATH" ] ; then - while ! (cd ${IMAGEDIR}/background/ && atftp "\$XROOTSERVER" -g -r "\$XROOTPATH") ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for X background download (tftp) ..." | tee -a /dev/tty8 - sleep 5 - done - fi - done - elif echo "$XROOT" | grep -q "^://" ; then - while ! wget -q -N -P $IMAGEDIR/background ${XROOT//|/ } ; do - echo -en "\n\$(date +'%F | %T | ')still waiting for X background download (wget) ..." | tee -a /dev/tty8 - sleep 5 - done - else - : # NOP - fi - - echo -en "\n\$(date +'%F | %T | ')'\$0': X background download complete." | tee -a /dev/tty8 -) & -GETXROOT - chmod 755 /etc/network/if-up.d/0430-getxroot - fi -} - -X2GoGetXROOT -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 dfa10c735d3918e3fcaedebb973eb7c0636449d7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 18 21:12:52 2019 +0000 added support for background images (well, a single image, actually, and no solid colors) via xroot= boot parameter in MATE-MiniDesktop mode --- .../includes.chroot/etc/X11/Xsession.d/60x11-set-background | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background index 1643523..e3b6b90 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background @@ -3,8 +3,6 @@ XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \( XROOTMODE=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xrootmode"==$1 {print $2}') IMAGEDIR=/var/tmp/images/ -# TODO: mate-minidesktop: image is stored as /usr/share/backgrounds/x2go/x2gothinclient-minidesktop_background.svg - needs to be svg - if [ -n "$XROOT" ] ; then XROOTSHORT=$(echo "$XROOT" | tr -dc '0-9a-fA-Fx') @@ -30,7 +28,16 @@ if [ -n "$XROOT" ] ; then *) POSITION=max ;; esac # POSITION: center fill max scale tile; default: max - feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* + if [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then + # 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. + 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 + else + feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* + fi else xsetroot -grey # show that something's amiss fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6767c79aa2eaa897222002b5b8fff8da8b70870c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 18 22:25:43 2019 +0000 moved X background download to earlier script and renamed 60x11-set-background to 60x11-set-xbackground, to avoid confusion with the X2GoClient branding background image downloader --- ...{60x11-set-background => 60x11-set-xbackground} | 2 - .../lib/live/config/2730-x2go-getxbackground | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground similarity index 94% rename from config/includes.chroot/etc/X11/Xsession.d/60x11-set-background rename to config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground index e3b6b90..829e896 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-background +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground @@ -16,8 +16,6 @@ if [ -n "$XROOT" ] ; then fi elif echo "$XROOT" | grep -q "://" ; then # this could be an URI - # TODO move this download part to an earlier script - wget -q -P $IMAGEDIR/background/ -N ${XROOT//|/ } if [ $(ls $IMAGEDIR 2>/dev/null| wc -l) -gt 0 ] ; then #input validation case "${XROOTMODE,,}" in # force lowercase diff --git a/config/includes.chroot/lib/live/config/2730-x2go-getxbackground b/config/includes.chroot/lib/live/config/2730-x2go-getxbackground new file mode 100755 index 0000000..1a0d90e --- /dev/null +++ b/config/includes.chroot/lib/live/config/2730-x2go-getxbackground @@ -0,0 +1,61 @@ +#!/bin/sh + +X2GoGetXROOT () +{ + # Output startup message + # + echo -n " x2go-getxroot" + + + XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') + IMAGEDIR=/var/tmp/images/ + mkdir $IMAGEDIR/background + + if [ -n "$XROOT" ] ; then + cat >/etc/network/if-up.d/0430-getxroot <<GETXROOT +#!/bin/bash +export TERM=linux; + +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then + exit 0 +fi + +( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting X background download ..." | tee -a /dev/tty8 + if echo "$XROOT" | grep -q "^tftp://" ; then + for SINGLEURL in ${XROOT//|/ }; do + XROOTSERVER=$(echo "$SINGLEROOT" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + XROOTPATH=$(echo "$SINGLEROOT" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "\$XROOTSERVER" ] && [ -n "\$XROOTPATH" ] ; then + while ! (cd ${IMAGEDIR}/background/ && atftp "\$XROOTSERVER" -g -r "\$XROOTPATH" ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for X background download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + done + elif echo "$XROOT" | grep -q "^://" ; then + while ! wget -q -N -P $IMAGEDIR/background ${XROOT//|/ } ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for X background download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + else + : # NOP + fi + + echo -en "\n\$(date +'%F | %T | ')'\$0': X background download complete." | tee -a /dev/tty8 +) & +GETXROOT + chmod 755 /etc/network/if-up.d/0430-getxroot + fi +} + +X2GoGetXROOT -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 90f0c3b5dfead911022ed6c40fe8996e43fd4fe4 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jan 18 23:09:22 2019 +0000 typo- and sloppiness-fixes --- config/includes.chroot/lib/live/config/2730-x2go-getxbackground | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2730-x2go-getxbackground b/config/includes.chroot/lib/live/config/2730-x2go-getxbackground index 1a0d90e..9e818a4 100755 --- a/config/includes.chroot/lib/live/config/2730-x2go-getxbackground +++ b/config/includes.chroot/lib/live/config/2730-x2go-getxbackground @@ -9,7 +9,7 @@ X2GoGetXROOT () XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') IMAGEDIR=/var/tmp/images/ - mkdir $IMAGEDIR/background + mkdir -p $IMAGEDIR/background if [ -n "$XROOT" ] ; then cat >/etc/network/if-up.d/0430-getxroot <<GETXROOT @@ -36,7 +36,7 @@ fi XROOTSERVER=$(echo "$SINGLEROOT" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) XROOTPATH=$(echo "$SINGLEROOT" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) if [ -n "\$XROOTSERVER" ] && [ -n "\$XROOTPATH" ] ; then - while ! (cd ${IMAGEDIR}/background/ && atftp "\$XROOTSERVER" -g -r "\$XROOTPATH" ; do + while ! (cd ${IMAGEDIR}/background/ && atftp "\$XROOTSERVER" -g -r "\$XROOTPATH") ; do echo -en "\n\$(date +'%F | %T | ')still waiting for X background download (tftp) ..." | tee -a /dev/tty8 sleep 5 done -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 f041405448a8323961a73fa38a3fe76dfc392dbd Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 02:49:34 2019 +0000 check if /etc/x2go/x2gothinclient_sessions exists, move to /etc/x2go/x2gothinclient_sessions_old if yes, touch /etc/x2go/x2gothinclient_sessions_old if no --- config/includes.chroot/etc/network/if-up.d/0400-getsessions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/etc/network/if-up.d/0400-getsessions b/config/includes.chroot/etc/network/if-up.d/0400-getsessions index d28face..66133ca 100755 --- a/config/includes.chroot/etc/network/if-up.d/0400-getsessions +++ b/config/includes.chroot/etc/network/if-up.d/0400-getsessions @@ -7,7 +7,11 @@ SESSIONSURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then # only mv this file if SESSIONSURL was set. If not, leave it in place - as # it might have been customized at image creation time - mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old + if [ -e /etc/x2go/x2gothinclient_sessions ]; then + mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old + else + touch /etc/x2go/x2gothinclient_sessions_old + fi SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 f6720cae3346d9a1be5866818e014bb9f3a1eed2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 02:07:43 2019 +0000 typofix --- config/includes.chroot/etc/network/if-up.d/0430-getxroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c710cc1..1ec086d 100755 --- a/config/includes.chroot/etc/network/if-up.d/0430-getxroot +++ b/config/includes.chroot/etc/network/if-up.d/0430-getxroot @@ -32,7 +32,7 @@ if [ -n "$XROOT" ] ; then done fi done - elif echo "$XROOT" | grep -q "^://" ; then + elif echo "$XROOT" | grep -q "://" ; then while ! wget -q -N -P $IMAGEDIR/background ${XROOT//|/ } ; do echo -en "\n$(date +'%F | %T | ')still waiting for X background download (wget) ..." | tee -a /dev/tty8 sleep 5 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 fb4c586d77e95861dcb6244f5e654658b0053884 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 02:51:13 2019 +0000 renamed 0050-settime to ntpdate, to overwrite the package-provided ntpdate script --- config/includes.chroot/etc/network/if-up.d/{0050-settime => ntpdate} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/etc/network/if-up.d/0050-settime b/config/includes.chroot/etc/network/if-up.d/ntpdate similarity index 100% rename from config/includes.chroot/etc/network/if-up.d/0050-settime rename to config/includes.chroot/etc/network/if-up.d/ntpdate -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 3dc9b9dc5d1ae8c2d775a3aaa4f17bd9cf1b32de Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 16:56:37 2019 +0000 reworked 60x11-set-xbackground: URL takes precedence over Hex color; when in minidesktop mode, wait until file has been downloaded before continuing, else wait in background --- .../etc/X11/Xsession.d/60x11-set-xbackground | 64 +++++++++++++--------- 1 file changed, 37 insertions(+), 27 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 f38b08d..6897f12 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground @@ -4,9 +4,43 @@ XROOTMODE=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"xrootmode"==$1 {print IMAGEDIR=/var/tmp/images/ if [ -n "$XROOT" ] ; then + + #input validation + # allowed values for POSITION: center fill max scale tile; default: max + case "${XROOTMODE,,}" in # force lowercase + "center") POSITION=center ;; + "fill") POSITION=fill ;; + "scale") POSITION=scale ;; + "tile") POSITION=tile ;; + *) POSITION=max ;; + esac + XROOTSHORT=$(echo "$XROOT" | tr -dc '0-9a-fA-Fx') - if echo "$XROOTSHORT" | grep -q '^0x' && [ 8 = ${#XROOTSHORT} ] ; then + if echo "$XROOT" | grep -q "://" ; then + # this could be an URI + if [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then + # 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 + 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 + else + ( + while ! [ $(ls -1 $IMAGEDIR/background/* 2>/dev/null | wc -l) -gt 0 ] ; do + xsetroot -grey # show that something's amiss + sleep 1 + done + feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* + ) & + fi + + elif echo "$XROOTSHORT" | grep -q '^0x' && [ 8 = ${#XROOTSHORT} ] ; then # this should be a hex color string HEXCOLOR=${XROOTSHORT#0x} if [ 6 = ${#HEXCOLOR} ] ; then @@ -14,32 +48,8 @@ if [ -n "$XROOT" ] ; then else xsetroot -grey # show that something's amiss fi - elif echo "$XROOT" | grep -q "://" ; then - # this could be an URI - if [ $(ls $IMAGEDIR 2>/dev/null| wc -l) -gt 0 ] ; then - #input validation - case "${XROOTMODE,,}" in # force lowercase - "center") POSITION=center ;; - "fill") POSITION=fill ;; - "scale") POSITION=scale ;; - "tile") POSITION=tile ;; - *) POSITION=max ;; - esac - # POSITION: center fill max scale tile; default: max - if [ -f "/etc/x2go/x2gothinclient-minidesktop_start" ] ; then - # 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 - else - feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* - fi - else - xsetroot -grey # show that something's amiss - fi + else + : # NOP fi else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 dc6423c8f15c515b1b616e662fcaa824cd8eec75 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 17:46:49 2019 +0000 added log output --- .../includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 6897f12..f1978bc 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground @@ -19,24 +19,30 @@ 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 ( 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 xsetroot -grey # show that something's amiss sleep 1 done feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* + echo -n "\n$(date +'%F | %T | ')'$0' New X background image(s) has/have been set." | tee -a /dev/tty8 ) & fi @@ -45,8 +51,10 @@ if [ -n "$XROOT" ] ; then HEXCOLOR=${XROOTSHORT#0x} if [ 6 = ${#HEXCOLOR} ] ; then xsetroot -solid "#$HEXCOLOR" # set requested color + echo -n "\n$(date +'%F | %T | ')'$0' New X background color has been set." | tee -a /dev/tty8 else xsetroot -grey # show that something's amiss + echo -n "\n$(date +'%F | %T | ')'$0' Error: X background color has been set to grey grid." | tee -a /dev/tty8 fi else : # NOP @@ -55,5 +63,7 @@ if [ -n "$XROOT" ] ; then else # set our default color xsetroot -solid "#246ed8" + echo -n "\n$(date +'%F | %T | ')'$0' Default X background color has been set." | tee -a /dev/tty8 fi +echo -n "\n$(date +'%F | %T | ')'$0' Done." | 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
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 990abda011249a46ff66f1169034c633843e1d60 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 15:36:26 2019 +0000 the move of x2gothinclient_sessions to x2gothinclient_sessions_old must only be triggered when we're touching an external interface, not "loopback" or similar --- config/includes.chroot/etc/network/if-up.d/0400-getsessions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/etc/network/if-up.d/0400-getsessions b/config/includes.chroot/etc/network/if-up.d/0400-getsessions index 66133ca..660b56a 100755 --- a/config/includes.chroot/etc/network/if-up.d/0400-getsessions +++ b/config/includes.chroot/etc/network/if-up.d/0400-getsessions @@ -1,6 +1,10 @@ #!/bin/bash export TERM=linux; +if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 +fi + SESSIONSURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \ awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ tr -dc 'a-zA-Z0-9.:/?%_\-') @@ -14,10 +18,6 @@ if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then fi SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then - exit 0 - fi - ( while ! [ -c /dev/tty8 ] ; do echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6cbb3bab42601f76c00b871ecc59d23378e33a70 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 19:18:38 2019 +0000 added some sanity checks and debug output --- config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start | 8 ++++++-- .../etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start b/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start index 9835ae9..d8f59ca 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-openbox-start @@ -1,4 +1,8 @@ # Spawn openbox -openbox & -echo -en "\n$(date +'%F | %T | ')'$0' spawned OpenBox." | tee -a /dev/tty8 +if [ -x /usr/bin/openbox ] ; then + openbox & + echo -en "\n$(date +'%F | %T | ')'$0' spawned OpenBox." | tee -a /dev/tty8 +else + echo -en "\n$(date +'%F | %T | ')'$0' Not spawning OpenBox - executable not found. (MiniDesktop active?)" | tee -a /dev/tty8 +fi diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio index bbaf2d8..6331469 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio @@ -1,6 +1,9 @@ # Spawn PulseAudio -if ! ps -C pulseaudio >/dev/null ; then +if ! ps -C pulseaudio >/dev/null && [ -x /usr/bin/pulseaudio ] ; then pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & + echo -en "\n$(date +'%F | %T | ')'$0' spawned PulseAudio." | tee -a /dev/tty8 +else + echo -en "\n$(date +'%F | %T | ')'$0' Not spawning Pulseaudio - already running (MiniDesktop active?) or executable not found." | tee -a /dev/tty8 fi AUDIOOUT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^audioout=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@|') -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 1d2db69988f05508e7abd70754cb30ea4881abf0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 19:58:54 2019 +0000 we need to add the user ("user" or "x2gothinclient") to the group tty early on, to allow on-screen logging on tty8 and tty9 --- .../lib/live/config/2210-adduser2tty | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2210-adduser2tty b/config/includes.chroot/lib/live/config/2210-adduser2tty new file mode 100755 index 0000000..9132cc8 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2210-adduser2tty @@ -0,0 +1,21 @@ +#!/bin/bash + +AddUser2TTY () +{ + +# Output startup message +# +echo -n " adduser2tty" + +# this is so that we can log to tty8 (status) and tty9 (debug) +if [ -n "$(getent passwd user 2>/dev/null)" ] ; then + adduser user tty +elif [ -n "$(getent passwd x2gothinclient 2>/dev/null)" ] ; then + adduser x2gothinclient tty +else + : # NOP +fi + +} + +AddUser2TTY -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 c5dc9ac78b2415955d1b35b480159f556e0fed13 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 15:39:36 2019 +0000 changed method of background image display in mate-minidesktop mode --- config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground | 5 +++-- 1 file changed, 3 insertions(+), 2 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 829e896..f38b08d 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-set-xbackground @@ -31,8 +31,9 @@ if [ -n "$XROOT" ] ; then # 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. - 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 + 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 else feh --no-fehbg --bg-$POSITION $IMAGEDIR/background/* fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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@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
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 0cc5bcb55f996f391444af9603fdff3d81e91548 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 26 08:08:01 2019 +0000 added mesa-related package; added ATI Rage 128 xorg driver package for i386 to check if it Segfaults X.org on Jessie i386 (it does on Stretch i386) --- config/package-lists/desktop.list.chroot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 0719ad3..1e9d277 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -4,6 +4,8 @@ xserver-xorg-input-all xserver-xorg-input-wacom xserver-xorg-video-all # for i386 only #xserver-xorg-video-geode +# for i386 only #xserver-xorg-video-r128 +libgl1-mesa-dri xserver-xorg-video-qxl xserver-xorg nodm -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 cfee4a9a8f90a79ff050843a9bcfbc05cdc87a98 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 26 08:58:56 2019 +0000 r128 driver can go in for amd64 as well --- config/package-lists/desktop.list.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 1e9d277..25bd869 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -4,7 +4,7 @@ xserver-xorg-input-all xserver-xorg-input-wacom xserver-xorg-video-all # for i386 only #xserver-xorg-video-geode -# for i386 only #xserver-xorg-video-r128 +xserver-xorg-video-r128 libgl1-mesa-dri xserver-xorg-video-qxl xserver-xorg -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6d58d6b200c9da1678b3e9b20b54f00831c7cc71 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 1 14:36:38 2019 +0000 variable cleanup --- .../etc/X11/Xsession.d/60x11-spawn-configure-slideshow-screensaver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b924f90..859884d 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 @@ -16,8 +16,8 @@ else if echo "$XSAVERIMAGES" | grep -q "://" ; then # this could be an URI # TODO move this download part to an earlier script - mkdir -p $IMAGEDIR/slides/ - wget -q -P $IMAGEDIR/slides/ -N ${XSAVERIMAGES//|/ } + mkdir -p $SLIDESDIR + wget -q -P $SLIDESDIR -N ${XSAVERIMAGES//|/ } fi [ -z "$XSAVERIDLETIME" ] && XSAVERIDLETIME=300 # default to 5 minutes if parameter wasn't set -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 bb41f149dd6f4164bdf901ce206069ae6d1f4147 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 1 14:45:22 2019 +0000 further variable cleanup/fixup --- .../includes.chroot/etc/network/if-up.d/0430-getxroot | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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 9cdd6f9..138d673 100755 --- a/config/includes.chroot/etc/network/if-up.d/0430-getxroot +++ b/config/includes.chroot/etc/network/if-up.d/0430-getxroot @@ -2,7 +2,9 @@ export TERM=linux; XROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xroot" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') IMAGEDIR=/var/tmp/images/ -mkdir -p $IMAGEDIR/background +BACKGROUNDDIR=${IMAGEDIR}/background/ + +mkdir -p $BACKGROUNDDIR if [ -n "$XROOT" ] ; then @@ -22,18 +24,18 @@ if [ -n "$XROOT" ] ; then echo -en "\n$(date +'%F | %T | ')'$0': Attempting X background download ..." | tee -a /dev/tty8 if echo "$XROOT" | grep -q "^tftp://" ; then - for SINGLEURL in ${XROOT//|/ }; do - XROOTSERVER=$(echo "$SINGLEROOT" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) - XROOTPATH=$(echo "$SINGLEROOT" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + for SINGLEROOTURL in ${XROOT//|/ }; do + XROOTSERVER=$(echo "$SINGLEROOTURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + XROOTPATH=$(echo "$SINGLEROOTURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) if [ -n "$XROOTSERVER" ] && [ -n "$XROOTPATH" ] ; then - while ! (cd ${IMAGEDIR}/background/ && atftp "$XROOTSERVER" -g -r "$XROOTPATH") ; do + while ! (cd $BACKGROUNDDIR && atftp "$XROOTSERVER" -g -r "$XROOTPATH") ; do echo -en "\n$(date +'%F | %T | ')still waiting for X background download (tftp) ..." | tee -a /dev/tty8 sleep 5 done fi done elif echo "$XROOT" | grep -q "://" ; then - while ! wget -q -N -P $IMAGEDIR/background ${XROOT//|/ } ; do + while ! wget -q -N -P $BACKGROUNDDIR ${XROOT//|/ } ; do echo -en "\n$(date +'%F | %T | ')still waiting for X background download (wget) ..." | tee -a /dev/tty8 sleep 5 done @@ -50,9 +52,9 @@ if [ -n "$XROOT" ] ; then # 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 + cat $(ls -1 ${BACKGROUNDDIR}/*| 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 + # update-alternatives --install /usr/share/images/desktop-base/desktop-background desktop-background $(ls -1 ${BACKGROUNDDIR}/*| head -1) 10 echo -n "\n$(date +'%F | %T | ')'$0' New MiniDesktop background has been set." | tee -a /dev/tty8 fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 c27a99ef9d4688293f39c0edc45ba9a013c4ae28 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 19 20:03:47 2019 +0000 write permission to tty is now handled by a separate script --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index bc59285..2d788c1 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -19,9 +19,6 @@ sed -i -e '\#<applications>#a<application title="X2Go Client" type="normal">' -e #make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient sed -i -e '/ToggleMaximize/d' /etc/xdg/openbox/rc.xml -# this is so that xsession can log to tty8 -adduser user tty - # this is for additional debug logging if grep -q ' tcedebug' /proc/cmdline; then touch /var/log/x2goclient -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 3b2e206427eff03f07f5a2625ebe0cb21bcae242 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 1 14:51:20 2019 +0000 moved screensaver image download to if-up.d where it belongs --- .../60x11-spawn-configure-slideshow-screensaver | 7 --- .../etc/network/if-up.d/0440-getxscreensaverimgs | 50 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 7 deletions(-) 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 859884d..a8427a1 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 @@ -13,13 +13,6 @@ if [ -z "$XSAVERIMAGES" ] && [ -z "$XSAVERIDLETIME" ] && [ -z "$XSAVERIMGTIME" ] : # "exit 0" is a bad idea here, so we "NOP" instead else - if echo "$XSAVERIMAGES" | grep -q "://" ; then - # this could be an URI - # TODO move this download part to an earlier script - mkdir -p $SLIDESDIR - wget -q -P $SLIDESDIR -N ${XSAVERIMAGES//|/ } - fi - [ -z "$XSAVERIDLETIME" ] && XSAVERIDLETIME=300 # default to 5 minutes if parameter wasn't set [ -z "$XSAVERIMGTIME" ] && XSAVERIMGTIME=30 # default to 30 seconds if parameter wasn't set diff --git a/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs b/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs new file mode 100755 index 0000000..4f1ed2c --- /dev/null +++ b/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs @@ -0,0 +1,50 @@ +#!/bin/bash +export TERM=linux; +XSAVERIMAGES=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "xsaverimages" { print $2 }' | tr -dc '0-9a-zA-Z,$-_.+!*'"'"'();/?:@=&|') + +IMAGEDIR=/var/tmp/images/ +SLIDESDIR="${IMAGEDIR}/slides/" + +mkdir -p $SLIDESDIR + +if [ -n "$XSAVERIMAGES" ] ; then + + if [ "$METHOD" = "loopback" ] || [ "$METHOD" = "none" ]; then + exit 0 + fi + + ( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "$(hostname -I)" ] ; do + echo -en "\n$(date +'%F | %T | ')'$0' is waiting for a client IP." | tee -a /dev/tty8 + sleep 2 + done + + echo -en "\n$(date +'%F | %T | ')'$0': Attempting screensaver image/images download ..." | tee -a /dev/tty8 + if echo "$XSAVERIMAGES" | grep -q "^tftp://" ; then + for SINGLEXSAVERIMAGEURL in ${XSAVERIMAGES//|/ }; do + XSAVERIMAGESERVER=$(echo "$SINGLEXSAVERIMAGEURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + XSAVERIMAGEPATH=$(echo "$SINGLEXSAVERIMAGEURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) + if [ -n "$XSAVERIMAGESERVER" ] && [ -n "$XSERVERIMAGEPATH" ] ; then + while ! (cd $SLIDESDIR && atftp "$XSAVERIMAGESERVER" -g -r "$XSAVERIMAGEPATH") ; do + echo -en "\n$(date +'%F | %T | ')still waiting for screensaver download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + done + elif echo "$XROOT" | grep -q "://" ; then + while ! wget -q -N -P $SLIDESDIR ${XSAVERIMAGES//|/ } ; do + echo -en "\n$(date +'%F | %T | ')still waiting for screensaver download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + else + : # NOP + fi + + echo -en "\n$(date +'%F | %T | ')'$0': Screensaver download complete." | tee -a /dev/tty8 + + ) & +fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 b715838aa94f58792e8bc7e4b26c735957c72636 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Feb 1 20:16:48 2019 +0000 yet another variable fix --- config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4f1ed2c..307dcfd 100755 --- a/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs +++ b/config/includes.chroot/etc/network/if-up.d/0440-getxscreensaverimgs @@ -35,7 +35,7 @@ if [ -n "$XSAVERIMAGES" ] ; then done fi done - elif echo "$XROOT" | grep -q "://" ; then + elif echo "$XSAVERIMAGES" | grep -q "://" ; then while ! wget -q -N -P $SLIDESDIR ${XSAVERIMAGES//|/ } ; do echo -en "\n$(date +'%F | %T | ')still waiting for screensaver download (wget) ..." | tee -a /dev/tty8 sleep 5 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 59e608938b6b4b53fb12516a3caa115dd1946069 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Feb 6 12:25:56 2019 +0000 usleep uses microseconds, not milliseconds --- config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix index bc5db17..32be175 100755 --- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -12,7 +12,7 @@ if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"earlyblankdpmsfix"==$1 {print $2}' | tr -dc '0-9') [ -z "$SLEEPTIME" ] && SLEEPTIME=1000 if [ -x /bin/usleep ] ; then - SLEEPCOMMAND="/bin/usleep $SLEEPTIME" + SLEEPCOMMAND="/bin/usleep $((SLEEPTIME*1000))" # usleep uses microseconds, not milliseconds else SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk works for fractions so we don't need bc SLEEPCOMMAND="/bin/sleep $SLEEPTIME" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 159769631956b5000f91805781d608d4830a8860 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Feb 6 12:30:11 2019 +0000 moved detection regarding which sleep command is to be used into the backgrounded task, added comments --- .../lib/live/config/0000-earlyblankdpmsfix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix index 32be175..9ed721f 100755 --- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix +++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix @@ -10,17 +10,23 @@ echo -n " earlyblankdpmsfix" # code to fix blank screen happening with DisplayPort and some buggy TFTs (even xset q reports "Monitor is on" even though it is pitch black) if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"earlyblankdpmsfix"==$1 {print $2}' | tr -dc '0-9') - [ -z "$SLEEPTIME" ] && SLEEPTIME=1000 - if [ -x /bin/usleep ] ; then - SLEEPCOMMAND="/bin/usleep $((SLEEPTIME*1000))" # usleep uses microseconds, not milliseconds - else - SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk works for fractions so we don't need bc - SLEEPCOMMAND="/bin/sleep $SLEEPTIME" - fi + + # SLEEPTIME is a value set in milliseconds -- not microseconds and not seconds either + + [ -z "$SLEEPTIME" ] && SLEEPTIME=1000 # so we default to 1000 milliseconds = 1 second + ( while ! ( [ -d /sys/class/graphics ] && [ -n "$(find /sys/class/graphics/ -maxdepth 1 -type l -name "fb[0-9]*")" ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do - sleep 1 + sleep 1 # here, it doesn't matter which sleep is used, as we are only using an integer number done + + if [ -x /bin/usleep ] ; then + SLEEPCOMMAND="/bin/usleep $((SLEEPTIME*1000))" # usleep uses microseconds, not milliseconds + else + SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk works for fractions so we don't need bc + SLEEPCOMMAND="/bin/sleep $SLEEPTIME" + fi + for FBDEVICE in /sys/class/graphics/fb[0-9]*; do echo 1 > $FBDEVICE/blank $SLEEPCOMMAND -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 36d7f275f03379028ba86c108f4faf94de48ca09 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Feb 6 23:08:49 2019 +0000 a variable obviously won't work in single quotes --- config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor index 4ec3a95..9aea7af 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor +++ b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor @@ -15,7 +15,7 @@ else fi # Spawn Powerbutton-Monitor -/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; $POWEROFFCOMMAND ; chvt 7) &' +/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; '$POWEROFFCOMMAND' ; chvt 7) &' } X2GoPowerbuttonMonitor -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 5c51ed6facab395d682c0f63ac9966f487c6085c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Feb 6 22:19:21 2019 +0000 added new feature for faster shutdown in non-minidesktop mode --- .../lib/live/config/2800-x2go-powerbuttonmonitor | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor index 8f21eaf..4ec3a95 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor +++ b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor @@ -6,8 +6,16 @@ X2GoPowerbuttonMonitor () # echo -n " x2go-powerbuttonmonitor" +# determine poweroff-command +if grep -q "\W*fastpo\W*" /proc/cmdline && ! [ -d ~x2gothinclient ] ; then + # this does not make sense for the minidesktop + POWEROFFCOMMAND='while ! (grep "^/dev/" /etc/mtab | grep -q rw ) ; do echo s >/proc/sysrq-trigger ; echo u >/proc/sysrq-trigger ; done ; echo o >/proc/sysrq-trigger' +else + POWEROFFCOMMAND='poweroff' +fi + # Spawn Powerbutton-Monitor -/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; poweroff ; chvt 7) &' +/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; $POWEROFFCOMMAND ; chvt 7) &' } X2GoPowerbuttonMonitor -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 111f71f81de3929d7af8a47dc447430da8547af3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 7 01:14:49 2019 +0000 aaand another set of quotes - double quotes - is required here ... --- config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor index 9aea7af..cb8d29c 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor +++ b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor @@ -15,7 +15,7 @@ else fi # Spawn Powerbutton-Monitor -/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; '$POWEROFFCOMMAND' ; chvt 7) &' +/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; '"$POWEROFFCOMMAND"' ; chvt 7) &' } X2GoPowerbuttonMonitor -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 40168503eca35237701c5a771f0fc4c4070245b0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Mar 19 08:53:46 2019 +0100 split 60x11-spawn-configure-pulseaudio into 60x11-spawn-pulseaudio and 60x11-configure-pulseaudio (so we can remove 60x11-spawn-pulseaudio from the minidesktop branches, where it conflicts with MATE) --- ...x11-spawn-configure-pulseaudio => 60x11-configure-pulseaudio} | 9 +-------- config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-pulseaudio | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio b/config/includes.chroot/etc/X11/Xsession.d/60x11-configure-pulseaudio similarity index 79% rename from config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio rename to config/includes.chroot/etc/X11/Xsession.d/60x11-configure-pulseaudio index 6331469..1a4849d 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-configure-pulseaudio +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-configure-pulseaudio @@ -1,11 +1,4 @@ -# Spawn PulseAudio -if ! ps -C pulseaudio >/dev/null && [ -x /usr/bin/pulseaudio ] ; then - pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & - echo -en "\n$(date +'%F | %T | ')'$0' spawned PulseAudio." | tee -a /dev/tty8 -else - echo -en "\n$(date +'%F | %T | ')'$0' Not spawning Pulseaudio - already running (MiniDesktop active?) or executable not found." | tee -a /dev/tty8 -fi - +# Configure pulseaudio AUDIOOUT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F'=' ' /^audioout=/ { print $2 }' | tr -dc 'a-zA-Z0-9.:_\-@|') if [ -n "$AUDIOOUT" ] ; then diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-pulseaudio b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-pulseaudio new file mode 100644 index 0000000..47e9531 --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-spawn-pulseaudio @@ -0,0 +1,7 @@ +# Spawn PulseAudio +if ! ps -C pulseaudio >/dev/null && [ -x /usr/bin/pulseaudio ] ; then + pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & + echo -en "\n$(date +'%F | %T | ')'$0' spawned PulseAudio." | tee -a /dev/tty8 +else + echo -en "\n$(date +'%F | %T | ')'$0' Not spawning Pulseaudio - already running (MiniDesktop active?) or executable not found." | tee -a /dev/tty8 +fi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 bef83bbaaa5a1212ac758b00db6107baeb43820d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Mar 19 12:38:33 2019 +0100 added script to force pulseaudio volume --- .../X11/Xsession.d/60x11-force-pulseaudio-volume | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume b/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume new file mode 100644 index 0000000..17f74ee --- /dev/null +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume @@ -0,0 +1,25 @@ +# Force pulseaudio volume + +PAVOL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '/^pavol=/ { print $2 }' | tr -dc '0-9%:|') + +if [ -n "$PAVOL" ] ; then + ( + while ! pacmd dump 2>&1| grep -q set-card-profile ; do + echo -en "\n$(date +'%F | %T | ')'$0': Waiting for pulseaudio to start ..." | tee -a /dev/tty8 + sleep 1 + done + for DEVVOLPAIR in $(echo -e "$PAVOL" | tr '|' '\n'); do + if echo -e "$DEVVOLPAIR" | grep -q ':' ; then + PADEV=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $1 ') + VOLUME=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $2 ') + else + PADEV="0" + VOLUME=$DEVVOLPAIR + fi + pactl set-sink-mute $PADEV 0 + pactl set-sink-volume $PADEV $VOLUME + echo -en "\n$(date +'%F | %T | ')'$0': Set volume level '$VOLUME' for audio sink '#$PADEV'" | tee -a /dev/tty8 + done + ) & +fi + -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
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 6f5ec03b60c0133696ff3e156325c1584760ea7a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Mar 19 13:10:08 2019 +0100 typofix --- .../includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume b/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume index 17f74ee..94230dc 100644 --- a/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume +++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-force-pulseaudio-volume @@ -10,8 +10,8 @@ if [ -n "$PAVOL" ] ; then done for DEVVOLPAIR in $(echo -e "$PAVOL" | tr '|' '\n'); do if echo -e "$DEVVOLPAIR" | grep -q ':' ; then - PADEV=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $1 ') - VOLUME=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $2 ') + PADEV=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $1 }') + VOLUME=$(echo -e "$DEVVOLPAIR" | awk -F ':' '{ print $2 }') else PADEV="0" VOLUME=$DEVVOLPAIR -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git