QtService application cannot connect to system bus when running as a service

前端 未结 1 1367
旧时难觅i
旧时难觅i 2021-01-19 04:40

I have recompiled Qt with integrated dbus for windows.

Further, I have implemented a QtService application which registers a service a

相关标签:
1条回答
  • 2021-01-19 05:34

    In the end I solved the problem and my service is now able to connect to the system bus.

    I made the following changes:

    In system.conf I changed the listen property and the authentication property:

    <listen>tcp:host=localhost,port=13337,family=ipv4</listen>
    <auth>ANONYMOUS</auth>
    <allow_anonymous/>
    

    According to that changes I set the system environment variables analogously:

    DBUS_SYSTEM_BUS_ADDRESS = tcp:host=localhost,port=13337,family=ipv4
    DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = tcp:host=localhost,port=13337,family=ipv4
    

    This answer led me in the right direction.

    0 讨论(0)
提交回复
热议问题