Hi,<br><br>My two dbus session record the two following vaariables :<br><br># cat /var/log/thommedia_dbus/thom_dbus_addr <br>DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-oBGwcf4zNv,guid=7c506eecada544e0033fd03e00000005<br>
<br># cat /var/log/thommedia_dbus_app/thom_dbus_addr <br>DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bDI4PIzVmX,guid=3325a894b19750a1b700750800000039<br><br>Actually i am using the following source code for the first instance :<br>
<br> # connection on unix:abstract=/tmp/dbus-oBGwcf4zNv,guid=7c506eecada544e0033fd03e00000005<br> bus1 = new DBus::Connection(DBus::Connection::SessionBus());<br><br>So for the second dbus session i need to provided a hardcoded data :<br>
<br> bus2 = new DBus::Connection("unix:abstract=/tmp/dbus-bDI4PIzVmX,guid=3325a894b19750a1b700750800000039");<br><br>Do you valid it ?<br><br>If so, I will at least write a function for extracting the content of the /var/log/thommedia_dbus_app/thom_dbus_addr file.<br>
<br clear="all">A+<br>Thierry GAYET<br>+33.663.849.589<div>Skype : terranova44<br><a href="http://www.nextinnovation.org" target="_blank">www.nextinnovation.org</a><br><a href="http://www.apprendreindonesien.com" target="_blank">www.apprendreindonesien.com</a></div>
<br>
<br><br><div class="gmail_quote">2011/10/10 Thierry GAYET <span dir="ltr"><<a href="mailto:thierry.gayet@gmail.com">thierry.gayet@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi<br><br>Thanks for the reply ; this is was i was planning to do but thanks for the confirmation.<br><br>I am starting my dbus session such as :<br clear="all"><br> eval `dbus-launch --sh-syntax`<br> env | grep DBUS_SESSION_BUS_ADDRESS > /var/log/thommedia_dbus/thom_dbus_addr<br>
export `cat /var/log/thommedia_dbus/thom_dbus_addr`<br><br>How i can get the address and pass for a dbus connexion ? Then how to use it in order to initialize the connexion ?<br><br>Any C/C++ source code welcome.<br>
<br>Regards<br><br>Thierry<br><br><div class="gmail_quote">2011/10/9 <span dir="ltr"><<a href="mailto:dbus-request@lists.freedesktop.org" target="_blank">dbus-request@lists.freedesktop.org</a>></span><div><div></div>
<div class="h5"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Send dbus mailing list submissions to<br>
<a href="mailto:dbus@lists.freedesktop.org" target="_blank">dbus@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:dbus-request@lists.freedesktop.org" target="_blank">dbus-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:dbus-owner@lists.freedesktop.org" target="_blank">dbus-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of dbus digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Connexion on two dbus session (Thierry GAYET)<br>
2. Re: Connexion on two dbus session (Thiago Macieira)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 9 Oct 2011 18:21:01 +0200<br>
From: Thierry GAYET <<a href="mailto:thierry.gayet@gmail.com" target="_blank">thierry.gayet@gmail.com</a>><br>
Subject: Connexion on two dbus session<br>
To: <a href="mailto:dbus@lists.freedesktop.org" target="_blank">dbus@lists.freedesktop.org</a><br>
Message-ID:<br>
<<a href="mailto:CADJRVCgvmtRrfArOyx2Ekgz%2BumriWkCNLG0F1mGFdY3S94_cvA@mail.gmail.com" target="_blank">CADJRVCgvmtRrfArOyx2Ekgz+umriWkCNLG0F1mGFdY3S94_cvA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
I have a question about a gnu/Linux architecture based on several dbus.<br>
<br>
Indeed, i have two dbus session and one dbus system.<br>
<br>
The two dbus session are not communicating directly by through a c++ process<br>
that can be associated as a proxy or a firewall.<br>
<br>
It was easy to start the several deamons but i wanna know if this is<br>
possible to make a connexion on the two dbus session in the same process ?<br>
<br>
I have seen that the dbus's addess if get from an environment variable but<br>
only one (the last dbus session launched) is associated to the this unique<br>
variable.<br>
<br>
Thus, when i make a connexion in my program this is always on the same dbus<br>
session.<br>
<br>
Do you know if this is possible in dbus / dbus c++ binding ? i mean without<br>
any modification of the dbus daemon and/or its library ?<br>
<br>
If someone have some example of code it will be quite nice :-)<br>
<br>
A+<br>
Thierry GAYET<br>
<a href="tel:%2B33.663.849.589" value="+33663849589" target="_blank">+33.663.849.589</a><br>
Skype : terranova44<br>
<a href="http://www.nextinnovation.org" target="_blank">www.nextinnovation.org</a><br>
<a href="http://www.apprendreindonesien.com" target="_blank">www.apprendreindonesien.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.freedesktop.org/archives/dbus/attachments/20111009/a42cff72/attachment.htm" target="_blank">http://lists.freedesktop.org/archives/dbus/attachments/20111009/a42cff72/attachment.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 09 Oct 2011 19:27:07 +0200<br>
From: Thiago Macieira <<a href="mailto:thiago@kde.org" target="_blank">thiago@kde.org</a>><br>
Subject: Re: Connexion on two dbus session<br>
To: <a href="mailto:dbus@lists.freedesktop.org" target="_blank">dbus@lists.freedesktop.org</a><br>
Message-ID: <1370212.dIJ4nWuzRa@doriath><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
On Sunday, 9 de October de 2011 18:21:01 Thierry GAYET wrote:<br>
> Do you know if this is possible in dbus / dbus c++ binding ? i mean without<br>
> any modification of the dbus daemon and/or its library ?<br>
><br>
> If someone have some example of code it will be quite nice<br>
<br>
It's possible to connect to more than one bus. But you'll need to get the<br>
address and pass it to the connection function on your own for at least one of<br>
the buses.<br>
--<br>
Thiago Macieira - thiago (AT) <a href="http://macieira.info" target="_blank">macieira.info</a> - thiago (AT) <a href="http://kde.org" target="_blank">kde.org</a><br>
Software Architect - Intel Open Source Technology Center<br>
PGP/GPG: 0x6EF45358; fingerprint:<br>
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 190 bytes<br>
Desc: This is a digitally signed message part.<br>
URL: <<a href="http://lists.freedesktop.org/archives/dbus/attachments/20111009/644d6073/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/dbus/attachments/20111009/644d6073/attachment-0001.pgp</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org" target="_blank">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
<br>
<br>
End of dbus Digest, Vol 75, Issue 9<br>
***********************************<br>
</blockquote></div></div></div><br>
</blockquote></div><br>