From eeb88949d8d2ca84d9cbe54c07e73b9907d3163e Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 3 Apr 2003 05:22:49 +0000 Subject: 2003-04-03 Havoc Pennington * bus/config-parser.c (bus_config_parser_unref): free list of mechanisms, bug discovered by test suite enhancements (putting system.conf and session.conf into suite) * test/Makefile.am, test/test-service.c: add placeholder for a test service that we'll activate as part of test suite. Doesn't do anything yet. * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by setting NULL value, and use system malloc not dbus_malloc() when we have unavoidable memleakage. * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0 didn't work, and support DBUS_BUS_ACTIVATION. * bus/activation.c (child_setup): pass our well-known bus type to the child * bus/config-parser.c: support to specify well-known type * doc/dbus-specification.sgml: document the env variables to locate well-known buses and find service activator --- doc/config-file.txt | 9 +++++++++ doc/dbus-specification.sgml | 48 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/config-file.txt b/doc/config-file.txt index b8230aab..8c2152b5 100644 --- a/doc/config-file.txt +++ b/doc/config-file.txt @@ -27,6 +27,15 @@ Elements: Root element. + + + The well-known type of the message bus. Currently known values + are "system" and "session"; if other values are set, they should + be either added to the D-BUS specification, or namespaced. + The last element "wins" + + Example: session + ignore_missing="(yes|no)" optional attribute, defaults to no diff --git a/doc/dbus-specification.sgml b/doc/dbus-specification.sgml index 5d150e86..7e2fcb35 100644 --- a/doc/dbus-specification.sgml +++ b/doc/dbus-specification.sgml @@ -1235,9 +1235,21 @@ The executable launched will have the environment variable - DBUS_BUS_ADDRESS set to the address of the + DBUS_ACTIVATION_ADDRESS set to the address of the message bus so it can connect and register the appropriate services. + + The executable being launched may want to know whether the message bus + activating it is one of the well-known message buses (see ). To facilitate this, the bus MUST also set + the DBUS_ACTIVATION_BUS_TYPE environment variable if it is one + of the well-known buses. The currently-defined values for this variable + are system for the systemwide message bus, + and session for the per-login-session message + bus. The activated executable must still connect to the address given + in DBUS_ACTIVATION_ADDRESS, but may assume that the + resulting connection is to the well-known bus. + [FIXME there should be a timeout somewhere, either specified in the .service file, by the client, or just a global value @@ -1247,7 +1259,7 @@ - Standard Message Bus Instances + Well-known Message Bus Instances Two standard message bus instances are defined here, along with how to locate them and where their service files live. @@ -1257,9 +1269,17 @@ Each time a user logs in, a login session message bus may be started. All applications in the user's login - session may interact with one another using this message bus. [specify - how to find the address of the login session message bus via - environment variable and/or X property] + session may interact with one another using this message bus. + + + The address of the login session message bus is given + in the DBUS_SESSION_BUS_ADDRESS environment + variable. If that variable is not set, applications may + also try to read the address from the X Window System root + window property _DBUS_SESSION_BUS_ADDRESS. + The root window property must have type STRING. + The environment variable should have precedence over the + root window property. [FIXME specify location of .service files, probably using @@ -1272,8 +1292,22 @@ A computer may have a system message bus, accessible to all applications on the system. This message bus may be - used to broadcast system events, such as adding new hardware devices. - [specify how to find the address of the system message bus] + used to broadcast system events, such as adding new hardware devices, + changes in the printer queue, and so forth. + + + The address of the login session message bus is given + in the DBUS_SYSTEM_BUS_ADDRESS environment + variable. If that variable is not set, applications should try + to connect to the well-known address + unix:path=/var/run/dbus/system_bus_socket. + + + The D-BUS reference implementation actually honors the + $(localstatedir) configure option + for this address, on both client and server side. + + [FIXME specify location of system bus .service files] -- cgit