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

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"


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


-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2010  -  Munich Oct 11-13  -  San Francisco Nov 1-3
For more information and to register: http://qt.nokia.com/qtdevdays2010

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to