Hi,

I am trying to start my own QDBusServer and connect some Applications to it. It seems that the server starts, but the connectToBus()-Method blocks and never returns.

Here is the server code:

Qt Code:
  1. int main(int argc, char **argv) {
  2. QCoreApplication a(argc, argv);
  3. new QDBusServer("unix:abstract=/home/ghalmaraz/dbussocket",&a);
  4. return a.exec();
  5. }
To copy to clipboard, switch view to plain text mode 

Afterwards:
# export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/home/ghalmaraz/dbussocket
# qdbus
shows no reaction (just blocking the terminal)
The qdbusviewer-App blocks for a long time (about 20s), too. But then it starts and gives me the following error message:
Error: Cannot connect to D-Bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
In this moment the server produces output, too:
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QSt ring,QString,QString): org.freedesktop.DBus.Error.Disconnected (Connection was disconnected before a reply was received)
Can someone help me or knows an example for this issue?

best regards
ghal maraz