dbus

error: longjmp causes uninitialized stack frame

廉价感情. 提交于 2019-11-28 17:32:46
问题 I have a server application that creates a Bus on the dbus and after some minutes of running I got an error that I have never seen before. Did you have an idea whats wrong? *** longjmp causes uninitialized stack frame ***: /home/user/Workspace/DBus_Server/Debug/DBus_Server terminated ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f8d8911c7f7] /lib/x86_64-linux-gnu/libc.so.6(+0xf8789)[0x7f8d8911c789] /lib/x86_64-linux-gnu/libc.so.6(__longjmp_chk+0x33)

Connecting to dbus over tcp

冷暖自知 提交于 2019-11-28 16:44:14
I wrote a simple python program to play and pause banshee music player. While its working on my own machine, I have trouble doing it to a remote computer, connected to the same router (LAN). I edited the session.conf of the remote machine, to add this line: <listen>tcp:host=localhost,port=12434</listen> and here is my program: import dbus bus_obj=dbus.bus.BusConnection("tcp:host=localhost,port=12434") proxy_object=bus_obj.get_object('org.bansheeproject.Banshee', '/org/bansheeproject/Banshee/PlayerEngine') playerengine_iface=dbus.Interface(proxy_object, dbus_interface='org.bansheeproject

DBUS基础知识

℡╲_俬逩灬. 提交于 2019-11-28 12:26:49
1. 进程间使用D-Bus通信 D-Bus是一种高级的进程间通信机制,它由freedesktop.org项目提供,使用GPL许可证发行。D-Bus最主要的用途是在Linux桌面环境为进程提供通信,同时能将Linux桌面环境和Linux内核事件作为消息传递到进程。D-Bus的主要概率为总线,注册后的进程可通过总线接收或传递消息,进程也可注册后等待内核事件响应,例如等待网络状态的转变或者计算机发出关机指令。目前,D-Bus已被大多数Linux发行版所采用,开发者可使用D-Bus实现各种复杂的进程间通信任务。 2. D-Bus的基本概念 D-Bus是一个消息总线系统,其功能已涵盖进程间通信的所有需求,并具备一些特殊的用途。D-Bus是三层架构的进程间通信系统,其中包括: 接口层:接口层由函数库libdbus提供,进程可通过该库使用D-Bus的能力。 总线层:总线层实际上是由D-Bus总线守护进程提供的。它在Linux系统启动时运行,负责进程间的消息路由和传递,其中包括Linux内核和Linux桌面环境的消息传递。 包装层:包装层一系列基于特定应用程序框架的Wrapper库。 D-Bus具备自身的协议,协议基于二进制数据设计,与数据结构和编码方式无关。该协议无需对数据进行序列化,保证了信息传递的高效性。无论是libdbus,还是D-Bus总线守护进程,均不需要太大的系统开销。 总线是D

dbus_to_python() takes exactly 1 argument?

≡放荡痞女 提交于 2019-11-28 10:47:49
问题 I'm attempting to control firewalld via the Python dbus module. I'd like to add an ip address to the trusted zone for both my current runtime as well as my permanent configuration. Here's the documentation for firewalld 's dbus interface: http://manpages.ubuntu.com/manpages/wily/man5/firewalld.dbus.5.html What works: The runtime configuration I'm able to add it to the runtime configuration just fine with this: def trustIP(ip): ''' firewalld must already be running ''' from dbus import

D-Bus tutorial in C to communicate with wpa_supplicant

二次信任 提交于 2019-11-27 13:00:18
问题 I'm trying to write some code to communicate with wpa_supplicant using DBUS. As I'm working in an embedded system (ARM), I'd like to avoid the use of Python or the GLib. I'm wondering if I'm stupid because I really have the feeling that there is no nice and clear documentation about D-Bus. Even with the official one, I either find the documentation too high level, or the examples shown are using Glib! Documentation I've looked at: http://www.freedesktop.org/wiki/Software/dbus I found a nice

DBusWatch and DBusTimeout examples

[亡魂溺海] 提交于 2019-11-27 11:45:16
问题 I need to write an application in C for asynchronous sending and reading messages on the dbus message queue. I've read that for doing that I should use the DBusWatch and DBusTimeout objects that the connection provides, but I cannot find an example of how to use these anywhere... For the moment i use dbus_connection_read_write_dispatch in order to do that, but I've read that it is not recommended for asynchronous operations, so I'll have to switch to creating my own main loop and using it...

USB devices UDev and D-BUS

强颜欢笑 提交于 2019-11-27 11:23:35
I am trying to get a list of currently plugged in USB devices in Ubuntu 10.10 and monitor changes that happen, like devices being plugged in or out using UDev and D-BUS. I'm fairly new to programming using D-BUS. I saw one example: Linux : How to detect is usb keyboard is plugged and unplugged only that one uses HAL and I know that HAL is deprecated. I found some working code, modified it a bit, only it doesn't work for any device only storage devices such as usb sticks, media players or cd-rom devices. I want the whole thing mice, keyboards, usb cameras chargers anything that is plugged in to

Async wait on file descriptor using Boost Asio

吃可爱长大的小学妹 提交于 2019-11-27 11:23:00
I'm trying to integrate D-Bus with my boost::asio application. D-Bus has an API that enumerates a set of Unix file descriptors (mainly sockets but could also be FIFOs) to be watched. When those descriptors have something to be read I should inform the D-Bus API so it can read them and do it's thing. Currently I'm doing this: using boost::asio::posix::stream_descriptor; void read_handle(stream_descriptor* desc, const boost::system::error_code& ec, std::size_t bytes_read) { if (!ec) { stream_descriptor::bytes_readable command(true); descriptor->io_control(command); std::size_t bytes_readable =

Connecting to dbus over tcp

狂风中的少年 提交于 2019-11-27 09:53:23
问题 I wrote a simple python program to play and pause banshee music player. While its working on my own machine, I have trouble doing it to a remote computer, connected to the same router (LAN). I edited the session.conf of the remote machine, to add this line: <listen>tcp:host=localhost,port=12434</listen> and here is my program: import dbus bus_obj=dbus.bus.BusConnection("tcp:host=localhost,port=12434") proxy_object=bus_obj.get_object('org.bansheeproject.Banshee', '/org/bansheeproject/Banshee

How to figure out which D-Bus binding to use

妖精的绣舞 提交于 2019-11-27 07:37:37
问题 I'm trying to detect across all linux if screensaver is running or if screen is locked. People recommended dbus. So now i'm trying to auto detect with x11 or C APIs or something what kind of dbus is available, then use that. Like qdubs, gdbus, etc? Thanks 回答1: As you’ve noticed, there are various D-Bus bindings available. As Ignacio says, you can use any of them, since they all speak the same protocol — but some bindings are more appropriate to some situations than others. Recommended high