dbus

Segmentation fault when run as root?

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My c++ program gives me a seg fault when I run as root from my computer but not when I start a remote session. My program run from my computer only as a user. What can be the problem? I wrote my program for an embedded device and I'm using this to compile: gcc -Werror notify.cc -o notify `pkg-config --libs --cflags gtk+-2.0 hildon-notifymm hildonmm hildon-fmmm' I'm not getting any error. Could it be a flag problem? I can post my code. EDIT: When I start my program with gdb I get this: Program received signal SIGSEGV, Segmentation fault.

Start a service in docker container failed,with error: Failed to get D-Bus connection: No connection to service manager

馋奶兔 提交于 2019-12-03 09:45:06
问题 I installed docker image and built a image successfully. When I ssh to the container and run the command service xxx start , an error popped: service nginfra start Redirecting to /bin/systemctl start nginfra.service /sbin/service: line 79: /bin/systemctl: No such file or directory Actually, fakesystemd is installed in the container instead of systemd . So I removed fakesystemd and installed systemd with the command: yum swap -- remove fakesystemd -- install systemd systemd-libs But I still

Connecting to dbus over tcp

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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: tcp:host=localhost,port=12434 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

BluezV5.42 DBUS C API for BLE?

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have developed BLE application for openwrt using BLUEZV5.30 . I was able to create the application by extracting source code gatttool and hcitool . I have also added few more functionality then provided by these tools (like reading rssi ). However, i have upgraded my bluez stack to 5.42 and i am planning to use DBUS interface for all BLE related operations. The functionality i want: Reading RSSI Connecting and Disconnecting Bonding Pairing Deleting Bonding information Discovery Scanning Advertising Write/Reading to Characteristics

Cannot call klipper methods in dbus with python

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I try to call methods from klipper bus with python. But I could not make it. Here is what i try: >>> import dbus >>> bus = dbus.SessionBus() >>> proxy = bus.get_object("org.kde.klipper","/org/kde/klipper") >>> print proxy <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x7fc249da3bf0> :1.67 /org/kde/klipper at 0x7fc249dc16d0> >>> iface = dbus.Interface(proxy,"org.kde.klipper.klipper") >>> print iface <Interface <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x7fc249da3bf0> :1.67 /org/kde/klipper at 0x7fc249dc16d0>

Calling dbus-python inside a thread

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting segfaults when calling a dbus method inside a thread. This is my scenario: I have a program Service1 that exposes a method test. A second program Service2 exposes a method expose. As this method does some serious numerical computation, I pass some params from expose to a running thread reader. This thread, in turn, calls the method test of Service1 when it ends its work. I'm geting segfaults in last dbus call. The code: # Service1.py class Service1(Object): def __init__(self, bus): name = BusName('com.example.Service1', bus) path

How do I use Emacs's DBUS interface?

我只是一个虾纸丫 提交于 2019-12-03 06:38:49
I looked up the dbus package and it seems like all of the functions are built-in to the C source code and there's no documentation for them. How do I use the dbus-call-method function? Google to the rescue... Follow the link for the example, it's not my code so I won't put it here. http://emacs-fu.blogspot.com/2009/01/using-d-bus-example.html I just had the same problem and found the emacs-fu article that comes up when googling a little too basic for my needs. In particular I wanted to export my own elisp methods via dbus, and had problems making sense of the dbus terminology and how it

SImple (but specific) listener and sender Python 3 DBus example

爱⌒轻易说出口 提交于 2019-12-03 05:04:36
I want to make a program that has two parts. A listener (a server, if you will) and a sender (the client). I did some research and learned that this is done via a method programmers call IPC (inter process communication); I'm sure you know what it means, I am just expanding the acronym so that you know that I don't think it means Internet Pet Cannibals (or some other non related unpleasant thing). I read that a good way to achieve this is to use dbus. So I did some research on dbus, and now I'm just confused. Apparently there are a lot of things you can do with dbus, like send notifications to

How to use a variant dictionary (`a{sv}`) in dbus-send

丶灬走出姿态 提交于 2019-12-03 03:27:28
I have some trouble with dbus-send when using a{sv} Calling a method with in_signature='a{ss}' seems to work using the following command line: dbus-send --dest="org.test.TestService" /org/test/TestService/object org.test.TestService.method1 dict:string:string:"a","1","b","2" Now I would like to have a dictionary with a variant type for values ( in_signature=a{sv} ), How can I use it in dbus-send ? Although D-Bus supports signatures such as a{sv} , dbus-send does not. This is from the dbus-send man page : "...D-Bus supports more types than these, but dbus-send currently does not. Also, dbus

How to handle properties of a dbus interface with python?

匿名 (未验证) 提交于 2019-12-03 03:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm about to work on an implementation of mpris . But currently I am not sure how to read/write dbus interface properties with python-dbus. Is there any examples for this ? 回答1: Finally got the answer: @dbus . service . method ( dbus . PROPERTIES_IFACE , in_signature = 'ss' , out_signature = 'v' ) def Get ( self , interface , prop ): ... @dbus . service . method ( dbus . PROPERTIES_IFACE , in_signature = 'ssv' ) def Set ( self , interface , prop , value ): ... @dbus . service . method ( dbus . PROPERTIES_IFACE , in_signature = 's'