Evan Martin (evan) wrote in evan_tech,
Evan Martin

dbus activation, bmpx

D-BUS is an emerging standard negotiated by the Gnome and KDE people to allow interprocess calls. It's based on KDE's DCOP but it's used by a lot of recent Gnome software as well, to great effect. For example, Growl on OS X is mirrored by Galago on Gnome.

One of the interesting things about DBUS that I didn't appreciate when I first read about it is that it supports service "activation". For example, I can send a message to a music-playing service (services are identified by well-known and namespaced strings), and if the daemon behind the service isn't running, DBUS will bring it up and then send it the message. (If you're on a recent Gnome machine, you probably have a /usr/share/dbus-1/services/notification-daemon.service that provides org.freedesktop.Notifications.)

You can prod that service to life by sending a message its way:
% dbus-send --session --dest=org.freedesktop.Notifications --print-reply / org.freedesktop.DBus.Introspectable.Introspect
but from there, you're better off using dbus-viewer, which is a GUI frontend to the introspection APIs.

I mentioned a music-playing service: the one I've discovered is BMPx, which is a rewrite of beep-media-player (itself a fork of XMMS). It's a bit excessively complicated, as music players tend to be (it's an mp3 player with skins -- wait, no, it's a media player -- wait, no, it's a media streaming framework -- wait, no, it's a generalized media library management system hooked up to a framework -- wait, no it's a media-playing daemon ...). But it does have a DBUS interface as well, with the sorts of sorts of calls you'd expect.
Tags: d-bus, free software

  • memcache job offers

    I get occasional recruiter spam that specifically calls out "my work on memcached". This is pretty funny because all I did was make some trivial…

  • application stack

    "Put yourself in 1995. I'm going to tell the you of 1995 that in 2010, there will be a software platform with the following properties:" Luis Villa…

  • bsd license advertising

    Did you know that the 3-clause BSD (that is, the one with the "advertising" clause stripped) license still has an advertising requirement? Read it…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.