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

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


Hi,

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


-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr>           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: <http://lists.freedesktop.org/archives/dbus/attachments/20100908/f75ab44f/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100908/f75ab44f/attachment-0001.pgp>


More information about the dbus mailing list