On 09/21/10 05:29, Thiago Macieira wrote:
Em Terça-feira 21 Setembro 2010, às 13:03:02, Pertti Kellomäki escreveu:
On harmattan, the address of the session dbus daemon is available in a
file, so one can do

      source /tmp/session_bus_address.user

in order to get the address of the session daemon. Is there something
equivalent on MeeGo? Our test scripts need to chat with the daemon.

The bus address is stored in a hidden X11 window and you can obtain it by
querying. dbus-launch automatically gets it:

~ $ echo $DBUS_SESSION_BUS_ADDRESS

~ $ DISPLAY=:0 dbus-launch --autolaunch `cat /var/lib/dbus/machine-id `
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/var/tmp/dbus-
Q0hEx2EutZ,guid=bf3858a278afe694d3e5716f0000000d
DBUS_SESSION_BUS_PID=2240
DBUS_SESSION_BUS_WINDOWID=2097153

this method works in MeeGo

Even:
~ $ DISPLAY=:0 xprop -id 2097153
_DBUS_SESSION_BUS_PID(CARDINAL) = 2240
_DBUS_SESSION_BUS_ADDRESS(STRING) = "unix:abstract=/var/tmp/dbus-
Q0hEx2EutZ,guid=bf3858a278afe694d3e5716f0000000d"

this doesn't...

The address is also stored in a file in the user's home directory:

~ $ cat ~/.dbus/session-bus/`cat /var/lib/dbus/machine-id `-${DISPLAY#:}
# This file allows processes on the machine with id
34c4eb0b08ea6c20b83bef9c00000006 using
# display :0 to find the D-Bus session bus with the below address.
# If the DBUS_SESSION_BUS_ADDRESS environment variable is set, it will
# be used rather than this file.
# See "man dbus-launch" for more details.
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/var/tmp/dbus-
Q0hEx2EutZ,guid=bf3858a278afe694d3e5716f0000000d
DBUS_SESSION_BUS_PID=2240
DBUS_SESSION_BUS_WINDOWID=2097153

This also doesnt work, not sure why, but I'm not too worried unless I see a bugreport :)

Auke
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to