dbus

What wrong when SimpleXMLRPC and DBusGMainLoop working in the same time

In python I try create a service that maintain calling event between SflPhone(dbus service) and external app, when I start SimpleXMLRPCServer my service no longer response for any calling event, such as on_call_state_changed function was not called. When I comment out thread.start_new_thread(start_server(s,)) everything is work well. ...

Waiting for a DBus service to be available in Qt

With a Qt DBus proxy built on QDbusAbstractInterface (via qdbusxml2cpp), what's the best way to handle the service/object you want to interface to not being available when you start? Note: I'm not interested in simply knowing it (you can use BlahService.isValid() to find that out); I want to be able to know if it's valid, and know when ...

Handling HAL implementation: storage.cdrom.write_speeds

device.get('storage.cdrom.write_speeds') This returns HAL list of ints, like: [4284, 2342, 1202, 800] How should these be handled, to recieve writing speed? Or better, how does one retrieve speeds for all media type burner can write: DVDs, CDs... According to wikipedia, calculation should be: value/150 for normal CDs, value/172.3 f...

Dbus: is there such a thing as a "Dbus sniffer" ?

Is there such a thing as a "Dbus sniffer" ? I would like to "sniff" all (or part) of the messages transiting on Dbus. ...

dbus: problem with dbus_bus_get_unique_name

I am having an issue with DBus: I register with DBus *dbus_bus_get()* method : OK I add filter matches : OK I add a filter callback function: OK I start a dispatch loop through *dbus_connection_read_write_dispatch()* : OK Everything works OK. Now, if I insert: 1a. *dbus_bus_get_unique_name()* I get a nasty exception message: a...

Custom threads?

How does one create custom threads to run in a Gtk application? Given this simplistic example: @w = Gtk::Window.new "testtest" @l = Gtk::Label.new "test" @w.add @l @w.show_all Gtk.main How could I run a thread like this? Thread.start { loop { puts 'thread running'; @l.text = Time.now.to_s; sleep 1 }} I got that timeout-based appro...

banshee: How would I set the rating for a specific track on Banshee through DBus?

I'd like to set the 'rating' of a specific track (i.e. not only the one currently playing) on Banshee through the DBus interface? ...

Creating a program to be broadcasted by avahi

I'm trying to write a program that outputs data that can be served over a network with avahi. The documentation I've looked at seems to say I have to register the service with dbus and then connect it to avahi, but the documentation to do this is pretty sparse. Does anyone know of good documentation for it? I've been looking at these: ...

Getting Java Binding for Dbus to Run on Android

Has anyone succeeded in running the Java bindings for dbus on Android? All indications point at dbus already running as a process within the Android OS, but there is no official access point for them through the Java interface. Thanks in advance! ...

dbus: flush connection?

When I do a "dbus_connection_close", do I need to flush the message queue? In other words, do I need to continue with "dbus_connection_read_write_dispatch" until I receive the "disconnected" indication or is it safe to stop dispatching? Updated: I need to close the connection to DBus in a clean manner. From reading the documentation, a...

DBus Python Problems

When I'm trying to get the idle time of the gnome screensaver in seconds, through dbus, python throws an TypeError. In the documentation I found for the screensaver sessionIdleTime, it returns a unsigned integer. http://www.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html#gs-method-GetSessionIdle However, when I'm in the...

How do I get the selected text in desktop application using python-dbus?

For example, I open a pdf file or a web page in gnome, use mouse double click some text, so a word is selected, how can I get this word in a background running daemon written with python-dbus? Some simple but working piece of script is appreciated greatly. Thanks! ...

Qt invokeMethod with QString

I have a daemon running on DBus that offers service for launching applications. I want to pass two strings to this service API (appPath, appArgs). I have registered the service and the object path with DBus. My service method gets called, but I do not receive the arguments properly () in my service. This is how I'm doing it from my adap...

Looking for advice on how to develop applets for Gnome / Ubuntu

I am a linux (mostly ubuntu) user with a reasonable understanding of how the system works (although I am certainly not a linux guru!). In the past I have developed small cross-platform desktop applications in python/GTK and I delivered them to clients as self-contained filetrees, so that the only dependencies were Python itself and GTK. ...

Receive data from dbus

Hi there. I need a hint on handling data structures send via DBus. The running service returns an Array of 2-Tuples containing two ints. In Python a(ii). Calling the method from the Qt app returns me: QDBusMessage answer = dbus_iface.call("hello", 'blaaa', 3, 4); QList data = answer.arguments(); qDebug() << answer: QDBusMessage(type=...

Linux USB Mapping Question

Hi, I'm working on a utility that will auto mount an inserted USB stick on linux. I have tied into D-Bus to receive notification of when a device is inserted, and that works great. However, I need to determine which device in /dev is mapped to the inserted USB stick. I am getting the D-Bus notification and then scanning the USB system w...

DBus-Cherrypy merge issue

I'm using python-dbus and cherrypy to monitor USB devices and provide a REST service that will maintain status on the inserted USB devices. I have written and debugged these services independently, and they work as expected. Now, I'm merging the services into a single application. My problem is: I cannot seem to get both services ( cher...

D-Bus threading model

I am starting to use D-Bus as the IPC mechanism for a new project in Linux/KDE. And I've discovered that the documentation does not really address concurrency at all. How are D-Bus services expected to deal with multiple concurrent calls coming in from different clients? What's the threading model? Can a service assume that it is single-...

Detect enter/exit session under KDE/Gnome without DBUS

I have implemented a systray icon in C++ using Xlib. I try to detect the enter/exit session events using the X Session Management Protocol, but latest GNOME versions are giving me trouble. Is there any reliable way to detect it without moving to DBUS? I am trying to avoid DBUS to be as legacy-compatible as possible. ...

How to find out the wireless authentication mode?

I'm trying to get the authentication mode (WPA/WEP) on all the available AccessPoints via DBUS API(in Linux). NetworkManager API describes a property WPAFLAGS but I don't get anything out of it (I get Null Flag everytime). D-Feet DBUS debugger also doesn't show anything. Am I missing something, or is the API broken? ...