I started a shell for another user on my system. However there's no systemd user instance for that user:
helloer@host $ sudo -u testusr bash
testusr@host $ systemctl --user status
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
How can I start a dbus or systemd user instance for testusr?
I'm running Arch Linux, linux 5.11.8.arch1-1, dbus 1.12.20-1, systemd 247.4-2.
eval $(dbus-launch --sh-syntax)
help? – Jiri B Mar 25 '21 at 22:53systemctl status --user
says:Failed to read server status: Process org.freedesktop.systemd1 exited with status 1
– Helloer Mar 26 '21 at 00:44systemctl --user status
the --user is the owner of /run/user/"uid", i.e., the user logged into the console.
– Cinaed Simson Mar 26 '21 at 02:11machinectl
, but running amachinectl login archie
on my distro results in aFailed to get login PTY: No machine 'archie' known
, and from looking at man it mentions something about containerization, so I presume it is completely irrelevant to the issue. – Hi-Angel Apr 10 '23 at 11:48