[debian-edu-commits] r80577 - branches/wheezy/debian-edu-install/debian

pere at alioth.debian.org pere at alioth.debian.org
Fri Jun 14 02:27:47 UTC 2013


Author: pere
Date: 2013-06-13 15:28:13 +0000 (Thu, 13 Jun 2013)
New Revision: 80577

Modified:
   branches/wheezy/debian-edu-install/debian/changelog
   branches/wheezy/debian-edu-install/debian/debian-edu-install.xdebian-edu-firstboot.init
Log:
Rewrite X display detection code in testsuite reporting mechanism
to be more robust and work with gdm3.

Modified: branches/wheezy/debian-edu-install/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-install/debian/changelog	2013-06-13 14:48:39 UTC (rev 80576)
+++ branches/wheezy/debian-edu-install/debian/changelog	2013-06-13 15:28:13 UTC (rev 80577)
@@ -3,6 +3,8 @@
   [ Petter Reinholdtsen ]
   * Add workaround (fix?) for bug #641225 where dictionary-common ask
     strange question about the wordlinst for some languages.
+  * Rewrite X display detection code in testsuite reporting mechanism
+    to be more robust and work with gdm3.
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 13 Jun 2013 16:48:06 +0200
 

Modified: branches/wheezy/debian-edu-install/debian/debian-edu-install.xdebian-edu-firstboot.init
===================================================================
--- branches/wheezy/debian-edu-install/debian/debian-edu-install.xdebian-edu-firstboot.init	2013-06-13 14:48:39 UTC (rev 80576)
+++ branches/wheezy/debian-edu-install/debian/debian-edu-install.xdebian-edu-firstboot.init	2013-06-13 15:28:13 UTC (rev 80577)
@@ -88,28 +88,30 @@
 }
 
 prepare_debconf() {
-    # Try to get debconf to pop up the dialog on top of kdm.  Need to
-    # do this before starting debconf.
+    # Try to get debconf to pop up the dialog on top of the display
+    # manager.  Need to do this before starting debconf.
 
     # This is generated by kdm
-    XAUTHORITY="`ls -tr /var/run/xauth/* 2>/dev/null|tail -1`"
+    candidate="`ls -tr /var/run/xauth/* 2>/dev/null|tail -1`"
 
-    # Not KDM, perhaps GDM?
-    if [ -z "$XAUTHORITY" ] && [ -e /var/lib/gdm/:0.Xauth ]; then
-	XAUTHORITY="/var/lib/gdm/:0.Xauth"
-    fi
+    # gdm, lightdm
+    candidate="$candidate /var/lib/gdm/:0.Xauth /var/lib/lightdm/.Xauthority"
 
-    # Not KDM and GDM, perhaps GDM3
-    if [ -z "$XAUTHORITY" ] && [ -e /var/lib/gdm3/:0.Xauth ]; then
-	XAUTHORITY="/var/lib/gdm3/:0.Xauth"
-    fi
+    # gdm3
+    for f in /var/run/gdm3/auth-for-Debian-gdm*/database ; do
+	candidate="$candidate $f"
+    done
 
-    # Not KDM, GDM and GDM3, perhaps lightdm?
-    if [ -z "$XAUTHORITY" ] && [ -e /var/lib/lightdm/.Xauthority ]; then
-	XAUTHORITY="/var/lib/lightdm/.Xauthority"
-    fi
+    XAUTHORITY=
+    for f in $candidate ; do
+	if XAUTHORITY=$f DISPLAY=:0 xauth list >/dev/null 2>&1 &&
+	    XAUTHORITY=$f DISPLAY=:0 xhost > /dev/null 2>&1 ; then
+	    XAUTHORITY=$f
+	    break
+	fi
+    done
 
-    if [ "$XAUTHORITY" ] && XAUTHORITY=$XAUTHORITY DISPLAY=:0 xhost > /dev/null 2>&1 ; then
+    if [ "$XAUTHORITY" ] ; then
         # Try to use kde frontend (require libqt-perl) or gnome frontend
         # (libgtk2-perl).  debconf will fall back to dialog if either
         # frontend fails to start.  The frontend need to be set before




More information about the debian-edu-commits mailing list