Comment 10 for bug 553557

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Confirmed, you are spot on, something is causing that script to fail to spot KDE is running, and it *was* falling though to the end.

I'll poke at it and see if I can locate what goes wrong... initial testing by putting the code from the main script into the command line (konsole) indicates it's in the support functions.

falken@wopr:~$ . /usr/share/acpi-support/power-funcs
falken@wopr:~$ getXuser() {
> user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'`
> if [ x"$user" = x"" ]; then
> startx=`pgrep -n startx`
> if [ x"$startx" != x"" ]; then
> user=`ps -o user --no-headers $startx`
> fi
> fi
> if [ x"$user" != x"" ]; then
> userhome=`getent passwd $user | cut -d: -f6`
> export XAUTHORITY=$userhome/.Xauthority
> else
> export XAUTHORITY=""
> fi
> export XUSER=$user
> }
falken@wopr:~$ getXconsole
Couldn't get a file descriptor referring to the console
falken@wopr:~$ echo $XUSER

falken@wopr:~$