[X2Go-Commits] [live-build-x2go] 07/166: this script works like x2go-getsessions - upon detecting kernel parameter xorgconfurl=..., it tries to fetch an xorg.conf from there and installs it before X starts

git-admin at x2go.org git-admin at x2go.org
Mon Nov 20 02:16:38 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/mate-minidesktop
in repository live-build-x2go.

commit e9bdf4a18424978aca9af988fa6a771f15a1ffe1
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Tue Jul 12 18:10:30 2016 +0200

    this script works like x2go-getsessions - upon detecting kernel parameter xorgconfurl=..., it tries to fetch an xorg.conf from there and installs it before X starts
---
 .../lib/live/config/2200-x11-getxorgconf           | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/config/includes.chroot/lib/live/config/2200-x11-getxorgconf b/config/includes.chroot/lib/live/config/2200-x11-getxorgconf
new file mode 100755
index 0000000..d28bf04
--- /dev/null
+++ b/config/includes.chroot/lib/live/config/2200-x11-getxorgconf
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+X11GetXorgConf ()
+{
+# Output startup message
+#
+echo -n " x11-getxorgconf"
+
+        XORGCONFURL=$(cat /proc/cmdline | \
+                       tr ' ' '\n' | \
+                       awk -F'=' ' /^xorgconfurl=/ { print $2 }')
+        if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then 
+	XORGCONFDESTINATION=/etc/X11/xorg.conf.new
+        cat >/etc/network/if-up.d/getxorgconf <<GETXORG
+#!/bin/bash
+export TERM=linux;
+
+while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do
+        sleep 2
+done
+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 "Waiting for xorg.conf download ..."
+                        sleep 5
+                done
+        fi
+else
+        while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
+                echo "Waiting for xorg.conf download ..."
+                sleep 5 
+        done
+fi
+
+if [ -s $XORGCONFDESTINATION ] ; then
+        mv $XORGCONFDESTINATION /etc/X11/xorg.conf
+fi
+
+GETXORG
+                chmod 755 /etc/network/if-up.d/getxorgconf
+        fi
+}
+X11GetXorgConf

--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list