LIBDBUSMENU-GLIB-WARNING **:无法获取会话总线:x 转发时无法执行子进程“dbus-launch”(没有此类文件或目录)

lin*_*4kb 9 server x11-forwarding 16.04

我已经在Ubuntu 16.04.3 服务器上设置了x-forwarding,尽管转发有效,但每次我启动 GUI 应用程序时,它都会在终端中报告以下错误。

(<app-name>:<pid>) LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory)
Run Code Online (Sandbox Code Playgroud)

这显然不是关键,但它并没有像它应该的那样工作。

我该如何修复?

编辑我主要是尝试启动 Firefox。

lin*_*4kb 17

此问题的解决方案是安装'dbus-x11'

sudo apt-get install dbus-x11
Run Code Online (Sandbox Code Playgroud)

我通过寻找类似的问题找到了这个解决方案。

我在 Serverfault 上找到了 Pablo Saratxaga 的回答,为类似问题提出了一个脚本。

https://serverfault.com/a/673837/409813

我认为值得跑

导出 $(dbus-launch)

因为这是脚本启动的主要命令。

输出中的错误消息如下。

The program 'dbus-launch' is currently not installed. You can install it by typing: 
apt install dbus-x11
Run Code Online (Sandbox Code Playgroud)

我安装了 dbus-x11 并且 x-forwarding 开始工作而没有显示错误消息。