dbus

Passing a large data structure over dbus

和自甴很熟 提交于 2019-11-30 05:37:49
问题 I'm using dbus to communicate two programs. One creates a large image and it later sends it other program for further processing. I'm passing the image as ByteArray. With 2000x2000 images my program works, but with 4000x4000 it crasses with: process 2283: arguments to dbus_message_iter_append_fixed_array() were incorrect,assertion "n_elements <= DBUS_MAXIMUM_ARRAY_LENGTH / _dbus_type_get_alignment (element_type)" failed in file dbus-message.c line 2628. I understand that this means that I'm

red hat enterprise linux 7关闭防火墙的方法

拈花ヽ惹草 提交于 2019-11-30 05:03:08
red hat enterprise linux 7发布后,发现防火墙也变了,如何关闭防火墙呢,下面是方法 1.查看firewall的状态 [root@sztech7 ~]# systemctl status firewalld firewalld.service - firewalld - dynamic firewall daemon Loaded : loaded (/ usr / lib /systemd/system/firewalld.service; enabled) Active: inactive (dead) since 五 2014-05-23 13:29:44 CST; 2min 27s ago Process: 840 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS) Main PID: 840 (code=exited, status=0/SUCCESS) 5月 23 13:26:41 sztech7 systemd[1]: Started firewalld - dynamic firewall daemon. 5月 23 13:29:42 sztech7 systemd[1]: Stopping

Linux : How to detect is usb keyboard is plugged and unplugged

会有一股神秘感。 提交于 2019-11-30 04:07:43
Is there any daemon/tool which will trigger some signal/event when usb keyboard is plugged and unplugged from pc ? I need to know in my program when usb keyboard is plugged and unplugged. Any ideas how to do this ? Regards, Levon udev (Linux device manager) is the one that polls hardware. When it detects some changes about devices, it executes the rule associated. You should add a rule to udev, in order to inform your program about insertion of removal of USB keyboard. You can find documentation about udev rules here , or Look at files in /etc/udev/rules.d/ or /lib/udev/rules.d/ to find many

DBus Finch/Pidgin without X11

半腔热情 提交于 2019-11-29 15:42:49
问题 I want to do some Python scripting on my server where I can communicate with finch (A console interface of pidgin , with the interface looking like links2 ) through the DBus Python library to send messages or check for buddy online status. This works if you do it in X. Run finch in an X terminal and run the Python script in another terminal with no errors/exceptions. But if you do it without X , you have to run finch in TTY1 (ctrl+alt+f1) and the python script in TTY2 (ctrl+alt+f2) but the

How do I extract the returned data from QDBusMessage in a Qt DBus call?

≡放荡痞女 提交于 2019-11-29 10:21:22
问题 I'm trying to call WPA supplicant's DBus interface using Qt's QDBus class library. In particular, I'm trying to use the "Get" property call to retrieve the "Interfaces" property value. The DBus specification (via introspection) for "Get" is: <interface name="org.freedesktop.DBus.Properties"> <method name="Get"> <arg name="interface" type="s" direction="in"/> <arg name="propname" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method> ... </interface> Seems simple

拆解大数据总线平台DBus的系统架构

孤街浪徒 提交于 2019-11-29 09:38:14
拓展阅读: 如何基于日志,同步实现数据的一致性和实时抽取? 快速部署DBus体验实时数据流计算 Dbus所支持两类数据源的实现原理与架构拆解。 大体来说,Dbus支持两类数据源: RDBMS数据源 日志类数据源 一、RMDBMS类数据源的实现 以mysql为例子. 分为三个部分: 日志抽取模块 增量转换模块 全量拉取模块 1.1 日志抽取模块(Extractor) mysql 日志抽取模块由两部分构成: canal server:负责从mysql中抽取增量日志。 mysql-extractor storm程序:负责将增量日志输出到kafka中,过滤不需要的表数据,保证at least one和高可用。 我们知道,虽然mysql innodb有自己的log,mysql主备同步是通过binlog来实现的。而binlog同步有三种模式:Row 模式,Statement 模式,Mixed模式。因为statement模式有各种限制,通常生产环境都使用row模式进行复制,使得读取全量日志成为可能。 通常我们的mysql布局是采用 2个master主库(vip)+ 1个slave从库 + 1个backup容灾库 的解决方案,由于容灾库通常是用于异地容灾,实时性不高也不便于部署。 为了最小化对源端产生影响,我们读取binlog日志从slave从库读取。 读取binlog的方案比较多

Linux : How to detect is usb keyboard is plugged and unplugged

烈酒焚心 提交于 2019-11-29 01:57:39
问题 Is there any daemon/tool which will trigger some signal/event when usb keyboard is plugged and unplugged from pc ? I need to know in my program when usb keyboard is plugged and unplugged. Any ideas how to do this ? Regards, Levon 回答1: udev (Linux device manager) is the one that polls hardware. When it detects some changes about devices, it executes the rule associated. You should add a rule to udev, in order to inform your program about insertion of removal of USB keyboard. You can find

【转载】DBUS及常用接口介绍

家住魔仙堡 提交于 2019-11-28 21:51:25
转自:https://blog.csdn.net/mr_wangning/article/details/60324291 DBUS是一种高级的进程间通信机制。DBUS支持进程间一对一和多对多的对等通信,在多对多的通讯时,需要后台进程的角色去分转消息,当一个进程发消息给另外一个进程时,先发消息到后台进程,再通过后台进程将信息转发到目的进程。DBUS后台进程充当着一个路由器的角色。 DBUS中主要概念为总线,连接到总线的进程可通过总线接收或传递消息,总线收到消息时,根据不同的消息类型进行不同的处理。DBUS中消息分为四类: 1. Methodcall消息:将触发一个函数调用 ; 2. Methodreturn消息:触发函数调用返回的结果; 3. Error消息:触发的函数调用返回一个异常 ; 4. Signal消息:通知,可以看作为事件消息。 1.2 DBUS应用场景 根据DBUS消息类型可知,DBUS提供一种高效的进程间通信机制,主要用于进程间函数调用以及进程间信号广播。 1 . 函数调用 DBUS可以实现进程间函数调用,进程A发送函数调用的请求(Methodcall消息),经过总线转发至进程B。进程B将应答函数返回值(Method return消息)或者错误消息(Error消息)。 2 . 消息广播 进程间消息广播(Signal消息)不需要响应

D-Bus tutorial in C to communicate with wpa_supplicant

我们两清 提交于 2019-11-28 20:37:44
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 article about using D-Bus in C: http://www.matthew.ath.cx/articles/dbus However, this article is pretty

DBusWatch and DBusTimeout examples

这一生的挚爱 提交于 2019-11-28 18:55:52
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... The closest answer to my question was this one: http://lists.freedesktop.org/archives/dbus/2007