Comment 16 for bug 1124149

Revision history for this message
Lupe Christoph (lupe) wrote :

Here is some information from a run of powerbtn.sh (without the forced shutdown, of course):

Environment:

UPSTART_INSTANCE=
UPSTART_JOB=acpid
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
RUNLEVEL=2
PREVLEVEL=N
UPSTART_EVENTS=runlevel
PWD=/

id:
uid=0(root) gid=0(root) groups=0(root)

Shell trace:
+ [ -r /usr/share/acpi-support/power-funcs ]
+ . /usr/share/acpi-support/power-funcs
+ umask 022
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/bin/X11
+ POWERSTATE=/var/lib/acpi-support/powerstate
+ LAPTOP_MODE=/usr/sbin/laptop_mode
+ HDPARM=/sbin/hdparm -q
+ LIDSTATE=/var/lib/acpi-support/lidstate
+ test -f /var/lock/acpisleep
+ [ -r /usr/share/acpi-support/power-funcs ]
+ getXconsole
+ local displaynum
+ ck-list-sessions
+ awk BEGIN { active = 0; } /^Session/ { active = 0; } /active = TRUE/ { active = 1; } active && /x11-display = ':.+'/ { gsub(/':*/,"",$3); print $3; exit (0); }
+ displaynum=0
+ [ -n 0 ]
+ export DISPLAY=:0
+ getXuser
+ pinky -fw
+ awk { if ($2 == ":0" || $(NF) == ":0" ) { print $1; exit; } }
+ user=lupe
+ [ xlupe = x ]
+ [ xlupe != x ]
+ getent passwd lupe
+ cut -d: -f6
+ userhome=/home/lupe
+ export XAUTHORITY=/home/lupe/.Xauthority
+ export XUSER=lupe
+ PMS=gnome-settings-daemon kpowersave xfce4-power-manager
+ PMS=gnome-settings-daemon kpowersave xfce4-power-manager guidance-power-manager.py dalston-power-applet
+ pidof x gnome-settings-daemon kpowersave xfce4-power-manager guidance-power-manager.py dalston-power-applet
+ test lupe !=
+ pidof dcopserver
+ test lupe !=
+ test -x /usr/bin/qdbus
+ pgrep -n -u lupe kded4
+ kded4pid=3186
+ test 3186 !=
+ su - lupe -c grep -z DBUS_SESSION_BUS_ADDRESS /proc/3186/environ
+ dbusaddr=DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BemSTMbtIA,guid=c5e7571096c4f63756b9815c518c959d
+ test DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BemSTMbtIA,guid=c5e7571096c4f63756b9815c518c959d !=
+ su - lupe -c export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BemSTMbtIA,guid=c5e7571096c4f63756b9815c518c959d; qdbus org.kde.kded
+ grep -q powerdevil
qdbus: could not find a Qt installation of ''

And:

# su - lupe -c "which qdbus"
/usr/bin/qdbus
# ls -l /usr/bin/qdbus
lrwxrwxrwx 1 root root 9 Feb 12 16:38 /usr/bin/qdbus -> qtchooser
# ls -l /usr/bin/qtchooser
-rwxr-xr-x 1 root root 23072 Feb 12 16:38 /usr/bin/qtchooser
# file /usr/bin/qtchooser
/usr/bin/qtchooser: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x79b3acf468ac83ae183de0958540ef99c3d5457f, stripped

So it has nothing to do with qdbus:i386.

The problem is that the script picks up qtchooser. The right qdbus executable is here:
$ ls -l /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus
-rwxr-xr-x 1 root root 64928 Mar 27 02:09 /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus

Replacing qdbus with /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus in the script makes it work:

+ su - lupe -c export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BemSTMbtIA,guid=c5e7571096c4f63756b9815c518c959d; /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus org.kde.kded
+ grep -q powerdevil
+ exit

So whoever dreamed up this mess must have smoked something really bad ...