Package: acpi-support Version: 0.137-5 Severity: normal Tags: patch
The regex in getXconsole to find the X display searches for "/X ", but X nowadays runs as Xorg. The attached patch will match against both. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.36-atom (SMP w/2 CPU cores) Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages acpi-support depends on: ii acpi-fakekey 0.137-5 tool to generate fake key events ii acpi-support-base 0.137-5 scripts for handling base ACPI eve ii acpid 1:2.0.6-1 Advanced Configuration and Power I ii lsb-base 3.2-26 Linux Standard Base 3.2 init scrip ii pm-utils 1.3.0-2 utilities and scripts for power ma ii x11-xserver-utils 7.5+2 X server utilities Versions of packages acpi-support recommends: ii dbus 1.2.24-3 simple interprocess messaging syst pn radeontool <none> (no description available) ii vbetool 1.1-2 run real-mode video BIOS code to a pn xscreensaver | gnome-screensa <none> (no description available) Versions of packages acpi-support suggests: ii rfkill 0.4-1 tool for enabling and disabling wi ii xinput 1.5.2-1 Runtime configuration and test of -- no debconf information
--- a/lib/power-funcs 2010-11-17 12:24:25.191722502 +0100 +++ b/lib/power-funcs 2010-11-17 12:29:09.957722500 +0100 @@ -29,7 +29,7 @@ # getXconsole gets the foreground (console) X user getXconsole() { console=`fgconsole`; - displaynum=`ps t tty$console | sed -n -re 's,.*/X .*:([0-9]+).*,\1,p'` + displaynum=`ps t tty$console | sed -n -re 's,.*/X(org)? .*:([0-9]+).*,\2,p'` if [ x"$displaynum" != x"" ]; then export DISPLAY=":$displaynum" getXuser