Qt 5.2, Win 7
When I register a service QDBusConnection::registerService ( const QString & serviceName ), it fails ("false") with a system DBus connection (QDBusConnection::systemBus ()), but works with a session DBus connection and a peer connection.
This is how I start the server: dbus-daemon.exe --system --address=tcp:host=127.0.0.1,port=45000
As of QtService application cannot connect to system bus when running as a service I have tried (see here) changing the system.conf
<auth>ANONYMOUS</auth>
<allow_anonymous/>
I found another similar question here. Also I have tried the policy as described there.
Any hints how I can overcome the issue, or at least obtain precise error messages? The "false" of the method does not really help.
-- edit ---
Below code gives me an error message not connected to server for the connection. Does the method QDBusConnection::systemBus() not automatically connect (as with session, peer)?
QDBusConnection con = QDBusConnection::systemBus();
if (!con.registerService(ServiceName))
{
qCritical() << con.lastError().message();
qFatal("Cannot register DBus service, server started? dbus-daemon.exe --system --address=tcp:host=192.168.0.133,port=45000");
}
--- edit 2, commet of JB0x2D1 ----
I agree, also think it is related to the .conf file.
- The link you provided and the one above from me all lead to the same example . I have tried the
.conffile as there (of course, changed service names accordingly my names) - Found another interesting example: https://wiki.ubuntu.com/DebuggingDBus . Unfortunately no success
Hard to tell, whether the issue is Windows related, most examples are clearly Linux driven. Wonder, what the minimal conf for "allow everything to anybody" would be.