[Pkg-acpi-devel] Bug#560804: Implementation of getXuser is wrong so that logged in user is not detected
Klaus Ethgen
Klaus at Ethgen.de
Sat Dec 12 12:02:08 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Package: acpi-support-base
Version: 0.130-1
Severity: normal
Tags: patch
When the user is logged in under X and has no open shell the getXuser
function will not see him and so the screen is not locked.
The reason is that "pinky -fw" returns something like:
klaus ?:0 ????? Dec 11 16:57
klaus *pts/0 Dec 11 17:15 :0.0
klaus pts/1 Dec 11 17:16 :0.0
klaus *pts/2 00:04 Dec 11 17:21 :0.0
Note the question mark in front of :0. When there is no open shel (in
that case there was 3 open) then the user is not detected.
I patched /usr/share/acpi-support/power-funcs to work again:
- ------------------------------------------------------------------------------------------
- --- /usr/share/acpi-support/power-funcs 2009-11-22 12:33:42.000000000 +0100
+++ /etc/acpi/power-funcs 2009-12-11 17:29:27.109818714 +0100
@@ -8,7 +8,7 @@
# getXuser gets the X user belonging to the display in $displaynum.
# If you want the foreground X user, use getXconsole!
getXuser() {
- - user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" || $2 == ":'$displaynum'.0" || $(NF) == ":'$displaynum'.0" ) { print $1; exit; } }'`
+ user=`w -h | awk '{ if ($2 == ":'$displaynum'" || $3 == ":'$displaynum'" || $2 == ":'$displaynum'.0" || $3 == ":'$displaynum'.0" ) { print $1; exit; } }'`
if [ x"$user" = x"" ]; then
startx=`pgrep -n startx`
if [ x"$startx" != x"" ]; then
- ------------------------------------------------------------------------------------------
- -- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (700, 'unstable'), (600, 'stable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) (ignored: LC_ALL set to de_DE)
Shell: /bin/sh linked to /bin/dash
Versions of packages acpi-support-base depends on:
ii acpid 1.0.10-4 Advanced Configuration and Power I
ii kbd [console-utilities] 1.15.1-2 Linux console font and keytable ut
acpi-support-base recommends no packages.
Versions of packages acpi-support-base suggests:
ii acpi-support 0.130-1 scripts for handling many ACPI eve
- -- no debconf information
- --
Klaus Ethgen http://www.ethgen.de/
pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen <Klaus at Ethgen.de>
Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iQEVAwUBSyOGP5+OKpjRpO3lAQpj7gf/UER/BlA6y8a4MZuGDWVpPaD7o4jTJf5Q
wJ8bdQxRprJ7cgiVKqxscVc/IBN/xcWkW+CtzlDtGKAlW/MdMlaJisTgYL01bFuy
Sswl2TbkV1hwGveQS5H51lfrDYQYmjVACEocBH7v02yYY2h/wrUFrM4p2blnBdce
rpF4O77Cvpa2Moxv2JLjngHaWBshopW2BSvduPb6vmmuoLa78KgWgcw0uKWhUE2J
UksskyGPEU0UQCZ4ZxYJbbXCii+3Afw/v9slHfYlTkoVSU6jY+03BEjvSFjkPioV
AvYSjYhuGgxlQMfGjhG7ju0/nsWwEeJ4yiJNdmscmHNmGgZYP08kzA==
=Dx0M
-----END PGP SIGNATURE-----
More information about the Pkg-acpi-devel
mailing list