[Debian-eeepc-devel] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 40eab078e10f31316ab00407caa90067c6ebd7f0

Damyan Ivanov dmn at debian.org
Fri Aug 22 14:52:14 UTC 2008


The following commit has been merged in the master branch:
commit 6115703c2ef8f1aed95097daa2e85da688fb3d7e
Author: Damyan Ivanov <dmn at debian.org>
Date:   Fri Aug 22 17:40:09 2008 +0300

    detect_x_display: support users using 'startx' after console login

diff --git a/debian/changelog b/debian/changelog
index 25afd37..5393516 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ eeepc-acpi-scripts (1.0.5) unstable; urgency=low
   * add common functions.sh with detect_wlan() in it, used by wireless.sh
   * rules: simplify a bit using PKG and TMP variables
   * move X detection to functions.sh/detect_x_display()
+  * detect_x_display: support users using 'startx' after console login
 
  -- Damyan Ivanov <dmn at debian.org>  Fri, 22 Aug 2008 17:38:16 +0300
 
diff --git a/functions.sh b/functions.sh
index 8fd187b..34915c0 100644
--- a/functions.sh
+++ b/functions.sh
@@ -19,6 +19,13 @@ detect_x_display()
     local user
     local home
     user=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
+    if [ "$user" = "" ]; then
+        # no users seem to be logged on a X display?
+        # try the first logged user without any filters
+        # useful for users starting X via 'startx' after logging
+        # on the console
+        user=$( who | head -n 1 | cut -d' ' -f1 )
+    fi
     home=$(getent passwd $user | cut -d: -f6)
     XAUTHORITY=$home/.Xauthority
     if [ -f $XAUTHORITY ]; then

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-devel mailing list