[Debian-eeepc-devel] Bug#598097: Make detect_x_display go away to solve this
Ben Armstrong
synrg at sanctuary.nslug.ns.ca
Sat Nov 13 13:11:26 UTC 2010
OK. I need some input from other developers on the team ...
On 13/11/10 08:20 AM, Ben Armstrong wrote:
> After discussing this with a member of the X team, they advise this is
> simply a bad idea (to try to talk to X from acpi scripts). I've heard
> this advice before and given the difficulty we've had, I have to wonder
> if it isn't time to finally take that seriously. After all, this key
> sends an XF86Display event, so the WM should bind that to do whatever
> the user wants. I think in GNOME and KDE, there should be some agent
> that already handles this. For non-gnome/kde, something could be
> cobbled together with xrandr the way we do already, only not running as
> root.
>
> I'm going to see what other keys (if any) rely on detect_x_display, and
> see if we can apply the same approach.
There is the touchpad toggle key. We could use acpi_fakekey to send
XF86TouchpadToggle to /dev/input/eventx there.
I think the other key we need to deal with is the display toggle. I
don't know how to handle that. I don't see any appropriate key listed in
/usr/share/X11/XKeysymDB. Is there some non-X way to do this that will
work in X as well? I seem to recall we had some difficulty with this one
but I no longer recall the details ... Currently, this key does the
following:
handle_blank_screen() {
if [ -S /tmp/.X11-unix/X0 ]; then
detect_x_display
if [ -n "$XAUTHORITY" ]; then
xset dpms force off
fi
fi
}
This is ugly because it only handles the user logged in on DISPLAY :0
(just like all other uses of detect_x_display).
Ben
More information about the Debian-eeepc-devel
mailing list