<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY openbox-download-http
  "http://openbox.org/dist/openbox/openbox-&openbox-version;.tar.gz">
  <!ENTITY openbox-download-ftp  " ">
  <!ENTITY openbox-md5sum        "93df606606053b7e8578a5c116afb8ec">
  <!ENTITY openbox-size          "956 KB">
  <!ENTITY openbox-buildsize     "19 MB">
  <!ENTITY openbox-time          "0.3 SBU">
]>

<sect1 id="openbox" xreflabel="openbox-&openbox-version;">
  <?dbhtml filename="openbox.html"?>

  <sect1info>
    <othername>$LastChangedBy: pierre $</othername>
    <date>$Date: 2015-03-01 05:42:20 -0500 (Sun, 01 Mar 2015) $</date>
  </sect1info>

  <title>openbox-&openbox-version;</title>

  <indexterm zone="openbox">
    <primary sortas="a-openbox">Openbox</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to openbox</title>

    <para>
      <application>Openbox</application> is a highly configurable desktop
      window manager with extensive standards support. It allows you to control
      almost every aspect of how you interact with your desktop.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&openbox-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &openbox-md5sum;
      </para>
      </listitem>
      <listitem>
        <para>
          Download size: &openbox-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &openbox-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &openbox-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Openbox Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="x-window-system"/> and
      <xref linkend="pango"/> (compiled with support for libXft)
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="dbus"/> (runtime),
      <xref linkend="imlib2"/> (to enable icons in the right click menu),
      <xref linkend="pyxdg"/>,
      <xref linkend="startup-notification"/>, and
      <xref linkend="librsvg"/>
    </para>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/openbox"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of Openbox</title>

    <note><para>If XORG_PREFIX is not <filename class='directory'>/usr</filename>,
    tell <command>gcc</command> about it:</para>

    <screen><userinput>export LIBRARY_PATH=$XORG_PREFIX/lib</userinput></screen>
    </note>

    <para>If you installed only Python 3 PyXDG module convert one of the
    scripts to Python 3:</para>

<screen><userinput>2to3 -w data/autostart/openbox-xdg-autostart &amp;&amp;
sed 's/python/python3/' -i data/autostart/openbox-xdg-autostart</userinput></screen>

    <para>
      Install <application>Openbox</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --disable-static  \
            --docdir=/usr/share/doc/openbox-&openbox-version; &amp;&amp;
make</userinput></screen>

    <para>
      This package does not come with a test suite. 
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install</userinput></screen>
  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <option>--sysconfdir=/etc</option>: This option puts
      <application>Openbox</application>'s configuration files in
      /etc/xdg/openbox instead of /usr/etc/xdg/openbox.
    </para>

    <para>
      <option>--docdir=/usr/share/doc/openbox-&openbox-version;</option>:
      this puts a few files in a versioned directory in
      <filename class="directory">/usr/share/doc</filename>.
    </para>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring Openbox</title>

    <sect3 id="openbox-config">
      <title>Config Files</title>

      <para>
        /etc/xdg/openbox/autostart, /etc/xdg/openbox/menu.xml, /etc/xdg/openbox/rc.xml,
        ~/.config/openbox/autostart, ~/.config/openbox/menu.xml and ~/.config/openbox/rc.xml
      </para>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-AA.autostart">~/.config/openbox/autostart</primary>
      </indexterm>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-AA.menu">~/.config/openbox/menu.xml</primary>
      </indexterm>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-AA.rc">~/.config/openbox/rc.xml</primary>
      </indexterm>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-etc-path-autostart">/etc/xdg/openbox/autostart</primary>
      </indexterm>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-etc-path-menu">/etc/xdg/openbox/menu.xml</primary>
      </indexterm>

      <indexterm zone="openbox openbox-config">
        <primary sortas="e-etc-path-rc">/etc/xdg/openbox/rc.xml</primary>
      </indexterm>
    </sect3>

    <sect3><title>Configuration Information</title>

      <para>
        <application>Openbox</application>'s right click menu can be used to
        launch programs. The menu itself is configured with 2 files,
        <filename>/etc/xdg/openbox/menu.xml</filename> and
        <filename>~/.config/openbox/menu.xml</filename>. To make changes to the
        menu, copy /etc/xdg/openbox/menu.xml to ~/.config/openbox/menu.xml and
        edit it:
      </para>

