[9eea651] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[9eea651] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY hal-download-http "http://freedesktop.org/~david/dist/hal-&hal-version;.tar.gz">
|
---|
| 8 | <!ENTITY hal-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/hal-&hal-version;.tar.gz">
|
---|
[4ea8ecd1] | 9 | <!ENTITY hal-md5sum "a6f532770cf9286e1de38d6570cbc6bc">
|
---|
[3e5fad0] | 10 | <!ENTITY hal-size "1.5 MB">
|
---|
[4ea8ecd1] | 11 | <!ENTITY hal-buildsize "20.2 MB">
|
---|
| 12 | <!ENTITY hal-time "0.4 SBU">
|
---|
| 13 |
|
---|
| 14 | <!ENTITY hal-info-version "20070425">
|
---|
| 15 | <!ENTITY hal-info-download-http "http://freedesktop.org/~david/dist/hal-info-&hal-info-version;.tar.gz">
|
---|
| 16 | <!ENTITY hal-info-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/hal-info-&hal-info-version;.tar.gz">
|
---|
| 17 | <!ENTITY hal-info-md5sum "69022cc562aa374c603d3ff8ca33569c">
|
---|
| 18 | <!ENTITY hal-info-size "106 KB">
|
---|
[9eea651] | 19 | ]>
|
---|
| 20 |
|
---|
| 21 | <sect1 id="hal" xreflabel="HAL-&hal-version;">
|
---|
| 22 | <?dbhtml filename="hal.html"?>
|
---|
| 23 |
|
---|
| 24 | <sect1info>
|
---|
| 25 | <othername>$LastChangedBy$</othername>
|
---|
| 26 | <date>$Date$</date>
|
---|
| 27 | </sect1info>
|
---|
| 28 |
|
---|
| 29 | <title>HAL-&hal-version;</title>
|
---|
| 30 |
|
---|
| 31 | <indexterm zone="hal">
|
---|
| 32 | <primary sortas="a-HAL">HAL</primary>
|
---|
| 33 | </indexterm>
|
---|
| 34 |
|
---|
| 35 | <sect2 role="package">
|
---|
| 36 | <title>Introduction to HAL</title>
|
---|
| 37 |
|
---|
| 38 | <para><application>HAL</application> is a hardware abstraction layer, which
|
---|
| 39 | is a piece of software that provides a view of the various hardware
|
---|
| 40 | attached to a system. In addition to this, <application>HAL</application>
|
---|
| 41 | keeps detailed metadata for each piece of hardware and provides hooks such
|
---|
| 42 | that system and desktop-level software can react to changes in the hardware
|
---|
[1f93d11] | 43 | configuration in order to maintain system policy.</para>
|
---|
| 44 |
|
---|
| 45 | <para>The most important goal of <application>HAL</application> is to
|
---|
| 46 | provide plug-and-play facilities for UNIX-like desktops with focus on
|
---|
| 47 | providing a rich and extensible description of device characteristics and
|
---|
| 48 | features. One example of the functionality provided by
|
---|
| 49 | <application>HAL</application> is when you plug in a USB storage device.
|
---|
[baf47952] | 50 | <application>HAL</application> can automatically create a mount point in
|
---|
| 51 | <filename class="directory">/media</filename> and mount the device.</para>
|
---|
[9eea651] | 52 |
|
---|
| 53 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 54 | <itemizedlist spacing="compact">
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Download (HTTP): <ulink url="&hal-download-http;"/></para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Download (FTP): <ulink url="&hal-download-ftp;"/></para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>Download MD5 sum: &hal-md5sum;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>Download size: &hal-size;</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>Estimated disk space required: &hal-buildsize;</para>
|
---|
| 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>Estimated build time: &hal-time;</para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[4ea8ecd1] | 75 | <bridgehead renderas="sect3">Additional Download</bridgehead>
|
---|
| 76 | <itemizedlist spacing='compact'>
|
---|
| 77 | <title>Required Hardware Data</title>
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>Download (HTTP): <ulink url="&hal-info-download-http;"/></para>
|
---|
| 80 | </listitem>
|
---|
| 81 | <listitem>
|
---|
| 82 | <para>Download (FTP): <ulink url="&hal-info-download-ftp;"/></para>
|
---|
| 83 | </listitem>
|
---|
| 84 | <listitem>
|
---|
| 85 | <para>Download MD5 sum: &hal-info-md5sum;</para>
|
---|
| 86 | </listitem>
|
---|
| 87 | <listitem>
|
---|
| 88 | <para>Download size: &hal-info-size;</para>
|
---|
| 89 | </listitem>
|
---|
| 90 | </itemizedlist>
|
---|
| 91 |
|
---|
[9eea651] | 92 | <bridgehead renderas="sect3">HAL Dependencies</bridgehead>
|
---|
| 93 |
|
---|
| 94 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[4ea8ecd1] | 95 | <para role="required"><xref linkend="pkgconfig"/>,
|
---|
| 96 | <xref linkend="glib2"/>,
|
---|
[311ad41a] | 97 | <xref linkend="dbus"/> (see the <xref linkend="hal-requirements"/>),
|
---|
[4ea8ecd1] | 98 | <!-- FIXME: Uncomment when the dbus bindings get in the book
|
---|
| 99 | and remove the hal-requirements blurb
|
---|
| 100 | <xref linkend="dbus-glib"/>,
|
---|
| 101 | -->
|
---|
[311ad41a] | 102 | <xref linkend="python"/>, and
|
---|
[9eea651] | 103 | <xref linkend="perl-xml-parser"/></para>
|
---|
| 104 |
|
---|
| 105 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[3e5fad0] | 106 | <para role="recommended"><xref linkend="pciutils"/>
|
---|
| 107 | (with a current <filename>pci.ids</filename> file) and
|
---|
| 108 | <xref linkend="usbutils"/>
|
---|
| 109 | (with a current <filename>usb.ids</filename> file)</para>
|
---|
[9eea651] | 110 |
|
---|
[4ea8ecd1] | 111 | <bridgehead renderas="sect4">Optional (to Create Documentation)</bridgehead>
|
---|
| 112 | <para role="optional"><xref linkend="libxml2"/> and
|
---|
| 113 | <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink></para>
|
---|
| 114 |
|
---|
[9eea651] | 115 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[4ea8ecd1] | 116 | <para role="optional"><xref linkend="gtk-doc"/>
|
---|
| 117 | <ulink url="http://www.gnu.org/software/parted/index.shtml">Parted</ulink>,
|
---|
[9eea651] | 118 | <xref linkend="libusb"/>,
|
---|
[4ea8ecd1] | 119 | <ulink url="http://linux.dell.com/libsmbios/main/index.html">libsmbios</ulink>,
|
---|
| 120 | <ulink url="http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary">PolicyKit</ulink>, and
|
---|
| 121 | <xref linkend="intltool"/></para>
|
---|
[9eea651] | 122 |
|
---|
[1039de3] | 123 | <para condition="html" role="usernotes">User Notes:
|
---|
| 124 | <ulink url="&blfs-wiki;/hal"/></para>
|
---|
| 125 |
|
---|
[9eea651] | 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | <sect2 role="installation">
|
---|
| 129 | <title>Installation of HAL</title>
|
---|
| 130 |
|
---|
[1f93d11] | 131 | <para>You must create a dedicated user and group before installing the
|
---|
| 132 | package. Though the default BLFS instructions run the
|
---|
| 133 | <application>HAL</application> daemon as the
|
---|
| 134 | <systemitem class="username">root</systemitem> user, a configuration file
|
---|
| 135 | is installed which has the dedicated user's name hard-coded in it. This
|
---|
| 136 | causes a confusing message to be generated when starting the
|
---|
| 137 | <application>D-BUS</application> daemon. Issue the following commands as
|
---|
| 138 | the <systemitem class="username">root</systemitem> user:</para>
|
---|
[9eea651] | 139 |
|
---|
| 140 | <screen role="root"><userinput>groupadd -g 19 haldaemon &&
|
---|
| 141 | useradd -c "HAL Daemon User" -d /dev/null -u 19 \
|
---|
| 142 | -g haldaemon -s /bin/false haldaemon</userinput></screen>
|
---|
| 143 |
|
---|
[311ad41a] | 144 | <para>Install <application>HAL</application> by running the following
|
---|
| 145 | commands:</para>
|
---|
[9eea651] | 146 |
|
---|
[3e5fad0] | 147 | <screen><userinput>./configure --prefix=/usr \
|
---|
[9eea651] | 148 | --sysconfdir=/etc \
|
---|
[9faa2754] | 149 | --libexecdir=/usr/lib/hal \
|
---|
[3e5fad0] | 150 | --localstatedir=/var &&
|
---|
[9eea651] | 151 | make</userinput></screen>
|
---|
| 152 |
|
---|
[3e5fad0] | 153 | <para>To test the results, issue <command>make check</command>.</para>
|
---|
[9eea651] | 154 |
|
---|
| 155 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 156 |
|
---|
[4ea8ecd1] | 157 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 158 |
|
---|
| 159 | <para>Prepare the <application>HAL</application> hardware data with the
|
---|
| 160 | following commands:</para>
|
---|
| 161 |
|
---|
| 162 | <screen><userinput>tar -xf ../hal-info-&hal-info-version;.tar.gz &&
|
---|
| 163 | ./configure --prefix=/usr</userinput></screen>
|
---|
| 164 |
|
---|
| 165 | <para>Finally, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 166 |
|
---|
| 167 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[9eea651] | 168 |
|
---|
| 169 | </sect2>
|
---|
| 170 |
|
---|
| 171 | <sect2 role="commands">
|
---|
| 172 | <title>Command Explanations</title>
|
---|
| 173 |
|
---|
[9faa2754] | 174 | <para><parameter>--libexecdir=/usr/lib/hal</parameter>: This parameter
|
---|
| 175 | forces the installation of libexec files to
|
---|
| 176 | <filename class='directory'>/usr/lib/hal</filename> instead of
|
---|
[9eea651] | 177 | <filename class='directory'>/usr/libexec</filename>.</para>
|
---|
| 178 |
|
---|
| 179 | <para><parameter>--localstatedir=/var</parameter>: This parameter forces
|
---|
| 180 | the creation of the <filename>pid</filename> file to
|
---|
| 181 | <filename class='directory'>/var/run/hald</filename> instead of
|
---|
| 182 | <filename class='directory'>/usr/var/run/hald</filename>.</para>
|
---|
| 183 |
|
---|
[4ea8ecd1] | 184 | <para><parameter>--enable-docbook-docs
|
---|
| 185 | --docdir=/usr/share/doc/hal-&hal-version;</parameter>: If <xref
|
---|
| 186 | linkend="libxml2"/> and <ulink
|
---|
| 187 | url="http://cyberelk.net/tim/xmlto/">xmlto</ulink> are available, these
|
---|
| 188 | parameters enable the <application>HAL</application> specification
|
---|
| 189 | documentation to be built.</para>
|
---|
| 190 |
|
---|
[9eea651] | 191 | </sect2>
|
---|
| 192 |
|
---|
[1f93d11] | 193 | <sect2 id="hal-runtime-dependencies" xreflabel="GNOME-Python">
|
---|
| 194 | <title>Run-Time Dependencies</title>
|
---|
| 195 |
|
---|
[4ea8ecd1] | 196 | <para>A few more packages enable more functionality in
|
---|
| 197 | <application>HAL</application> at run-time. These include <ulink
|
---|
| 198 | url="http://ca.geocities.com/jefftranter@rogers.com/eject.html">Eject</ulink>,
|
---|
| 199 | <ulink url="http://people.freedesktop.org/~mccann/dist/">ConsoleKit</ulink>,
|
---|
| 200 | <ulink url="http://www.nongnu.org/dmidecode/">dmidecode</ulink>,
|
---|
| 201 | <ulink url="http://sourceware.org/dm/">Device-mapper</ulink>,
|
---|
| 202 | <ulink url="http://luks.endorphin.org/dm-crypt">Cryptsetup-LUKS</ulink>, and
|
---|
| 203 | <ulink url="http://cvsweb.freedesktop.org/pm-utils/pm-utils/">pm-utils</ulink>.</para>
|
---|
| 204 |
|
---|
[1f93d11] | 205 | <para>The <xref linkend="hal-device-manager"/> program requires several
|
---|
| 206 | additional packages to be installed before it will run. The list is
|
---|
| 207 | significant and requires a substantial commitment to install them. It is
|
---|
| 208 | left up to you to determine if the time and effort spent installing the
|
---|
| 209 | following packages is worth using the <command>hal-device-manager</command>
|
---|
| 210 | program.</para>
|
---|
| 211 |
|
---|
| 212 | <para>Though the only requirement to run the
|
---|
[6473e74] | 213 | <command>hal-device-manager</command> program is installing
|
---|
[5600683] | 214 | <ulink url="&gnome-download-http;/gnome-python/">
|
---|
[1f93d11] | 215 | GNOME-Python</ulink>, the dependency list is staggering. The following
|
---|
| 216 | list does not include the dependencies already identified in the BLFS
|
---|
| 217 | book. For example, <application>libgnome</application> already lists
|
---|
| 218 | <application>GNOME VFS</application>, <application>GConf</application>,
|
---|
| 219 | etc., so they are not repeated here. Note that some of the dependencies
|
---|
| 220 | have their own dependencies, which have their own, and so forth and so
|
---|
| 221 | on.</para>
|
---|
| 222 |
|
---|
| 223 | <itemizedlist>
|
---|
| 224 | <listitem>
|
---|
| 225 | <para><ulink
|
---|
[5600683] | 226 | url="&gnome-download-http;/gnome-python/">GNOME-Python</ulink>
|
---|
[1f93d11] | 227 | </para>
|
---|
| 228 |
|
---|
| 229 | <itemizedlist>
|
---|
| 230 | <listitem>
|
---|
| 231 | <para><ulink
|
---|
| 232 | url="http://www.pygtk.org/">PyGTK</ulink> (required)
|
---|
| 233 | </para>
|
---|
| 234 |
|
---|
| 235 | <itemizedlist>
|
---|
[0df52a4] | 236 | <listitem>
|
---|
| 237 | <para><xref linkend="libglade"/> (required)</para>
|
---|
| 238 | </listitem>
|
---|
| 239 | <listitem>
|
---|
| 240 | <para><ulink
|
---|
| 241 | url="&gnome-download-http;/pygobject/">PyGObject</ulink> (required)</para>
|
---|
| 242 | </listitem>
|
---|
[1f93d11] | 243 | <listitem>
|
---|
| 244 | <para><ulink
|
---|
| 245 | url="http://www.cairographics.org/pycairo">Pycairo</ulink> (optional)
|
---|
| 246 | </para>
|
---|
| 247 |
|
---|
[fe79617] | 248 | <!-- Removing these dependencies as they are now obsolete
|
---|
| 249 | See the pycairo docs for full details
|
---|
[1f93d11] | 250 | <itemizedlist>
|
---|
| 251 | <listitem>
|
---|
| 252 | <para><ulink
|
---|
| 253 | url="http://www.cairographics.org/snapshots/">libsvg-cairo</ulink> (optional)
|
---|
| 254 | </para>
|
---|
| 255 |
|
---|
| 256 | <itemizedlist>
|
---|
| 257 | <listitem>
|
---|
| 258 | <para><ulink
|
---|
| 259 | url="http://www.cairographics.org/snapshots/">libsvg</ulink> (required)
|
---|
| 260 | </para>
|
---|
| 261 | </listitem>
|
---|
| 262 | </itemizedlist>
|
---|
| 263 |
|
---|
| 264 | </listitem>
|
---|
| 265 | <listitem>
|
---|
| 266 | <para><ulink
|
---|
| 267 | url="http://www.pygtk.org/">PyGTK</ulink> (optional, and circular)
|
---|
| 268 | </para>
|
---|
| 269 | </listitem>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para><ulink
|
---|
| 272 | url="http://sourceforge.net/projects/numpy">Numerical Python</ulink> (optional)
|
---|
| 273 | </para>
|
---|
| 274 | </listitem>
|
---|
| 275 | </itemizedlist>
|
---|
[fe79617] | 276 | -->
|
---|
[1f93d11] | 277 |
|
---|
| 278 | </listitem>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para><ulink
|
---|
[fe79617] | 281 | url="http://sourceforge.net/projects/numpy">Old Numeric</ulink> (optional)
|
---|
[1f93d11] | 282 | </para>
|
---|
| 283 | </listitem>
|
---|
| 284 | </itemizedlist>
|
---|
| 285 |
|
---|
| 286 | </listitem>
|
---|
| 287 | <listitem>
|
---|
| 288 | <para><xref linkend="libgnomeui"/> (optional)</para>
|
---|
| 289 | </listitem>
|
---|
| 290 | <listitem>
|
---|
| 291 | <para><xref linkend="libgnome"/> (required)</para>
|
---|
| 292 | </listitem>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para><ulink
|
---|
[3e5fad0] | 295 | url="&gnome-download-http;/pyorbit/">PyORBit</ulink> (optional)
|
---|
[1f93d11] | 296 | </para>
|
---|
| 297 |
|
---|
| 298 | <itemizedlist>
|
---|
| 299 | <listitem>
|
---|
| 300 | <para><xref linkend="ORBit2"/> (required)</para>
|
---|
| 301 | </listitem>
|
---|
| 302 | </itemizedlist>
|
---|
| 303 |
|
---|
| 304 | </listitem>
|
---|
| 305 | </itemizedlist>
|
---|
| 306 |
|
---|
| 307 | </listitem>
|
---|
| 308 | </itemizedlist>
|
---|
| 309 |
|
---|
| 310 | <note>
|
---|
| 311 | <para>The dependency list is designed to start at the bottom and work
|
---|
| 312 | your way up until the last package to install is
|
---|
| 313 | <application>GNOME-Python</application>. Note that the dependencies
|
---|
| 314 | marked as <quote>required</quote> are required for the package it is
|
---|
| 315 | listed under. For example, you don't need to install
|
---|
| 316 | <application>ORBit</application> if you don't plan on installing
|
---|
| 317 | <application>PyORBit</application>. The minimum packages you could
|
---|
| 318 | install to support running <xref linkend="hal-device-manager"/> would be
|
---|
| 319 | (in this order): <xref linkend="libgnome"/>, <xref linkend="libglade"/>,
|
---|
| 320 | <ulink url="http://www.pygtk.org/">PyGTK</ulink> and <ulink
|
---|
[5600683] | 321 | url="&gnome-download-http;/gnome-python/">
|
---|
[1f93d11] | 322 | GNOME-Python</ulink>.</para>
|
---|
| 323 | </note>
|
---|
| 324 |
|
---|
| 325 | </sect2>
|
---|
| 326 |
|
---|
[9eea651] | 327 | <sect2 role="configuration">
|
---|
| 328 | <title>Configuring HAL</title>
|
---|
| 329 |
|
---|
| 330 | <sect3 id="hal-config">
|
---|
| 331 | <title>Config Files</title>
|
---|
[baf47952] | 332 | <para><filename>/etc/dbus-1/system.d/hal.conf</filename>,
|
---|
| 333 | <filename>/etc/dbus-1/system.d/halusers.conf</filename> and
|
---|
[9eea651] | 334 | <filename>/etc/hal/*</filename></para>
|
---|
| 335 |
|
---|
| 336 | <indexterm zone="hal hal-config">
|
---|
| 337 | <primary sortas="e-etc-dbus-1-system.d-hal.conf">/etc/dbus-1/system.d/hal.conf</primary>
|
---|
| 338 | </indexterm>
|
---|
| 339 |
|
---|
[baf47952] | 340 | <indexterm zone="hal hal-config">
|
---|
| 341 | <primary sortas="e-etc-dbus-1-system.d-halusers.conf">/etc/dbus-1/system.d/halusers.conf</primary>
|
---|
| 342 | </indexterm>
|
---|
| 343 |
|
---|
[9eea651] | 344 | <indexterm zone="hal hal-config">
|
---|
| 345 | <primary sortas="e-etc-hal-star">/etc/hal/*</primary>
|
---|
| 346 | </indexterm>
|
---|
| 347 | </sect3>
|
---|
| 348 |
|
---|
[baf47952] | 349 | <sect3><title>Configuration Information</title>
|
---|
| 350 |
|
---|
| 351 | <para>The default setup for <application>HAL</application> is to allow
|
---|
| 352 | only certain users to invoke methods such as Mount(). These are
|
---|
| 353 | the <systemitem class="username">root</systemitem> user and the user
|
---|
| 354 | determined to be at the active console using <ulink
|
---|
| 355 | url="&blfs-wiki;/linux-pam">pam_console</ulink>. If you are not set
|
---|
| 356 | up to use <xref linkend="linux-pam"/> and <ulink
|
---|
| 357 | url="&blfs-wiki;/linux-pam">pam_console</ulink>, create a group that
|
---|
| 358 | is allowed to invoke <application>HAL</application> methods with the
|
---|
| 359 | following commands:</para>
|
---|
| 360 |
|
---|
| 361 | <screen role="root"><userinput>groupadd -g 61 halusers &&
|
---|
| 362 | cat > /etc/dbus-1/system.d/halusers.conf << "EOF"
|
---|
| 363 | <literal><!DOCTYPE busconfig PUBLIC
|
---|
| 364 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
---|
| 365 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
---|
| 366 | <busconfig>
|
---|
| 367 |
|
---|
[9a003fe1] | 368 | <!-- Allow users in the halusers group invoke HAL methods -->
|
---|
| 369 | <policy group="halusers">
|
---|
| 370 | <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
|
---|
| 371 | <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
|
---|
| 372 | <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
|
---|
| 373 | <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
|
---|
| 374 | </policy>
|
---|
[baf47952] | 375 |
|
---|
| 376 | </busconfig></literal>
|
---|
| 377 | EOF</userinput></screen>
|
---|
| 378 |
|
---|
| 379 | <para>Now add the users you would like to the <systemitem
|
---|
| 380 | class="groupname">halusers</systemitem> group to use
|
---|
| 381 | <application>HAL</application>. Note that these users still need
|
---|
| 382 | to have appropriate permissions to access the devices that
|
---|
| 383 | <application>HAL</application> will invoke its methods on.</para>
|
---|
| 384 |
|
---|
[befd6fb] | 385 | <para>With the above configuration in place, authorized users now
|
---|
| 386 | have the ability to unmount disk partitions mounted at non-standard
|
---|
| 387 | locations such as <filename class='directory'>/pub</filename>. If
|
---|
| 388 | you'd like to restrict this policy to only drives which are considered
|
---|
| 389 | removable or hotpluggable, add the following configuration file as
|
---|
| 390 | the <systemitem class='username'>root</systemitem> user:</para>
|
---|
| 391 |
|
---|
| 392 | <screen role="root"><userinput>cat > /etc/hal/fdi/policy/no-fixed-drives.fdi << "EOF"
|
---|
| 393 | <literal><?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
|
---|
| 394 |
|
---|
| 395 | <!-- Don't allow HAL methods on disks that are not
|
---|
| 396 | removable or hotpluggable -->
|
---|
| 397 |
|
---|
| 398 | <deviceinfo version="0.2">
|
---|
| 399 | <device>
|
---|
| 400 | <match key="@block.storage_device:storage.hotpluggable" bool="false">
|
---|
| 401 | <match key="@block.storage_device:storage.removable" bool="false">
|
---|
| 402 | <merge key="volume.ignore" type="bool">true</merge>
|
---|
| 403 | </match>
|
---|
| 404 | </match>
|
---|
| 405 | </device>
|
---|
| 406 | </deviceinfo></literal>
|
---|
| 407 | EOF</userinput></screen>
|
---|
| 408 |
|
---|
[baf47952] | 409 | <para><application>HAL</application> only provides the methods such
|
---|
| 410 | as Mount() to act on hardware. In order to take advantage of these,
|
---|
| 411 | a <application>HAL</application> event handler such as
|
---|
| 412 | <xref linkend="gnome-volume-manager"/> or <ulink
|
---|
| 413 | url="http://ivman.sourceforge.net/">Ivman</ulink> should be
|
---|
| 414 | installed.</para>
|
---|
| 415 |
|
---|
| 416 | <!-- Following note is only relevant for HAL-0.5.7.x.
|
---|
| 417 | Fixed upstream. -->
|
---|
| 418 | <note>
|
---|
| 419 | <para><application>HAL</application> will ignore any devices listed
|
---|
| 420 | in <filename>/etc/fstab</filename> for the purpose of automounting.
|
---|
| 421 | You must remove any listings for devices that you would like
|
---|
| 422 | automounted such as CD-ROMs or USB keys.</para>
|
---|
| 423 | </note>
|
---|
| 424 |
|
---|
[3e5fad0] | 425 | <!-- This section commented out for now until it is determined what should
|
---|
| 426 | be placed in this section
|
---|
| 427 |
|
---|
[baf47952] | 428 | FIXME: I think this information is still relevant with the
|
---|
| 429 | exception of its interaction with /etc/fstab. Needs investigation.
|
---|
[9eea651] | 430 |
|
---|
[1f93d11] | 431 | <para>No configuration is necessary for the majority of installations
|
---|
| 432 | on systems configured with ISO-8859-1 compatible locales. The defaults
|
---|
| 433 | should work just fine. For some installations, tweaking of the various
|
---|
| 434 | policies may be required. One such configuration change necessary in some
|
---|
| 435 | locales is identifying the <option>iocharset</option> and
|
---|
| 436 | <option>codepage</option> variables in the
|
---|
| 437 | <filename>/etc/fstab</filename> entries created by the
|
---|
| 438 | <command>fstab-sync</command> program. If changes are required to the
|
---|
| 439 | configuration so that your locale is properly identified in the entries
|
---|
| 440 | created in <filename>/etc/fstab</filename>, issue the following commands
|
---|
| 441 | as the <systemitem class="username">root</systemitem> user (you must
|
---|
[1039de3] | 442 | substitute the proper data for the
|
---|
| 443 | <replaceable><iocharset></replaceable> and
|
---|
| 444 | <replaceable><codepage></replaceable> info):</para>
|
---|
[1f93d11] | 445 |
|
---|
| 446 | <screen role="root"><userinput>install -v -m755 -d /etc/hal/fdi/policy/30user &&
|
---|
| 447 | cat > /etc/hal/fdi/policy/30user/30user-policy.fdi << "EOF"
|
---|
[3e5fad0] | 448 | <literal><?xml version="1.0" encoding="UTF-8"?> <!- -*- SGML -*- ->
|
---|
[1f93d11] | 449 |
|
---|
[3e5fad0] | 450 | <!-
|
---|
[1f93d11] | 451 | This file is used to set custom options to the HAL policy settings.
|
---|
| 452 | The default policy settings are defined in files contained in the
|
---|
| 453 | /usr/share/hal/fdi/policy directories. User defined customizations
|
---|
| 454 | should be in files contained in the /etc/hal/fdi/policy directories.
|
---|
[3e5fad0] | 455 | ->
|
---|
[1f93d11] | 456 |
|
---|
| 457 | <deviceinfo version="0.2">
|
---|
| 458 |
|
---|
| 459 | <device>
|
---|
[75da594d] | 460 | <match key="info.udi"
|
---|
[1f93d11] | 461 | string="/org/freedesktop/Hal/devices/computer">
|
---|
| 462 |
|
---|
[3e5fad0] | 463 | <!- Set the iocharset variable in the /etc/fstab file entry ->
|
---|
[75da594d] | 464 | <merge
|
---|
[1039de3] | 465 | key="storage.policy.default.mount_option.iocharset=<replaceable><iocharset></replaceable>"
|
---|
[1f93d11] | 466 | type="bool">true</merge>
|
---|
| 467 |
|
---|
[3e5fad0] | 468 | <!- Set the codepage variable in the /etc/fstab file entry ->
|
---|
[75da594d] | 469 | <merge
|
---|
[1039de3] | 470 | key="storage.policy.default.mount_option.codepage=<replaceable><codepage></replaceable>"
|
---|
[1f93d11] | 471 | type="bool">true</merge>
|
---|
| 472 |
|
---|
| 473 | </match>
|
---|
| 474 | </device>
|
---|
| 475 |
|
---|
| 476 | </deviceinfo></literal>
|
---|
| 477 |
|
---|
| 478 | EOF</userinput></screen>
|
---|
| 479 |
|
---|
| 480 | <note>
|
---|
| 481 | <para>The previous commands created a file named
|
---|
| 482 | <filename>/etc/hal/fdi/policy/30user/30user-policy.fdi</filename>. To
|
---|
| 483 | ease readability of the file, put everything between the
|
---|
| 484 | <angle brackets> and <merge></merge> tags on one
|
---|
| 485 | line. You must have at least one space character
|
---|
[75da594d] | 486 | where the ends of the lines were. The file would then look like this
|
---|
| 487 | (trimmed at the top and bottom for brevity):</para>
|
---|
[1f93d11] | 488 |
|
---|
| 489 | <screen><literal> <device>
|
---|
[1039de3] | 490 | <match key="<replaceable><text></replaceable>" string="<replaceable><text></replaceable>">
|
---|
[1f93d11] | 491 |
|
---|
[3e5fad0] | 492 | <!- Set the iocharset variable in the /etc/fstab file entry ->
|
---|
[1039de3] | 493 | <merge key="<replaceable><iocharset text></replaceable>" type="bool">true</merge>
|
---|
[1f93d11] | 494 |
|
---|
[3e5fad0] | 495 | <!- Set the codepage variable in the /etc/fstab file entry ->
|
---|
[1039de3] | 496 | <merge key="<replaceable><codepage text></replaceable>" type="bool">true</merge>
|
---|
[1f93d11] | 497 |
|
---|
| 498 | </match>
|
---|
| 499 | </device></literal></screen>
|
---|
| 500 |
|
---|
| 501 | </note>
|
---|
[9eea651] | 502 |
|
---|
[3e5fad0] | 503 | -->
|
---|
| 504 |
|
---|
[baf47952] | 505 | </sect3>
|
---|
| 506 |
|
---|
[9eea651] | 507 | <sect3 id="hal-init">
|
---|
| 508 | <title>Boot Script</title>
|
---|
| 509 |
|
---|
| 510 | <para>To automatically start the <command>hald</command> daemon
|
---|
| 511 | when the system is rebooted, install the
|
---|
| 512 | <filename>/etc/rc.d/init.d/haldaemon</filename>
|
---|
| 513 | bootscript from the
|
---|
[5254d12] | 514 | <xref linkend="bootscripts"/> package.</para>
|
---|
[9eea651] | 515 |
|
---|
| 516 | <indexterm zone="hal hal-init">
|
---|
| 517 | <primary sortas="f-haldaemon">haldaemon</primary>
|
---|
| 518 | </indexterm>
|
---|
| 519 |
|
---|
[3e5fad0] | 520 | <!-- Not sure if this is still required any longer as the HAL daemon
|
---|
| 521 | used to hang if you didn't first restart the DBUS daemon. This is
|
---|
| 522 | not the case any longer, but it still seems that D-Bus should be
|
---|
| 523 | restarted, as the hald.conf file is read by the D-BUS daemon.
|
---|
| 524 | Leaving it in for now until it is positively confirmed it is not
|
---|
| 525 | required. -->
|
---|
| 526 |
|
---|
[1f93d11] | 527 | <important>
|
---|
[9faa2754] | 528 | <para>If the system-wide <application>D-BUS</application> daemon was
|
---|
| 529 | running during the installation of <application>HAL</application>,
|
---|
| 530 | ensure you stop and restart the <application>D-BUS</application>
|
---|
| 531 | daemon before attempting to start the <command>hald</command>
|
---|
| 532 | daemon.</para>
|
---|
[1f93d11] | 533 | </important>
|
---|
[9faa2754] | 534 |
|
---|
[9eea651] | 535 | <screen role="root"><userinput>make install-haldaemon</userinput></screen>
|
---|
| 536 |
|
---|
| 537 | </sect3>
|
---|
| 538 |
|
---|
| 539 | </sect2>
|
---|
| 540 |
|
---|
| 541 | <sect2 role="content">
|
---|
| 542 | <title>Contents</title>
|
---|
| 543 |
|
---|
| 544 | <segmentedlist>
|
---|
| 545 | <segtitle>Installed Programs</segtitle>
|
---|
| 546 | <segtitle>Installed Libraries</segtitle>
|
---|
| 547 | <segtitle>Installed Directories</segtitle>
|
---|
| 548 |
|
---|
| 549 | <seglistitem>
|
---|
[4ea8ecd1] | 550 | <seg>hal-device, hal-device-manager, hal-disable-polling,
|
---|
[9eea651] | 551 | hal-find-by-capability, hal-find-by-property, hal-get-property,
|
---|
[4ea8ecd1] | 552 | hal-set-property, hal-is-caller-locked-out, hal-lock, hald and
|
---|
| 553 | lshal</seg>
|
---|
[1039de3] | 554 | <seg>libhal.{so,a} and libhal-storage,{so,a}</seg>
|
---|
[9faa2754] | 555 | <seg>/etc/hal, /usr/include/hal, /usr/lib/hal,
|
---|
[4ea8ecd1] | 556 | /usr/share/doc/hal-&hal-version;, /usr/share/hal, /var/cache/hald,
|
---|
| 557 | /var/lib/hal, and /var/run/hald</seg>
|
---|
[9eea651] | 558 | </seglistitem>
|
---|
| 559 | </segmentedlist>
|
---|
| 560 |
|
---|
| 561 | <variablelist>
|
---|
| 562 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 563 | <?dbfo list-presentation="list"?>
|
---|
| 564 | <?dbhtml list-presentation="table"?>
|
---|
| 565 |
|
---|
| 566 | <varlistentry id="hal-device">
|
---|
| 567 | <term><command>hal-device</command></term>
|
---|
| 568 | <listitem>
|
---|
| 569 | <para>is used to create, remove or show a
|
---|
| 570 | <application>HAL</application> device.</para>
|
---|
| 571 | <indexterm zone="hal hal-device">
|
---|
| 572 | <primary sortas="b-hal-device">hal-device</primary>
|
---|
| 573 | </indexterm>
|
---|
| 574 | </listitem>
|
---|
| 575 | </varlistentry>
|
---|
| 576 |
|
---|
| 577 | <varlistentry id="hal-device-manager">
|
---|
| 578 | <term><command>hal-device-manager</command></term>
|
---|
| 579 | <listitem>
|
---|
[06be400] | 580 | <para>shows a graphical representation of all the devices
|
---|
[9eea651] | 581 | <application>HAL</application> is aware of. This program requires
|
---|
[1f93d11] | 582 | <xref linkend="hal-runtime-dependencies"/>. Here is a <ulink
|
---|
| 583 | url="http://cvs.freedesktop.org/*checkout*/hal/hal/doc/spec/hal-devices1.png">
|
---|
| 584 | screenshot</ulink> of <command>hal-device-manager</command>
|
---|
| 585 | communicating with the HAL daemon and displaying a tree of device
|
---|
| 586 | objects. The shown properties in the screenshot are for a device
|
---|
| 587 | object representing a hard disk.</para>
|
---|
[9eea651] | 588 | <indexterm zone="hal hal-device-manager">
|
---|
| 589 | <primary sortas="b-hal-device-manager">hal-device-manager</primary>
|
---|
| 590 | </indexterm>
|
---|
| 591 | </listitem>
|
---|
| 592 | </varlistentry>
|
---|
| 593 |
|
---|
[4ea8ecd1] | 594 | <varlistentry id="hal-disable-polling">
|
---|
| 595 | <term><command>hal-disable-polling</command></term>
|
---|
| 596 | <listitem>
|
---|
| 597 | <para>can be used to to disable and enable media detection on
|
---|
| 598 | drives with removable storage.</para>
|
---|
| 599 | <indexterm zone="hal hal-disable-polling">
|
---|
| 600 | <primary sortas="b-hal-disable-polling">hal-disable-polling</primary>
|
---|
| 601 | </indexterm>
|
---|
| 602 | </listitem>
|
---|
| 603 | </varlistentry>
|
---|
| 604 |
|
---|
[9eea651] | 605 | <varlistentry id="hal-find-by-capability">
|
---|
| 606 | <term><command>hal-find-by-capability</command></term>
|
---|
| 607 | <listitem>
|
---|
| 608 | <para>prints the Unique Device Identifiers for
|
---|
| 609 | <application>HAL</application> device objects of a given
|
---|
| 610 | capability.</para>
|
---|
| 611 | <indexterm zone="hal hal-find-by-capability">
|
---|
[b8dba81] | 612 | <primary sortas="b-hal-find-by-capability">hal-find-by-capability</primary>
|
---|
[9eea651] | 613 | </indexterm>
|
---|
| 614 | </listitem>
|
---|
| 615 | </varlistentry>
|
---|
| 616 |
|
---|
| 617 | <varlistentry id="hal-find-by-property">
|
---|
| 618 | <term><command>hal-find-by-property</command></term>
|
---|
| 619 | <listitem>
|
---|
| 620 | <para>prints the Unique Device Identifiers for
|
---|
| 621 | <application>HAL</application> device objects where a given property
|
---|
| 622 | assumes a given value.</para>
|
---|
| 623 | <indexterm zone="hal hal-find-by-property">
|
---|
| 624 | <primary sortas="b-hal-find-by-property">hal-find-by-property</primary>
|
---|
| 625 | </indexterm>
|
---|
| 626 | </listitem>
|
---|
| 627 | </varlistentry>
|
---|
| 628 |
|
---|
| 629 | <varlistentry id="hal-get-property">
|
---|
| 630 | <term><command>hal-get-property</command></term>
|
---|
| 631 | <listitem>
|
---|
| 632 | <para>retrieves a property from a device.</para>
|
---|
| 633 | <indexterm zone="hal hal-get-property">
|
---|
| 634 | <primary sortas="b-hal-get-property">hal-get-property</primary>
|
---|
| 635 | </indexterm>
|
---|
| 636 | </listitem>
|
---|
| 637 | </varlistentry>
|
---|
| 638 |
|
---|
| 639 | <varlistentry id="hal-set-property">
|
---|
| 640 | <term><command>hal-set-property</command></term>
|
---|
| 641 | <listitem>
|
---|
| 642 | <para>attempts to set property for a device. Note that, due to
|
---|
| 643 | security considerations, it may not be possible to set a
|
---|
| 644 | property.</para>
|
---|
| 645 | <indexterm zone="hal hal-set-property">
|
---|
| 646 | <primary sortas="b-hal-set-property">hal-set-property</primary>
|
---|
| 647 | </indexterm>
|
---|
| 648 | </listitem>
|
---|
| 649 | </varlistentry>
|
---|
| 650 |
|
---|
[4ea8ecd1] | 651 | <varlistentry id="hal-is-caller-locked-out">
|
---|
| 652 | <term><command>hal-is-caller-locked-out</command></term>
|
---|
| 653 | <listitem>
|
---|
| 654 | <para>determines if a specific caller is locked out of a specific
|
---|
| 655 | <application>D-Bus</application> interface on a specific device.</para>
|
---|
| 656 | <indexterm zone="hal hal-is-caller-locked-out">
|
---|
| 657 | <primary sortas="b-hal-is-caller-locked-out">hal-is-caller-locked-out</primary>
|
---|
| 658 | </indexterm>
|
---|
| 659 | </listitem>
|
---|
| 660 | </varlistentry>
|
---|
| 661 |
|
---|
[9eea651] | 662 | <varlistentry id="hald">
|
---|
| 663 | <term><command>hald</command></term>
|
---|
| 664 | <listitem>
|
---|
| 665 | <para>is the <application>HAL</application> daemon program.</para>
|
---|
| 666 | <indexterm zone="hal hald">
|
---|
| 667 | <primary sortas="b-hald">hald</primary>
|
---|
| 668 | </indexterm>
|
---|
| 669 | </listitem>
|
---|
| 670 | </varlistentry>
|
---|
| 671 |
|
---|
| 672 | <varlistentry id="lshal">
|
---|
| 673 | <term><command>lshal</command></term>
|
---|
| 674 | <listitem>
|
---|
| 675 | <para>shows all devices and their properties. If the --monitor option
|
---|
| 676 | is given then the device list and all devices are monitored for
|
---|
| 677 | changes.</para>
|
---|
| 678 | <indexterm zone="hal lshal">
|
---|
| 679 | <primary sortas="b-lshal">lshal</primary>
|
---|
| 680 | </indexterm>
|
---|
| 681 | </listitem>
|
---|
| 682 | </varlistentry>
|
---|
| 683 |
|
---|
| 684 | <varlistentry id="libhal">
|
---|
[1039de3] | 685 | <term><filename class='libraryfile'>libhal.{so,a}</filename></term>
|
---|
[9eea651] | 686 | <listitem>
|
---|
| 687 | <para>contains the API functions required by the
|
---|
| 688 | <application>HAL</application> programs.</para>
|
---|
| 689 | <indexterm zone="hal libhal">
|
---|
[1039de3] | 690 | <primary sortas="c-libhal">libhal.{so,a}</primary>
|
---|
[9eea651] | 691 | </indexterm>
|
---|
| 692 | </listitem>
|
---|
| 693 | </varlistentry>
|
---|
| 694 |
|
---|
| 695 | <varlistentry id="libhal-storage">
|
---|
[1039de3] | 696 | <term><filename class='libraryfile'>libhal-storage.{so,a}</filename></term>
|
---|
[9eea651] | 697 | <listitem>
|
---|
| 698 | <para>contains the API functions required by the
|
---|
| 699 | <application>HAL</application> storage and volume utility
|
---|
| 700 | programs.</para>
|
---|
| 701 | <indexterm zone="hal libhal-storage">
|
---|
[1039de3] | 702 | <primary sortas="c-libhal-storage">libhal-storage.{so,a}</primary>
|
---|
[9eea651] | 703 | </indexterm>
|
---|
| 704 | </listitem>
|
---|
| 705 | </varlistentry>
|
---|
| 706 |
|
---|
| 707 | </variablelist>
|
---|
| 708 |
|
---|
| 709 | </sect2>
|
---|
| 710 |
|
---|
| 711 | </sect1>
|
---|