亲爱的社区你好:)
我想让DBus在我的Raspberry Pi上工作.当我在Pi桌面环境中时,libdbus-c ++ - 1的示例代码工作正常 - >(startx)
我在互联网上的研究和我在stackoverflow上找到的例子对我没有帮助:[.
但是,当我在Shell模式时,我收到错误消息
./client
terminate called after throwing an instance of 'DBus::Error'
what(): /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
Aborted
Run Code Online (Sandbox Code Playgroud)
我也试过了
eval 'dbus-launch --auto-syntax' ./client
eval 'dbus-launch --auto-syntax' ./server
Run Code Online (Sandbox Code Playgroud)
但它不起作用,服务器应用程序正在启动一个消息守护程序,但无法从客户端访问它.守护进程也保持活动状态.
我有:
terminate called after throwing an instance of 'DBus::Error'
what(): The name org.freedesktop.DBus.Examples.Echo was not provided by any .service files
call1: Aborted
Run Code Online (Sandbox Code Playgroud)
它也没有显示在服务列表中.
在此之后我尝试了另一个命令
DISPLAY=":0" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/dbus/system_bus_socket" ./server
Run Code Online (Sandbox Code Playgroud)
我得到了:
terminate called after throwing an instance of 'DBus::Error'
what(): …Run Code Online (Sandbox Code Playgroud) 我有一个raspbian内核跟踪,不知何故,进程"RTW_CMD_THREAD"中断了我的dbus-daemon.
我在谷歌找不到任何好的解释
你知道这个过程有什么作用吗?