Package: acpi-support
Version: 0.140-5
Severity: normal
Tags: patch

Dear Maintainer,

In some cases the getXuser() function from /usr/share/acpi-support/power-funcs
file can't get the user for the X display and several ACPI scripts doesn't work 
properly.

I am using Slim display manager.
ck-list-sessions utility, which is used in getXuser(), reports "x11-display = 
':0.0'"
instead of usual ':0' then ConsoleKit was started with Slim.
So, awk script in the function gives no output for 'uid' variable.

Here is a simple patch with workaround:

--- debian/patches/power-funcs.diff     2013-07-01 11:45:34.000000000 +0300
+++ debian/patches/power-funcs.diff     2013-07-01 16:19:48.070764780 +0300
@@ -31,7 +31,7 @@
 +
 +      user=
 +      if [ -x /usr/bin/ck-list-sessions ]; then
-+              uid=$(ck-list-sessions | awk 'BEGIN { unix_user = ""; } 
/^Session/ { unix_user = ""; } /unix-user =/ { gsub(/'\''/,"",$3); unix_user = 
$3; } /x11-display = '\'$display\''/ { print unix_user; exit (0); }')
++              uid=$(ck-list-sessions | awk 'BEGIN { unix_user = ""; } 
/^Session/ { unix_user = ""; } /unix-user =/ { gsub(/'\''/,"",$3); unix_user = 
$3; } /x11-display = '\'$display'(\.0)?'\''/ { print unix_user; exit (0); }')
 +
 +              if [ "$uid" ]; then
 +                      IFS=:


-- System Information:
Debian Release: wheezy
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to