![21.04:无法从命令行启动 Audacious:“D-Bus 错误:没有 X11 $DISPLAY 无法自动启动 D-Bus”](https://linux22.com/image/1181793/21.04%EF%BC%9A%E6%97%A0%E6%B3%95%E4%BB%8E%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%90%AF%E5%8A%A8%20Audacious%EF%BC%9A%E2%80%9CD-Bus%20%E9%94%99%E8%AF%AF%EF%BC%9A%E6%B2%A1%E6%9C%89%20X11%20%24DISPLAY%20%E6%97%A0%E6%B3%95%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8A%A8%20D-Bus%E2%80%9D.png)
发射Audacious 音频播放器从命令行产生以下错误:
$ audacious
ERROR dbus-server.cc:928 [dbus_server_init]: D-Bus error: Cannot autolaunch D-Bus without X11 $DISPLAY
ERROR pulse_audio.cc:439 [create_context]: pa_context_connect() failed: Connection refused
WARNING plugin-init.cc:110 [start_plugin]: PulseAudio Output failed to start.
ERROR plugin.cc:310 [init]: Cannot autolaunch D-Bus without X11 $DISPLAY
WARNING plugin-init.cc:110 [start_plugin]: MPRIS 2 Server failed to start.
(audacious:42484): Gtk-WARNING **: 21:18:52.181: cannot open display:
WARNING main.cc:328 [main_cleanup]: exit() called unexpectedly; skipping normal cleanup.
从仪表板启动 Audacious 没有任何问题,也可以用它打开文件或从 Nautilus 中的上下文菜单启动它。
答案1
Ubuntu 21.04 默认启动 Wayland。因此您没有 X11 $DISPLAY。
在你的登录屏幕右侧有一个小齿轮,
[ ]
将其更改为“Ubuntu”并再次登录...