First:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
Linux <hostname> 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I'm trying to start an instance of an application as a «user service» systemctl --user start <service>
. But when I'm issuing this command (or any other systemctl --user
-commands) I'll get an error saying
Failed to connect to bus: No such file or directory
It doesn't matter if I'm issuing this command as the root user or a normal user, but what I eventually want's is to run this as a normal user.
I have searched online and tried everything I can come across. One problem that many people with similar problems have mentioned is that $XDG_RUNTIME_DIR
and $DBUS_SESSION_BUS_ADDRESS
is not set for the environment; and Yes, it isn't in my case either, but the solution on setting them haven't helped me.
I have tried to set them after login and in .profile
(also tried to reboot), but nothing helps.
Some mentioned that logging in to the user from the root-user (su - <username>
) could also cause these problem, but the solutions here was to simply log in directly through SSH with the normal-user. But unfortunately it doesn't work either in my case.
Anyone with a suggestion on how I can get this working?
Yes. There is a reason why I want/need this for a particular user (or several), without giving it/them full root access.
You are using Ubuntu 16.04. It does not run per-user instances of systemd.
Further reading