[PATCH] client configuration file support
Ralf Habacker
ralf.habacker at freenet.de
Mon Jun 7 23:33:52 PDT 2010
Hi,
in situations where using environment variables may not fit into the
required use cases like gui only environments or embedded environments
an alternative would be in using a client related configuration file.
The appended patch contains an initial implementation for this feature.
The client configuration file is expected in the generic config dir
(unix:/etc/dbus-1, windows and other: <install-root>/etc/dbus-1) and is
named client.conf. An example of the related template file
client.conf.in located in the dbus subdirectory is shown below:
<!-- This configuration file controls how dbus clients access the
session bus -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Client
Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/clientconfig.dtd">
<clientconfig>
<sessionbus>
<connect>@DBUS_SESSION_BUS_CLIENT_DEFAULT_ADDRESS@</connect>
</sessionbus>
</clientconfig>
It allows to set the session bus address and could be extended easily
(see dbus-config-loader-expat.c)
The appended patch contains the source code for this feature using expat
xml library and patches for the cmake build system.
The feature is disabled in the build system by default and enabled by a
configuration switch named DBUS_ENABLE_CLIENT_CONF. Adding this feature
to autotools build system is very easy (see the related cmake files in
the patch)
Documentation for this feature is available in a pre release state and
when ready will be located in <dbus-src-root>/dbus/libdbus.xml (see the
appended prelimary version)
Please review.
Regards
Ralf
More information about the dbus
mailing list