register bash script as dbus object

Thiago Macieira thiago at kde.org
Fri Dec 12 05:00:29 PST 2008


On Friday 12 December 2008 13:22:54 Matthew Johnson wrote:
> On Fri Dec 12 15:06, Александр Лавриненко wrote:
> > Why no way? Say, connect to dbus, announce itself and wait for methods
> > from clients could be done with:
> >
> > ...
> > connect-dbus-object-from-script bla-bla-bla......| while (read string ;
> > do
> >
> > but there's no "connect-dbus-object-from-script" or similar program to
> > use from scripts (nevermind the syntax - this is just conceptual
> > example).
>
> Precisely, this is why I said there's no way to do it, because there's no
> such program at the moment, because noone has needed one yet.

Please note that proper D-Bus support would require bi-directional 
communication. So a pipe won't be enough:

	some-program | while read line; do .... done

So what happens is that you need a generic D-Bus program whose scripting 
language is bash.

It's doable, but no one has done that yet. It's probably because it takes more 
time to write that program to interface with a shell script than to write the 
entire operation in C, C++, Python, Java, or whatever.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Software Engineer - Nokia, Qt Software
  Qt Software is hiring - ask me
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20081212/61d146c0/attachment.pgp 


More information about the dbus mailing list