Connect plugin to program
Timo
timovwb at gmail.com
Sun Sep 14 04:14:40 PDT 2008
Ignacio Vazquez-Abrams schreef:
> On Sat, 2008-09-13 at 14:23 +0200, Timo wrote:
>
>> Hello all, I want to know if the following can be done with d-bus.
>> I have written a program that needs to do all of it's commands as root,
>> so I always start it as root. Now I want to write a plugin for a
>> messenger client that also needs to do these commands, but instead of
>> activating the plugin as root, I was thinking if it was possible to
>> start my main program (as root ofcourse) and then let the plugin use the
>> commands in the program. So the plugin can be used as normal user, but
>> can execute commands that need root-privileges.
>> Can d-bus do something like this? The program + plugin are written in
>> Python.
>>
>
> Take a look at hal and gnome-volume-manager for an example of something
> like this.
>
>
Thanks, but I know very little about C, so has anyone tips/examples for
doing this in Python?
I found a simple example (
http://www.flaper87.org/2008/06/04/communicating-with-our-application-using-python-and-dbus
), and it works. But if I start the code as root (like my program will
be), I can't connect to it as normal user.
Timo
More information about the dbus
mailing list