<chapter id="configuring">
  <title>Configuring Bonobo Activation</title>

  <sect1>
    <title><filename>.server</filename> search path.</title>
    <para>
      To know the list of available <acronym>CORBA</acronym> servers on your
      local machine, the Bonobo Activation daemon searches a number of
      directories for <filename>.server</filename> <acronym>XML</acronym>
      files which contain the description of the services offered by these
      servers.

      By default, Bonobo Activation will try to find them in 
      <filename>${prefix}/lib/bonobo/servers</filename> which may be a problem
      if users install other applications using Bonobo Activation in different
      prefixes.
    </para>

    <para>
      To work around this problem, Bonobo Activation will parse a number of
      other directories.
      It will parse the directories listed in the 
      <envar>BONOBO_ACTIVATION_PATH</envar> environment variable.
      It will parse the prefixes listed in the <envar>GNOME2_PATH</envar>
      environment variable.

      If, for example,
      <emphasis>BONOBO_ACTIVATION_PATH=/opt/gnome2/lib/bonobo/servers:/opt/gnome2/bonobo-activation/lib/bonobo/servers</emphasis>,
      Bonobo Activation will parse
      <emphasis>/opt/gnome2/lib/bonobo/servers</emphasis> and 
      <emphasis>/opt/gnome2/bonobo-activation/lib/bonobo/servers</emphasis>

      If <emphasis>GNOME2_PATH=/opt/gnome2:/opt/gnome2/bonobo-activation</emphasis>,
      Bonobo Activation will parse
      <emphasis>/opt/gnome2/lib/bonobo/servers</emphasis> and
      <emphasis>/opt/gnome2/bonobo-activation/lib/bonobo/servers</emphasis>.
    </para>

    <!-- FIXME in which order does it search exactly
         (question on IRC on 2003-05-06) -->

    <para>
      The above environment variables are kept to ease development with
      Bonobo Activation and for <acronym>GNOME</acronym> integration.
      Bonobo Activation has a much nicer configuration file which allows 
      you to control which directories are parsed by Bonobo Activation.
      This <acronym>XML</acronym> configuration file is located in
      <filename>/etc/bonobo-activation/bonobo-activation-config.xml</filename>
      or
      <filename>${prefix}/etc/bonobo-activation/bonobo-activation-config.xml</filename>.
      An empty <filename>bonobo-activation-config.xml</filename> and a sample
      <filename>bonobo-activation-config.xml.sample</filename> file should be
      installed on your system.
    </para>

    <para>
      It is recommended to use the
      <command>bonobo-activation-sysconf</command> command-line
      configuration tool to edit this file. However, here is an example of its
      format.
    </para>

    <programlisting>
&lt;?xml version="1.0"?>

&lt;oafconfig>

&lt;searchpath>
&lt;item>/opt/gnome2/lib/bonobo/servers&lt;/item>
&lt;item>/usr/local/gnome2/lib/bonobo/servers&lt;/item>
&lt;item>/usr/local/lib/bonobo/servers&lt;/item>
&lt;item>/opt/gnome2/bonobo-activation/lib/bonobo/servers&lt;/item>
&lt;/searchpath>

&lt;searchpath>
&lt;item>/opt/gnome2/bonobo-activation/lib/bonobo/servers&lt;/item>
&lt;/searchpath>

&lt;/oafconfig></programlisting>

    <para>
      There can be any number of <sgmltag>item</sgmltag> tags in a
      <sgmltag>searchpath</sgmltag> tag and any number of
      <sgmltag>searchpath</sgmltag> tags in the <sgmltag>oafconfig</sgmltag>
      tag.
    </para>

  </sect1>

</chapter>

<!--
Local Variables:
mode: xml
sgml-namecase-general: t
sgml-general-insert-case: lower
sgml-parent-document: ("bonobo-activation-docs.sgml" "BOOK" "CHAPTER")
End:
-->
