Hi Phil, Phil Endecott wrote: > I am trying to get the lid event to suspend on my Eee 901 and have encountered > the following problems: > > 1. getXuser() in /usr/share/acpi-support/power-funcs uses finger, but the > package > does not depend on finger (and I didn't have it installed).
Thanks for reporting, added! > 2. getXuser() is called from CheckPolicy() in > /usr/share/acpi-support/policy-funcs and $displaynum is not set. Do you > expect > that $displaynum is set by the caller of CheckPolicy(), i.e. in this case > eeepc-acpi-scripts' /etc/acpi/actions/lid.sh? Or should it be set to 0 in > CheckPolicy()? > > (Most users won't notice this second problem as the grep in getXuser will > look > for ':' when displaynum is not set and match either the idle time or the > login > time. In fact, even with a valid display number, the pattern ':0' will > frequently match the idle or login time in the second finger|grep|awk. You > need > to take care to match only in the Tty column of the finger output.) The way I see it, there are two issues here: First of all, the format provided by finger is (:$displaynum) or (:$displaynum.screennum). We filter by ":$displaynum<space>", which doesn't even find (:$displaynum). We then filter by just ":$displaynum", which frequently gives unwanted matches, as you mention. I've replaced it by a filter for "(:$displaynum)" and then for "(:$displaynum" as a fallback. Secondly, the call from CheckPolicy() is completely incorrect. Like you say, the getXuser function is intended to be called when the display number has already been determined. CheckPolicy() should have called getXconsole, which gets the foreground X display and then calls getXuser for that display! I'll put fixes in for these issues. Cheers, Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]