On Wed, August 15, 2007 09:10, Bart Samwel wrote: >> playing around with the acpi-support scripts, I found something unusual >> in /usr/share/acpi-support/power-funcs. The function getXconsole should >> return the DISPLAY variable of the local X11 screen. In my case it >> returns "0\n0". > > Hi Tobias, > > Thanks for the report. Could you send us the output of "fgconsole" and > "ps ax" on your machine? That'll help us debug this situation.
As far as I can tell, this can only be caused by the expression ps ax | grep -e 'X .* vt'$console | grep -v grep | sed -re 's!.*/X .*:([0-9]+).*!\1!' returning more than one line. Perhaps the X server has forked / runs multiple threads, I don't know exactly what "ps ax" shows in these cases. We may fix it up by adding a simple "| uniq", I guess, but I'd like to know what causes it. Raphael, what do you think? Cheers, Bart