D-Bus communication over the network
Hello,
Is it possible to connect to the d-bus daemon running on the remote host?
I've started d-bus daemon on the hostA (192.168.0.1 ) port 12345,
in the config file the <listen>"tcp:host=192.168.0.6,port=12345"</listen> statement is given.
After the daemon has been started, it is possible to call the telnet 192.168.0.1 12345 from a remote host (192.168.0.2)
QDBusConnection::connectToBus("tcp:host=192.168.0. 6,port=12345", "test").isConnected();
does not work (returns false)
My question:
Is it possible to connect to the remote d-bus daemon, if yes than how to do this?
Is there any description?
Thanks for any hint.
Re: D-Bus communication over the network
From D-BUS Specification http://www.freedesktop.org/wiki/Intr...&redirect=DBus
You can read
Quote:
Introduction to D-Bus
D-Bus is an inter-process communication mechanism—a medium for local communication between processes running on the same host. (Inter-host connects may be added in the future, but that is not what D-Bus is meant for).
so, the answer for your question is NO.
Re: D-Bus communication over the network
Actually it is not that simple. D-BUS has a mechanism for connecting across network. The thing is only peer-to-peer connections work, not master-slave connections to a remote bus. At least that was the situation two years ago when we were investigating it.
Re: D-Bus communication over the network
It Works!!!
Since the version 1.4.1 it is possible to set the
<alow_anonymous/>
tag in the d-bus daemon configuration file.
The file shall contain e.g. following listen tag
<listen>tcp:host=192.168.0.1,port=12345</listen>
A D-Bus daemon shall be started on the according host, using this configuration file.
Than it is possible to open the QDBusConnection over the network. D-Bus works as an ORB !!!
QDBusConnection::connectToBus("tcp:host=192.168.0. 1,port=12345","myConnection");
Many thanks to Pavel Strashkin (dbus@lists.freedesktop.org) for help.