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

柔情痞子 提交于 2019-12-01 17:54:25
trylimits

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!