Connect CGI with session bus: Should we need a user bus?

Mildred Ki'Lya ml.mildred593 at
Wed Sep 8 02:51:06 PDT 2010


I'm new to this list, but I am writing this email because there is a
specific problem I have with DBus. I'm trying to communicate with an
application on the session bus from a CGI script.

For some time now, I think DBus should have created a user bus. The same
as a session bus but not limited to applications on the same session. I
created scripts that let me reuse the same session bus that started on
X11 when I logged in a text console. That never worked well, and I ended
up deleting all my scripts.

Here is my problem: I'm indexing files on a server using Tracker. It
uses the session bus to communicate with its components and to accept
search queries. Now, I'd like to search my files on another server.

The most logical thing to do would be to use DBus over the network, but
that's not possible. I resolved into creating a very simple application
that would introduce a very simple string-based protocol. This
application is going to work as a CGI script run by Apache httpd.

But, it can't work, apache isn't on my session bus:

    (tracker-gateway:18188): Tracker-CRITICAL **: Could not connect to
    the D-Bus session bus, /bin/dbus-launch terminated abnormally with
    the following error: Autolaunch error: X11 initialization failed.

Obviously, https doesn't have access to a X server as well.

Is there a way to work around this problem? Connecting to the existing
session bus?
Would it be sensible to implement a user bus?


Mildred Ki'Lya
╭───────── ──────────
│ Jabber, GoogleTalk: <mildred at>
│ Website: <>           GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x9A7D2E2B.asc
Type: application/pgp-keys
Size: 10035 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the dbus mailing list