<screen role="user"><userinput>cp -rf /etc/xdg/openbox ~/.config</userinput></screen>
      <para>

        <filename>~/.config/openbox/menu.xml</filename> can be edited with a
        text editor or you can install
        <ulink url="http://obmenu.sourceforge.net/">Obmenu</ulink> (requires
        <ulink url="http://pyxml.sourceforge.net/topics/">pyxml</ulink>
        and <xref linkend="pygtk"/>).
      </para>

      <para>
        To have icons in your right click menu requires installing
        <xref linkend="imlib2"/> before you install
        <application>Openbox</application>. To set an icon for an entry in the
        menu edit <filename>~/.config/openbox/menu.xml</filename> and add an
        icon to the  &lt;item&gt; tag like this:
      </para>

<screen>&lt;item label="Mplayer" icon="/usr/share/pixmaps/mplayer.png"&gt;</screen>

      <para>
        Many other aspects of <application>Openbox</application>'s behaviour are
        configured with <filename>~/.config/openbox/rc.xml</filename> such as
        what keybindings are used to launch programs or which mouse button
        launches the main menu.
      </para>

      <para>
        Details of the theme that <application>Openbox</application> applies to
        window decorations are configured in
        <filename>~/.config/openbox/rc.xml</filename>. You can get a list of the
        available themes with the command:
      </para>

