dbus启动问题
来源:互联网 发布:adc0808与单片机连接 编辑:程序博客网 时间:2024/05/16 11:42
首先需要启动守护进程
dbus-daemon –system –print-pid –print-address
结果提示 Failed to start message bus: Could not get UID and GID for username “messagebus”
dbus需要有一个messagebus用户,创建该用户即可,useradd messagebus,问题解决。
执行一个dbus测试程序,提示:D-Bus library appears to be incorrectly set up;
failed to read machine uuid: Failed to open
“/usr/var/lib/dbus/machine-id”: No such file or directory
没有machine-id文件,查了一下,需要给它定义一个id,使用dbus-uuidgen >/usr/var/lib/dbus/machine-id
产生这个文件,该问题解决。
再次执行测试程序,又有问题:Couldn’t connect to session bus: Failed to execute dbus-launch to autolaunch D-Bus session,看了帮助
http://dbus.freedesktop.org/doc/dbus-launch.1.html
AUTOMATIC LAUNCHING一节,需要设置DBUS_SESSION_BUS_ADDRESS环境变量的值,先执行dbus-launch,获得了DBUS_SESSION_BUS_ADDRESS值,再export一下,最后执行测试程序,OK了
在dbus帮助中有一篇关于
dbus-launch的文章
,可以在脚本中启动dbus-launch,同时自动设置DBUS_SESSION_BUS_ADDRESS环境变量,脚本文件rundbus如下:
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
## if not found, launch a new one
eval `dbus-launch --sh-syntax --exit-with-session`
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
fi
执行. rundbus即可。
本文来自ChinaUnix博客:http://blog.chinaunix.net/u3/93670/showart_1905507.html
dbus-daemon –system –print-pid –print-address
结果提示 Failed to start message bus: Could not get UID and GID for username “messagebus”
dbus需要有一个messagebus用户,创建该用户即可,useradd messagebus,问题解决。
执行一个dbus测试程序,提示:D-Bus library appears to be incorrectly set up;
failed to read machine uuid: Failed to open
“/usr/var/lib/dbus/machine-id”: No such file or directory
没有machine-id文件,查了一下,需要给它定义一个id,使用dbus-uuidgen >/usr/var/lib/dbus/machine-id
产生这个文件,该问题解决。
再次执行测试程序,又有问题:Couldn’t connect to session bus: Failed to execute dbus-launch to autolaunch D-Bus session,看了帮助
http://dbus.freedesktop.org/doc/dbus-launch.1.html
AUTOMATIC LAUNCHING一节,需要设置DBUS_SESSION_BUS_ADDRESS环境变量的值,先执行dbus-launch,获得了DBUS_SESSION_BUS_ADDRESS值,再export一下,最后执行测试程序,OK了
在dbus帮助中有一篇关于
dbus-launch的文章
,可以在脚本中启动dbus-launch,同时自动设置DBUS_SESSION_BUS_ADDRESS环境变量,脚本文件rundbus如下:
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
## if not found, launch a new one
eval `dbus-launch --sh-syntax --exit-with-session`
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
fi
执行. rundbus即可。
本文来自ChinaUnix博客:http://blog.chinaunix.net/u3/93670/showart_1905507.html
- dbus启动问题
- dbus启动问题
- dbus启动问题
- DBUS问题
- Dbus 配置问题
- DBus相关问题
- 关于python-dbus的问题
- dbus
- DBUS
- dbus
- DBUS
- dbus
- DBUS
- DBUS
- dbus
- dbus-daemon的启动与使用
- 编译dbus 时出现的问题
- DBus使用非缺省Glib的maincontext的问题
- vb.net 利用datagridview显示DB数据(亲自实践)
- iOS学习--uexiASIHTTPRequest使用指南---<<翻译稿>>
- android 部分控件样式自定义(button例)
- 一位码农的人生自述(一)------回校
- 近期一些思考,想法
- dbus启动问题
- 唯冠和苹果的官司打得热闹
- 结构体 链表小例子
- vb.net连接Outlook发送邮件(亲自实践)
- 实际测试下文件IO,有一个感性认识
- 作为软件工程师,你必须知道的20个常识
- 上传文件时候报错: 缺少十六进制数字
- 手指手掌脱皮治疗
- 软件测试工具之测试用例管理工具比较