systemd servicefailed to connect to session d-bus

一曲冷凌霜 提交于 2020-01-16 03:54:10

问题


I have a application which has to connect to session dbus during bootup. If I start my application manually or start with initd, it is starting and connecting to session dbus. But if I start through systemd by giving command as systemctl --user start my-service which is in the path "/etc/systemd/user", it is showing the following error "Failed to connect to bus: No such file or directory". What can be the possible reasons?

The service file is as follows:

[Unit]
Description=dummy application to connect to session dbus.


[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/DummyApp
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target

the operating system is Ubuntu 16.04(64 bit). can anyone help me with this?


回答1:


If you use "systemctl --user" then a user daemon must already be running. In general that one is started by the desktop. So it is not only important which operating system you use but you also need to check the desktop variant that is run.



来源:https://stackoverflow.com/questions/51818782/systemd-servicefailed-to-connect-to-session-d-bus

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