我为系统上的另一个用户启动了一个 shell。但是该用户没有 systemd 用户实例:
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)
Run Code Online (Sandbox Code Playgroud)
如何为 testusr 启动 dbus 或 systemd 用户实例?
我正在运行 Arch Linux、linux 5.11.8.arch1-1、dbus 1.12.20-1、systemd 247.4-2。