2025年7月25日

技术教程 解决systemctl异常 Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined

作者 TheWhiteDog9487

我尝试使用SSH查看Docker Desktop的服务状态

解决方法参考这个:

systemd – systemctl –user issue with dbus Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR – Unix & Linux Stack Exchange

不要使用su,直接开一个新的SSH连接,直接以thewhitedog9487的身份登录就没有问题

Loading