I'm trying to setup user level Services(Python/Java/Node JS Processes) which need to run all the time, until I stop explicitly. The service need to be start/stopped as non root user.
I've created service file under, ~/.config/systemd/user/. When I tried to load, systemctl --user daemon-reload, it's failing with the following error.
$ systemctl --user daemon-reload
Failed to get D-Bus connection: No such file or directory
I understand D-Bus won't run without Desktop session, but there is no Desktop session, it's one of the VMs provided by the Company. We don't enable Desktop sessions for the Linux servers.
$ ps -ef | grep systemd | grep -v grep
root 1 0 0 Jul25 ? 00:01:33 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root 544 1 0 Jul25 ? 00:00:33 /usr/lib/systemd/systemd-journald
root 591 1 0 Jul25 ? 00:00:03 /usr/lib/systemd/systemd-udevd
dbus 783 1 0 Jul25 ? 00:01:21 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 857 1 0 Jul25 ? 00:00:34 /usr/lib/systemd/systemd-logind
How do I create user level services without Desktop session ?