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. Ben -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org