<screen role="user"><userinput>ls -d /usr/share/themes/*/openbox-3 | sed 's#.*es/##;s#/o.*##'</userinput></screen>
    </sect3>

    <sect3  id="openbox-init">
      <title>Starting Openbox</title>

      <para>
        To automatically start <command>openbox</command> when you start
        <application>Xorg</application>:
      </para>

<screen role="user"><userinput>echo openbox &gt; ~/.xinitrc</userinput></screen>

      <para>
        If you want to set a background image to your desktop you can use
        <xref linkend="display"/> and launch it from ~/.xinitrc just before
        openbox:
      </para>

<screen role="user"><userinput>cat &gt; ~/.xinitrc &lt;&lt; "EOF"
<literal>display -backdrop -window root /path/to/beautiful/picture.jpeg
exec openbox</literal>
EOF</userinput></screen>

      <para>
        Or if you like a bit of variety, put a selection of images in a folder
        (in this example, the directory ~/.config/backgrounds) and choose one at
        random each time you <command>xinit</command>:
      </para>

<screen role="user"><userinput>cat &gt; ~/.xinitrc &lt;&lt; "EOF"
<literal># make an array which lists the pictures:
picture_list=(~/.config/backgrounds/*)
# create a random integer between 0 and the number of pictures:
random_number=$(( ${RANDOM} % ${#picture_list[@]} ))
# display the chosen picture:
display -backdrop -window root "${picture_list[${random_number}]}"
exec openbox</literal>
EOF</userinput></screen>

      <para>
        If you like to have the numlock key set whan you start Xorg, install
        <!-- 13-12-11 numlockx not found on the KDE website. This URL is OK ? -->
        <ulink url="http://ftp.de.debian.org/debian/pool/main/n/numlockx/numlockx_1.2.orig.tar.gz">Numlockx</ulink> and
        add that to your xinitrc. Another useful application is
        <xref linkend="dbus"/>:
      </para>

<screen role="user"><userinput>cat &gt; ~/.xinitrc &lt;&lt; "EOF"
<literal>. /etc/profile
picture_list=(~/.config/backgrounds/*)
random_number=$(( ${RANDOM} % ${#picture_list[*]} ))
display -backdrop -window root "${picture_list[${random_number}]}"
numlockx
eval $(dbus-launch --auto-syntax --exit-with-session)
lxpanel &amp;
exec openbox</literal>
EOF</userinput></screen>
    </sect3>
  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          gdm-control, gnome-panel-control, obxprop, openbox, openbox-autostart,
          openbox-gnome-session, openbox-kde-session, openbox-session and
          openbox-xdg-autostart
        </seg>
        <seg>
          libobrender.so and libobt.so
        </seg>
        <seg>
          /etc/xdg/openbox, /usr/include/openbox,
          /usr/share/doc/openbox-&openbox-version; and /usr/share/themes.
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="gdm-control">
        <term><command>gdm-control</command></term>
        <listitem>
          <para>
            is a command line tool to send signals to
            <application>GDM</application>.
          </para>
          <indexterm zone="openbox gdm-control">
            <primary sortas="b-gdm-control">gdm-control</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gnome-panel-control">
        <term><command>gnome-panel-control</command></term>
        <listitem>
          <para>
            is a command line utility to invoke the <application>Gnome
            Panel</application> run dialog/menu.
          </para>
          <indexterm zone="openbox gnome-panel-control">
            <primary
            sortas="b-gnome-panel-control">gnome-panel-control</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="obxprop">
        <term><command>obxprop</command></term>
        <listitem>
          <para>
            is a tool for displaying the properties on an x window. It has a
            similar functionality to <command>xprop</command>, but allows you to
            see UTF-8 strings as text.
          </para>
          <indexterm zone="openbox obxprop">
            <primary sortas="b-obxprop">obxprop</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-prog">
        <term><command>openbox</command></term>
        <listitem>
          <para>
            is a standards compliant, highly configurable, window manager.
          </para>
          <indexterm zone="openbox openbox">
            <primary sortas="b-openbox">openbox</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-autostart">
        <term><command>openbox-autostart</command></term>
        <listitem>
          <para>
            is a script that runs commands and applications at Openbox startup.
          </para>
          <indexterm zone="openbox openbox-autostart">
            <primary sortas="b-openbox-autostart">openbox-autostart</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-xdg-autostart">
        <term><command>openbox-xdg-autostart</command></term>
        <listitem>
          <para>
            is a script that runs xdg autostart .desktop files.
          </para>
          <indexterm zone="openbox openbox-xdg-autostart">
            <primary sortas="b-openbox-xdg-autostart">openbox-xdg-autostart</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-gnome-session">
        <term><command>openbox-gnome-session</command></term>
        <listitem>
          <para>
            is a script to launch an <application>Gnome</application> session
            with <application>Openbox</application> as your window manager from
            your <filename>~/.xinitrc</filename>.
          </para>
          <indexterm zone="openbox openbox-gnome-session">
            <primary
            sortas="b-openbox-gnome-session">openbox-gnome-session</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-kde-session">
        <term><command>openbox-kde-session</command></term>
        <listitem>
          <para>
            is a script to launch an <application>KDE</application> session with
            <application>Openbox</application> as your window manager from your
            <filename>~/.xinitrc</filename>.
          </para>
          <indexterm zone="openbox openbox-kde-session">
            <primary
            sortas="b-openbox-kde-session">openbox-kde-session</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="openbox-session">
        <term><command>openbox-session</command></term>
        <listitem>
          <para>
            is a script to launch an <application>Openbox</application> session
            from your <filename>~/.xinitrc</filename>.
          </para>
          <indexterm zone="openbox openbox-session">
            <primary sortas="b-openbox-session">openbox-session</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libobrender">
        <term><filename class="libraryfile">libobrender.so</filename></term>
        <listitem>
          <para>
            contains the functions used by <application>Openbox</application>
            for theme rendering.
          </para>
          <indexterm zone="openbox libobrender">
            <primary sortas="c-libobrender">libobrender.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libobt">
        <term><filename class="libraryfile">libobt.so</filename></term>
        <listitem>
          <para>
            is the <application>Openbox</application> toolkit library.
          </para>
          <indexterm zone="openbox libobt">
            <primary sortas="c-libobt">libobt.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>
  </sect2>
</sect1>
