parsing of $displaynum in /usr/share/acpi-support/power-funcs gives two matches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Fix Released
|
Medium
|
Paul Sladen |
Bug Description
Binary package hint: acpi-support
Hi,
I had a talk with Paul Sladen on IRC. The /usr/share/
whoopie@notebook:~$ ps ax | grep -e 'X .* vt'7 | grep -v grep | sed -re 's!.*/X .*:([0-9]+).*!\1!'
0
0
whoopie@notebook:~$ console=`sudo fgconsole`
whoopie@notebook:~$ echo $console
7
whoopie@notebook:~$ ps ax | grep -e 'X .* vt'7 | grep -v grep
5032 tty7 SLs+ 1:50 /usr/X11R6/bin/X :0 -br -audit 0 -auth /var/lib/
5136 tty7 SL+ 0:00 /usr/X11R6/bin/X :0 -br -audit 0 -auth /var/lib/
So the fix is to change it to:
displaynum=`ps ax | grep -m1 -e '[X] .* vt'$console | sed -re 's!.*/X .*:([0-9]+).*!\1!'`
I'll attach a patch for it.
Best regards,
Whoopie
Changed in acpi-support: | |
status: | Confirmed → Fix Committed |
I provided this patch, will apply. Now that it's documented in the bug report we can close it with satisfaction! :)