dbus

Ideas to extend this little project? - A pidgin web ui

I have built a little Web UI for Pidgin(respectively all libpurple based messengers) together with DBus and Sinatra. It was for fun and learning purposes and now I'm looking for ideas to extend it. Can you think of any useful applications or extensions for it? Since I work on this project to learn something new, ideas for other techno...

How to get root premissions for my app?

My app needs to do some privileged work. I've been looking everywhere, but I can't find anything useful. I know I want to use Policykit1 and dbus because all the other alternatives I've found aren't used anymore. This is the code I got so far: import dbus import os bus = dbus.SystemBus() proxy = bus.get_object('org.freedesktop.PolicyK...

Publish and subscribe to dBus events with Eclipse EventAdmin?

D-Bus on Linux and the EventAdmin in Eclipse both offer a publish/subscribe model. I want to link the two, so I can publish an event to the EventAdmin in Eclipse and it publishes that event to D-Bus and vice versa. A module in Eclipse listens to selected D-Bus events and publishes them to the EventAdmin. I'm clear how to publish/subscrib...

python dbus problem

I have a problem with dbus and python. Running python from the command line, telling it import dbus and then systembus = dbus.SystemBus() results in no errors, nor does running a program written by a friend which also uses the exact same code. However, when running a program I'm trying to write, I get this error: Traceback (most recent ...

DBUS- Diff of "Service" and "Bus name"

In DBUS programming terminologies, they use Service name interchangebly with Bus name. Or is there a difference? ...

Setting dbus properties in Python

I've found the excellent answer in How can I listen for ‘usb device inserted’ events in Linux, in Python? to get basic D-Bus connectivity and read properties. I assumed it would be easy to modify properties but I can't seem to get that working. pdevice.SetProperty("thing", dbus.Boolean(0)) gives the unenlightening DBusException: org...

Dbus python and suspend with lock screen

Hi, I was wondering and also try to do it, how to lock and suspend computer using dbus interface. I am able to suspend system using org.freedesktop.UPower with method Suspend(). I also am able to lock system using org.gnome.ScreenSaver with method Lock(). But how to do it at the same time? Is it good way to use signal Suspend ? or the...

QDBus problem: getting org.freedesktop.DBus.Error.UnknownMethod, but method exists

I'm programming C++ on Ubuntu, using QDBus and I've got the following code snippet: this->m_cRemoteInterface = new QDBusInterface("org.my.service", "/data", "org.freedesktop.DBus.Properties.Get"); QDBusReply<uint64_t> cResult = m_cRemoteInterface->call("property1"); The code throws the following error: org.freedesktop.DBus.Erro...

high-level IPC library needed

Hi, Suppose that we have four process A, B, C, and D. Usually, B-D send packets to A and get a reply from A. (The packet represents a simple command, so it is very small) However, sometimes, 'A' broadcasts an event, so that all of B-D should be notified. At first glance, My mind came up with 'dbus'. Unfortunately, we need a open so...

How to mount/unmount flash disk with using hal,dbus in python?

hi, i need to mount and unmount flash drive in my code -written with python- without using command line or os module. how can i mount/unmount flash drive with using dbus ( also hal)? ...

D-Bus GLib bindings—unable to get code off the ground

I've been playing with GLib's D-Bus bindings, trying to get something (anything) working, with very limited success. I've been trying to get Ross Burton's example code to compile and run, but keep hitting new and exciting difficulties. Can you help debug this code, or failing that, point me at some example of D-Bus GLib code that does w...

Python Dbus : SystemBus and SesssionBus mainloops

Hello, I need to run SystemBus and SessionBus mainloops in my python application. So I would like to ask what is the best way to do this ? To run SystemBus mainloop in application's main thread and SessionBus mainloop in another ? Regards, Levon ...

What is the workflow for automount in Gnome 2.30?

I have a ASUS laptop with Fedora 13. My problem is that any USB storage I connect does not automount. I have other computer with Fedora 13 which does not have the problem. I have not be able to find any difference in configuration between my laptop and other computers that work. So to try to trace down the problem I started to looomk f...

how to connect HAL using dbus

I'm using python and dbus. What i really need is a way to get the input from my microphone into my python program and then play it back from the program. I googled a lot and it seems pyaudio might do the trick but pyaudio does not work with my ubuntu 10.04. The next option i saw was telepathy. But i don't need something that big, eithe...

How to emit dbus signal from command line

Hello, Is there a way to emit dbus signal from command line using dbus-send or something else ? Regards, Levon ...

Linux Shutdown with dbus-send

Hey, I am writing a Java app to shutdown my Linux box remotely. The desktop app sits and waits for a command to be sent to it. I have tried using "shutdown -h" but this requires sudo privileges and is not an option. I then found a way to shutdown without sudo using the following dbus-send solution: dbus-send --print-reply --system -...

How to attach X11 app to Dbus.

Hello, How to make X11 application to listen to DBus signal. That to listen to Dbus signal gmainloop should be launched, and for X11 app XEvent loop. So is there an elegant way to do this ? Or do I have to run gmainloop in another thread. Regards, Levon ...

Python Dbus : How to export Interface property

Hello, In all python dbus documentations there are info on how to export objects, interfaces, signals, but there is nothing how to export interface property. Any ideas how to do that ? Regards, Levon ...

C DBus : Fails when calling method returning string

Cant please someone tell me why the code below crashes when executing, (compilation goes OK) it in rotated X environment 90 to left. DBusGConnection *connection; DBusGProxy *proxy; GError *error = NULL; gchar *name = NULL; g_type_init (); //Get the connection and ensure the name is not used yet connection =...

multiple d-bus session bus objects in python

hi! I've written a script that connects to d-bus session bus on a remote computer like so: os.environ["DBUS_SESSION_BUS_ADDRESS"] = "tcp:host=192.168.0.1,port=1234" bus = dbus.SessionBus() That works fine except now I need to be able to connect to multiple session buses on different computers. I've tried the following: os.environ["D...