I just noticed the following under OL 8.0.
[vnc-cd4@localhost ~]$ systemctl --user daemon-reload
Failed to connect to bus: No such file or directory
It seems the problem is that I used "su - vnc-cd4" from the root account.
But using using runuser also doesn't work:
[root@localhost ~]# runuser -l vnc-cd4 -c "systemctl --user daemon-reload"
Failed to connect to bus: No such file or directory
When I login directly, it works:
$ ssh vnc-cd4@10.0.80.1
vnc-cd4@10.0.80.1's password:
[vnc-cd4@localhost ~]$ systemctl --user daemon-reload
[vnc-cd4@localhost ~]$
If I try su without the dash, the error is slightly different:
[root@localhost ~]# su vnc-cd4
[vnc-cd4@localhost root]$ systemctl --user daemon-reload
Failed to connect to bus: Permission denied
I'm currently looking at TigerVNC 1.9 released for EL 8 and the instructions outlined at:
/usr/lib/systemd/user/vncserver@.service
Any idea how to use systemctl --user coming from root?
I can run "loginctl enable-linger" specifying the user:
[root@localhost ~]# loginctl enable-linger vnc-cd4
But systemctl --user does not seem to accept a username.
Thanks.