deepan muthusamy
deepan muthusamy

Reputation: 371

systemd servicefailed to connect to session d-bus

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?

Upvotes: 1

Views: 1721

Answers (1)

Guido U. Draheim
Guido U. Draheim

Reputation: 3271

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.

Upvotes: 1

Related Questions