[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 |
|
---|
[c1d34d6c] | 7 | <!ENTITY hal-download-http "http://hal.freedesktop.org/releases/hal-&hal-version;.tar.bz2">
|
---|
[d0bf291] | 8 | <!ENTITY hal-download-ftp " ">
|
---|
[c1d34d6c] | 9 | <!ENTITY hal-md5sum "c627d8fb0f9afff94f3c687b5216bc06">
|
---|
| 10 | <!ENTITY hal-size "924 KB">
|
---|
[6c3d95f9] | 11 | <!ENTITY hal-buildsize "25 MB">
|
---|
| 12 | <!ENTITY hal-time "0.5 SBU">
|
---|
[d0bf291] | 13 |
|
---|
[6c3d95f9] | 14 | <!ENTITY hal-info-version "20091130">
|
---|
[c1d34d6c] | 15 | <!ENTITY hal-info-download-http "http://hal.freedesktop.org/releases/hal-info-&hal-info-version;.tar.bz2">
|
---|
[d0bf291] | 16 | <!ENTITY hal-info-download-ftp " ">
|
---|
[c1d34d6c] | 17 | <!ENTITY hal-info-md5sum "995b8d2dbfb0646b07c92bb8d23cbcf1">
|
---|
| 18 | <!ENTITY hal-info-size "108 KB">
|
---|
[9eea651] | 19 | ]>
|
---|
| 20 |
|
---|
| 21 | <sect1 id="hal" xreflabel="HAL-&hal-version;">
|
---|
| 22 | <?dbhtml filename="hal.html"?>
|
---|
| 23 |
|
---|
| 24 | <sect1info>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
| 28 | <title>HAL-&hal-version;</title>
|
---|
| 29 |
|
---|
| 30 | <indexterm zone="hal">
|
---|
| 31 | <primary sortas="a-HAL">HAL</primary>
|
---|
| 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
| 35 | <title>Introduction to HAL</title>
|
---|
| 36 |
|
---|
| 37 | <para><application>HAL</application> is a hardware abstraction layer, which
|
---|
| 38 | is a piece of software that provides a view of the various hardware
|
---|
| 39 | attached to a system. In addition to this, <application>HAL</application>
|
---|
| 40 | keeps detailed metadata for each piece of hardware and provides hooks such
|
---|
| 41 | that system and desktop-level software can react to changes in the hardware
|
---|
[1f93d11] | 42 | configuration in order to maintain system policy.</para>
|
---|
| 43 |
|
---|
| 44 | <para>The most important goal of <application>HAL</application> is to
|
---|
| 45 | provide plug-and-play facilities for UNIX-like desktops with focus on
|
---|
| 46 | providing a rich and extensible description of device characteristics and
|
---|
| 47 | features. One example of the functionality provided by
|
---|
| 48 | <application>HAL</application> is when you plug in a USB storage device.
|
---|
[baf47952] | 49 | <application>HAL</application> can automatically create a mount point in
|
---|
| 50 | <filename class="directory">/media</filename> and mount the device.</para>
|
---|
[9eea651] | 51 |
|
---|
| 52 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 53 | <itemizedlist spacing="compact">
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download (HTTP): <ulink url="&hal-download-http;"/></para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download (FTP): <ulink url="&hal-download-ftp;"/></para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download MD5 sum: &hal-md5sum;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Download size: &hal-size;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Estimated disk space required: &hal-buildsize;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>Estimated build time: &hal-time;</para>
|
---|
| 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
[d0bf291] | 74 | <bridgehead renderas="sect3">Additional Package Download</bridgehead>
|
---|
[4ea8ecd1] | 75 | <itemizedlist spacing='compact'>
|
---|
| 76 | <title>Required Hardware Data</title>
|
---|
| 77 | <listitem>
|
---|
| 78 | <para>Download (HTTP): <ulink url="&hal-info-download-http;"/></para>
|
---|
| 79 | </listitem>
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>Download (FTP): <ulink url="&hal-info-download-ftp;"/></para>
|
---|
| 82 | </listitem>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>Download MD5 sum: &hal-info-md5sum;</para>
|
---|
| 85 | </listitem>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>Download size: &hal-info-size;</para>
|
---|
| 88 | </listitem>
|
---|
| 89 | </itemizedlist>
|
---|
| 90 |
|
---|
[9eea651] | 91 | <bridgehead renderas="sect3">HAL Dependencies</bridgehead>
|
---|
| 92 |
|
---|
| 93 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[6c3d95f9] | 94 | <para role="required"><xref linkend="dbus-glib"/></para>
|
---|
[9eea651] | 95 |
|
---|
| 96 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[3e5fad0] | 97 | <para role="recommended"><xref linkend="pciutils"/>
|
---|
| 98 | (with a current <filename>pci.ids</filename> file) and
|
---|
| 99 | <xref linkend="usbutils"/>
|
---|
| 100 | (with a current <filename>usb.ids</filename> file)</para>
|
---|
[9eea651] | 101 |
|
---|
[4ea8ecd1] | 102 | <bridgehead renderas="sect4">Optional (to Create Documentation)</bridgehead>
|
---|
[6129b81] | 103 | <para role="optional"><xref linkend="xmlto"/></para>
|
---|
[4ea8ecd1] | 104 |
|
---|
[9eea651] | 105 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[dc66411] | 106 | <para role="optional"><xref linkend="gtk-doc"/>,
|
---|
[6c3d95f9] | 107 | <xref linkend="acl"/>,
|
---|
| 108 | <xref linkend="gperf"/>,
|
---|
[6dfcdd0a] | 109 | <ulink url="http://www.freedesktop.org/wiki/Software/PolicyKit">PolicyKit</ulink>,
|
---|
[6c3d95f9] | 110 | <xref linkend="consolekit"/>,
|
---|
| 111 | <xref linkend="intltool"/>,
|
---|
[2875f488] | 112 | <xref linkend="parted"/>, and
|
---|
[6c3d95f9] | 113 | <ulink url="https://fedorahosted.org/libsmbios/">libsmbios</ulink></para>
|
---|
[d0bf291] | 114 |
|
---|
[1039de3] | 115 | <para condition="html" role="usernotes">User Notes:
|
---|
| 116 | <ulink url="&blfs-wiki;/hal"/></para>
|
---|
| 117 |
|
---|
[9eea651] | 118 | </sect2>
|
---|
| 119 |
|
---|
| 120 | <sect2 role="installation">
|
---|
| 121 | <title>Installation of HAL</title>
|
---|
| 122 |
|
---|
[1f93d11] | 123 | <para>You must create a dedicated user and group before installing the
|
---|
| 124 | package. Though the default BLFS instructions run the
|
---|
| 125 | <application>HAL</application> daemon as the
|
---|
| 126 | <systemitem class="username">root</systemitem> user, a configuration file
|
---|
| 127 | is installed which has the dedicated user's name hard-coded in it. This
|
---|
| 128 | causes a confusing message to be generated when starting the
|
---|
| 129 | <application>D-BUS</application> daemon. Issue the following commands as
|
---|
| 130 | the <systemitem class="username">root</systemitem> user:</para>
|
---|
[9eea651] | 131 |
|
---|
[9624412] | 132 | <screen role="root"><userinput>groupadd -fg 19 haldaemon &&
|
---|
[9eea651] | 133 | useradd -c "HAL Daemon User" -d /dev/null -u 19 \
|
---|
[9624412] | 134 | -g haldaemon -s /bin/false haldaemon || [ $? == 9 ]</userinput></screen>
|
---|
[9eea651] | 135 |
|
---|
[311ad41a] | 136 | <para>Install <application>HAL</application> by running the following
|
---|
| 137 | commands:</para>
|
---|
[9eea651] | 138 |
|
---|
[3e5fad0] | 139 | <screen><userinput>./configure --prefix=/usr \
|
---|
[9eea651] | 140 | --sysconfdir=/etc \
|
---|
[9faa2754] | 141 | --libexecdir=/usr/lib/hal \
|
---|
[6c3d95f9] | 142 | --localstatedir=/var \
|
---|
[f0211af2] | 143 | --docdir=/usr/share/doc/hal-&hal-version; \
|
---|
[9624412] | 144 | --enable-policy-kit=no &&
|
---|
[9eea651] | 145 | make</userinput></screen>
|
---|
| 146 |
|
---|
[9327a61] | 147 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
[9eea651] | 148 |
|
---|
| 149 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 150 |
|
---|
[4ea8ecd1] | 151 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 152 |
|
---|
[d0bf291] | 153 | <para>Install the <application>HAL</application> hardware data with the
|
---|
[4ea8ecd1] | 154 | following commands:</para>
|
---|
| 155 |
|
---|
[3fe7a39f] | 156 | <screen><userinput>tar -xf ../hal-info-&hal-info-version;.tar.bz2 &&
|
---|
[0fed2183] | 157 | cd hal-info-&hal-info-version; &&
|
---|
[6c3d95f9] | 158 | ./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
|
---|
[4ea8ecd1] | 159 |
|
---|
[6c3d95f9] | 160 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[4ea8ecd1] | 161 |
|
---|
| 162 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[9eea651] | 163 |
|
---|
| 164 | </sect2>
|
---|
| 165 |
|
---|
| 166 | <sect2 role="commands">
|
---|
| 167 | <title>Command Explanations</title>
|
---|
| 168 |
|
---|
[9faa2754] | 169 | <para><parameter>--libexecdir=/usr/lib/hal</parameter>: This parameter
|
---|
| 170 | forces the installation of libexec files to
|
---|
| 171 | <filename class='directory'>/usr/lib/hal</filename> instead of
|
---|
[9eea651] | 172 | <filename class='directory'>/usr/libexec</filename>.</para>
|
---|
| 173 |
|
---|
| 174 | <para><parameter>--localstatedir=/var</parameter>: This parameter forces
|
---|
| 175 | the creation of the <filename>pid</filename> file to
|
---|
| 176 | <filename class='directory'>/var/run/hald</filename> instead of
|
---|
| 177 | <filename class='directory'>/usr/var/run/hald</filename>.</para>
|
---|
| 178 |
|
---|
[9624412] | 179 | <para><parameter>--enable-policy-kit=no</parameter>: This parameter is
|
---|
[f0211af2] | 180 | required if PolicyKit is not installed. Remove it if PolicyKit is
|
---|
| 181 | installed.</para>
|
---|
| 182 |
|
---|
[4ea8ecd1] | 183 | <para><parameter>--enable-docbook-docs
|
---|
| 184 | --docdir=/usr/share/doc/hal-&hal-version;</parameter>: If <xref
|
---|
[6129b81] | 185 | linkend="xmlto"/> is available, these parameters enable the
|
---|
| 186 | <application>HAL</application> specification documentation to be
|
---|
| 187 | built.</para>
|
---|
[4ea8ecd1] | 188 |
|
---|
[9eea651] | 189 | </sect2>
|
---|
| 190 |
|
---|
[73f235b] | 191 | <sect2>
|
---|
[1f93d11] | 192 | <title>Run-Time Dependencies</title>
|
---|
| 193 |
|
---|
[4ea8ecd1] | 194 | <para>A few more packages enable more functionality in
|
---|
[6b3a2011] | 195 | <application>HAL</application> at run-time.
|
---|
| 196 | These include <xref linkend="eject"/>, <ulink
|
---|
| 197 | url="http://www.nongnu.org/dmidecode/">dmidecode</ulink>,
|
---|
[8bc3edae] | 198 | <xref linkend="lvm2"/> (device-mapper),
|
---|
[4ea8ecd1] | 199 | <ulink url="http://luks.endorphin.org/dm-crypt">Cryptsetup-LUKS</ulink>, and
|
---|
[af73862c] | 200 | <ulink url="http://pm-utils.freedesktop.org/wiki/">pm-utils</ulink>.</para>
|
---|
[4ea8ecd1] | 201 |
|
---|
[1f93d11] | 202 | </sect2>
|
---|
| 203 |
|
---|
[9eea651] | 204 | <sect2 role="configuration">
|
---|
| 205 | <title>Configuring HAL</title>
|
---|
| 206 |
|
---|
| 207 | <sect3 id="hal-config">
|
---|
| 208 | <title>Config Files</title>
|
---|
[baf47952] | 209 | <para><filename>/etc/dbus-1/system.d/hal.conf</filename>,
|
---|
| 210 | <filename>/etc/dbus-1/system.d/halusers.conf</filename> and
|
---|
[9eea651] | 211 | <filename>/etc/hal/*</filename></para>
|
---|
| 212 |
|
---|
| 213 | <indexterm zone="hal hal-config">
|
---|
| 214 | <primary sortas="e-etc-dbus-1-system.d-hal.conf">/etc/dbus-1/system.d/hal.conf</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 |
|
---|
[baf47952] | 217 | <indexterm zone="hal hal-config">
|
---|
| 218 | <primary sortas="e-etc-dbus-1-system.d-halusers.conf">/etc/dbus-1/system.d/halusers.conf</primary>
|
---|
| 219 | </indexterm>
|
---|
| 220 |
|
---|
[9eea651] | 221 | <indexterm zone="hal hal-config">
|
---|
| 222 | <primary sortas="e-etc-hal-star">/etc/hal/*</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </sect3>
|
---|
| 225 |
|
---|
[baf47952] | 226 | <sect3><title>Configuration Information</title>
|
---|
[3496df9] | 227 | <sect4><title>Allowing users to invoke HAL methods</title>
|
---|
[baf47952] | 228 |
|
---|
| 229 | <para>The default setup for <application>HAL</application> is to allow
|
---|
| 230 | only certain users to invoke methods such as Mount(). These are
|
---|
| 231 | the <systemitem class="username">root</systemitem> user and the user
|
---|
| 232 | determined to be at the active console using <ulink
|
---|
| 233 | url="&blfs-wiki;/linux-pam">pam_console</ulink>. If you are not set
|
---|
| 234 | up to use <xref linkend="linux-pam"/> and <ulink
|
---|
| 235 | url="&blfs-wiki;/linux-pam">pam_console</ulink>, create a group that
|
---|
| 236 | is allowed to invoke <application>HAL</application> methods with the
|
---|
| 237 | following commands:</para>
|
---|
| 238 |
|
---|
[9624412] | 239 | <screen role="root"><userinput>groupadd -fg 61 halusers &&
|
---|
[baf47952] | 240 | cat > /etc/dbus-1/system.d/halusers.conf << "EOF"
|
---|
| 241 | <literal><!DOCTYPE busconfig PUBLIC
|
---|
| 242 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
---|
| 243 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
---|
| 244 | <busconfig>
|
---|
| 245 |
|
---|
[9a003fe1] | 246 | <!-- Allow users in the halusers group invoke HAL methods -->
|
---|
| 247 | <policy group="halusers">
|
---|
| 248 | <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
|
---|
| 249 | <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
|
---|
| 250 | <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
|
---|
| 251 | <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
|
---|
| 252 | </policy>
|
---|
[baf47952] | 253 |
|
---|
| 254 | </busconfig></literal>
|
---|
| 255 | EOF</userinput></screen>
|
---|
| 256 |
|
---|
| 257 | <para>Now add the users you would like to the <systemitem
|
---|
| 258 | class="groupname">halusers</systemitem> group to use
|
---|
[3a79861] | 259 | <application>HAL</application>.</para>
|
---|
[c5923846] | 260 |
|
---|
[3a79861] | 261 | <screen role="root"><userinput>usermod -a -G halusers <replaceable><username></replaceable></userinput></screen>
|
---|
[c5923846] | 262 |
|
---|
[3a79861] | 263 | <para>Note that these users still need
|
---|
[baf47952] | 264 | to have appropriate permissions to access the devices that
|
---|
| 265 | <application>HAL</application> will invoke its methods on.</para>
|
---|
| 266 |
|
---|
[befd6fb] | 267 | <para>With the above configuration in place, authorized users now
|
---|
| 268 | have the ability to unmount disk partitions mounted at non-standard
|
---|
| 269 | locations such as <filename class='directory'>/pub</filename>. If
|
---|
| 270 | you'd like to restrict this policy to only drives which are considered
|
---|
| 271 | removable or hotpluggable, add the following configuration file as
|
---|
| 272 | the <systemitem class='username'>root</systemitem> user:</para>
|
---|
| 273 |
|
---|
| 274 | <screen role="root"><userinput>cat > /etc/hal/fdi/policy/no-fixed-drives.fdi << "EOF"
|
---|
| 275 | <literal><?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
|
---|
| 276 |
|
---|
| 277 | <!-- Don't allow HAL methods on disks that are not
|
---|
| 278 | removable or hotpluggable -->
|
---|
| 279 |
|
---|
| 280 | <deviceinfo version="0.2">
|
---|
| 281 | <device>
|
---|
| 282 | <match key="@block.storage_device:storage.hotpluggable" bool="false">
|
---|
| 283 | <match key="@block.storage_device:storage.removable" bool="false">
|
---|
| 284 | <merge key="volume.ignore" type="bool">true</merge>
|
---|
| 285 | </match>
|
---|
| 286 | </match>
|
---|
| 287 | </device>
|
---|
| 288 | </deviceinfo></literal>
|
---|
| 289 | EOF</userinput></screen>
|
---|
[3496df9] | 290 | </sect4>
|
---|
[befd6fb] | 291 |
|
---|
[3496df9] | 292 | <sect4><title>Installing mount helpers</title>
|
---|
[baf47952] | 293 | <para><application>HAL</application> only provides the methods such
|
---|
| 294 | as Mount() to act on hardware. In order to take advantage of these,
|
---|
[9624412] | 295 | a <application>HAL</application> event handler such as <ulink
|
---|
[baf47952] | 296 | url="http://ivman.sourceforge.net/">Ivman</ulink> should be
|
---|
| 297 | installed.</para>
|
---|
[fcceb000] | 298 | <!-- FIXME: is Ivman still alive? -->
|
---|
[3496df9] | 299 | <!-- FIXME: explicitly name the mount helpers
|
---|
| 300 | from KDE (???) and Xfce (exo-mount) -->
|
---|
| 301 | </sect4>
|
---|
[fcceb000] | 302 |
|
---|
[3496df9] | 303 | <sect4><title>Changing default mount options</title>
|
---|
[fcceb000] | 304 | <para>In some cases, it is necessary to specify some default mount
|
---|
| 305 | options for filesystems. E.g., in non-English environments, the
|
---|
| 306 | <option>iocharset</option> and <option>codepage</option> options
|
---|
[19a2f8f2] | 307 | are needed for filesystems of Windows origin in order to show
|
---|
[fcceb000] | 308 | national characters correctly. Also, due to a
|
---|
| 309 | <ulink url="https://launchpad.net/bugs/133567">bug</ulink> in the
|
---|
| 310 | Linux kernel version in LFS (2.6.22.x), you may want to pass the
|
---|
[37b13ed] | 311 | <option>usefree</option> option to vfat filesystems in order to reduce
|
---|
[fcceb000] | 312 | the time needed to determine the amount of free space on the
|
---|
| 313 | filesystem.</para>
|
---|
| 314 |
|
---|
| 315 | <para>Google search results for <quote>hal default mount options</quote>
|
---|
| 316 | are still full of recommendations to create <filename>*.fdi</filename>
|
---|
| 317 | files mentioning either
|
---|
[19a2f8f2] | 318 | <option>volume.policy</option> or <option>storage.policy</option> keys.
|
---|
[fcceb000] | 319 | Such recommendations worked for HAL-0.4.x only and are invalid now.
|
---|
| 320 | For HAL-&hal-version;, mount options are expected to be handled
|
---|
| 321 | as follows:</para>
|
---|
| 322 |
|
---|
| 323 | <itemizedlist>
|
---|
| 324 | <listitem>
|
---|
| 325 | <para>An event handler from the desktop environment receives an
|
---|
| 326 | event describing the newly-added storage device.</para>
|
---|
| 327 | </listitem>
|
---|
| 328 | <listitem>
|
---|
| 329 | <para>If the storage device is not already mentioned in
|
---|
| 330 | <filename>/etc/fstab</filename>, mount options are fetched from
|
---|
| 331 | a database of user preferences, which is specific to the desktop
|
---|
| 332 | environment, and passed back to HAL.
|
---|
| 333 | This process can be influenced by the filesystem type
|
---|
| 334 | and possibly other volume properties available from HAL.</para>
|
---|
| 335 | </listitem>
|
---|
| 336 | <listitem>
|
---|
| 337 | <para>If the options are in the list of permitted ones, HAL
|
---|
| 338 | mounts the volume.</para>
|
---|
| 339 | </listitem>
|
---|
| 340 | </itemizedlist>
|
---|
| 341 |
|
---|
| 342 | <para>The important point above is that the configuration procedure is
|
---|
| 343 | desktop-specific. However, as of December, 2007, only GNOME allows the
|
---|
[3496df9] | 344 | user to set default mount options on a per-filesystem basis,
|
---|
| 345 | as described in the next paragraph.
|
---|
| 346 | KDE allows the mount options to be set only on a per-volume basis,
|
---|
[fcceb000] | 347 | not per-filesystem, which is a
|
---|
| 348 | <ulink url="http://bugs.kde.org/show_bug.cgi?id=133456">bug</ulink>,
|
---|
| 349 | because, as mentioned in the report, <quote>for every new device (let's
|
---|
[f2775848] | 350 | say your friend's USB stick) you have to first not mount it, then change
|
---|
[fcceb000] | 351 | options and then mount</quote>. Xfce, if compiled with HAL support,
|
---|
| 352 | <ulink url="http://bugzilla.xfce.org/show_bug.cgi?id=2891">hard-codes</ulink>
|
---|
| 353 | the mount options without any means to override them,
|
---|
| 354 | which is even worse.
|
---|
| 355 | <!-- (for BLFS editors only: they mention policy-kit as a future
|
---|
| 356 | solution, but, from the description, policy-kit looks like
|
---|
[104733c] | 357 | an XML-ized sudo-like configuration parser, which has nothing
|
---|
[fcceb000] | 358 | common with the "default mount options" problem. -->
|
---|
[3496df9] | 359 | In KDE and Xfce, if the built-in default mount options are not suitable,
|
---|
| 360 | it is needed to mention every possible removable storage device in
|
---|
| 361 | <filename>/etc/fstab</filename> with the correct options, thus mostly
|
---|
| 362 | defeating the point of installing HAL.</para>
|
---|
[fd7e0ed6] | 363 |
|
---|
[3496df9] | 364 | <para>In order to adjust the default mount options, GNOME users should
|
---|
| 365 | change the
|
---|
| 366 | <systemitem>/system/storage/default_options/[fs_type]/mount_options</systemitem>
|
---|
[26f582a8] | 367 | GConf key <!--either using <xref linkend="gconf-editor"/>, or -->from the
|
---|
[3496df9] | 368 | command line, as demonstrated in the following example:</para>
|
---|
[fcceb000] | 369 |
|
---|
[3496df9] | 370 | <screen><userinput>gconftool-2 --type list --list-type=string \
|
---|
| 371 | --set /system/storage/default_options/vfat/mount_options \
|
---|
| 372 | "[shortname=mixed,uid=,usefree,iocharset=koi8-r,codepage=866]"</userinput></screen>
|
---|
| 373 |
|
---|
| 374 | <para>See more details in the gnome-mount(1) manual page.</para>
|
---|
| 375 | </sect4>
|
---|
| 376 |
|
---|
| 377 | <sect4><title>Adding allowed mount options</title>
|
---|
| 378 | <para>The list of mount options permitted in the default HAL
|
---|
| 379 | configuration resides in the
|
---|
| 380 | <filename>/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi</filename>
|
---|
| 381 | file. GNOME and KDE users may want to use options not in this
|
---|
| 382 | list (in the above example, this applies to the <option>usefree</option>
|
---|
| 383 | option). In this case, as <systemitem class="username">root</systemitem>
|
---|
| 384 | user, create a custom policy file that mentions unknown mount
|
---|
| 385 | options:</para>
|
---|
[1f93d11] | 386 |
|
---|
[7ea0236b] | 387 | <screen role="root"><userinput>cat > /etc/hal/fdi/policy/user-options.fdi << "EOF"
|
---|
[d10ebccc] | 388 | <literal><?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
|
---|
[1f93d11] | 389 |
|
---|
[d10ebccc] | 390 | <!--
|
---|
[1f93d11] | 391 | This file is used to set custom options to the HAL policy settings.
|
---|
| 392 | The default policy settings are defined in files contained in the
|
---|
[278198d] | 393 | /usr/share/hal/fdi/policy subdirectories. User defined customizations
|
---|
| 394 | should be in files contained in the /etc/hal/fdi/policy directory.
|
---|
[d10ebccc] | 395 | -->
|
---|
[1f93d11] | 396 |
|
---|
| 397 | <deviceinfo version="0.2">
|
---|
| 398 | <device>
|
---|
| 399 |
|
---|
[fcceb000] | 400 | <!-- this is to be able to mount media in drives we cannot poll,
|
---|
| 401 | e.g. IDE Zip Drives and PC style floppy drives -->
|
---|
| 402 | <match key="storage.media_check_enabled" bool="false">
|
---|
| 403 | <match key="storage.no_partitions_hint" bool="true">
|
---|
| 404 | <append key="volume.mount.valid_options" type="strlist">usefree</append>
|
---|
[3496df9] | 405 | <!-- Insert other options here -->
|
---|
[fcceb000] | 406 | </match>
|
---|
| 407 | </match>
|
---|
[1f93d11] | 408 |
|
---|
[fcceb000] | 409 | <match key="volume.fsusage" string="filesystem">
|
---|
[1f93d11] | 410 |
|
---|
[fcceb000] | 411 | <!-- allow these mount options for vfat -->
|
---|
| 412 | <match key="volume.fstype" string="vfat">
|
---|
| 413 | <append key="volume.mount.valid_options" type="strlist">usefree</append>
|
---|
[3496df9] | 414 | <!-- Insert other options here -->
|
---|
[fcceb000] | 415 | </match>
|
---|
[1f93d11] | 416 | </match>
|
---|
| 417 |
|
---|
[fcceb000] | 418 | </device>
|
---|
[1f93d11] | 419 | </deviceinfo></literal>
|
---|
| 420 | EOF</userinput></screen>
|
---|
| 421 |
|
---|
[3496df9] | 422 | </sect4>
|
---|
[baf47952] | 423 | </sect3>
|
---|
| 424 |
|
---|
[9eea651] | 425 | <sect3 id="hal-init">
|
---|
| 426 | <title>Boot Script</title>
|
---|
| 427 |
|
---|
| 428 | <para>To automatically start the <command>hald</command> daemon
|
---|
| 429 | when the system is rebooted, install the
|
---|
| 430 | <filename>/etc/rc.d/init.d/haldaemon</filename>
|
---|
| 431 | bootscript from the
|
---|
[5254d12] | 432 | <xref linkend="bootscripts"/> package.</para>
|
---|
[9eea651] | 433 |
|
---|
| 434 | <indexterm zone="hal hal-init">
|
---|
| 435 | <primary sortas="f-haldaemon">haldaemon</primary>
|
---|
| 436 | </indexterm>
|
---|
| 437 |
|
---|
[1f93d11] | 438 | <important>
|
---|
[9faa2754] | 439 | <para>If the system-wide <application>D-BUS</application> daemon was
|
---|
| 440 | running during the installation of <application>HAL</application>,
|
---|
| 441 | ensure you stop and restart the <application>D-BUS</application>
|
---|
| 442 | daemon before attempting to start the <command>hald</command>
|
---|
| 443 | daemon.</para>
|
---|
[1f93d11] | 444 | </important>
|
---|
[9faa2754] | 445 |
|
---|
[9eea651] | 446 | <screen role="root"><userinput>make install-haldaemon</userinput></screen>
|
---|
| 447 |
|
---|
| 448 | </sect3>
|
---|
| 449 |
|
---|
| 450 | </sect2>
|
---|
| 451 |
|
---|
| 452 | <sect2 role="content">
|
---|
| 453 | <title>Contents</title>
|
---|
| 454 |
|
---|
| 455 | <segmentedlist>
|
---|
| 456 | <segtitle>Installed Programs</segtitle>
|
---|
| 457 | <segtitle>Installed Libraries</segtitle>
|
---|
| 458 | <segtitle>Installed Directories</segtitle>
|
---|
| 459 |
|
---|
| 460 | <seglistitem>
|
---|
[bf617d7] | 461 | <seg>hal-device, hal-disable-polling,
|
---|
[9eea651] | 462 | hal-find-by-capability, hal-find-by-property, hal-get-property,
|
---|
[d0bf291] | 463 | hal-is-caller-locked-out, hal-lock, hal-set-property, hald and
|
---|
[4ea8ecd1] | 464 | lshal</seg>
|
---|
[1039de3] | 465 | <seg>libhal.{so,a} and libhal-storage,{so,a}</seg>
|
---|
[9faa2754] | 466 | <seg>/etc/hal, /usr/include/hal, /usr/lib/hal,
|
---|
[4ea8ecd1] | 467 | /usr/share/doc/hal-&hal-version;, /usr/share/hal, /var/cache/hald,
|
---|
| 468 | /var/lib/hal, and /var/run/hald</seg>
|
---|
[9eea651] | 469 | </seglistitem>
|
---|
| 470 | </segmentedlist>
|
---|
| 471 |
|
---|
| 472 | <variablelist>
|
---|
| 473 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 474 | <?dbfo list-presentation="list"?>
|
---|
| 475 | <?dbhtml list-presentation="table"?>
|
---|
| 476 |
|
---|
| 477 | <varlistentry id="hal-device">
|
---|
| 478 | <term><command>hal-device</command></term>
|
---|
| 479 | <listitem>
|
---|
| 480 | <para>is used to create, remove or show a
|
---|
| 481 | <application>HAL</application> device.</para>
|
---|
| 482 | <indexterm zone="hal hal-device">
|
---|
| 483 | <primary sortas="b-hal-device">hal-device</primary>
|
---|
| 484 | </indexterm>
|
---|
| 485 | </listitem>
|
---|
| 486 | </varlistentry>
|
---|
| 487 |
|
---|
[4ea8ecd1] | 488 | <varlistentry id="hal-disable-polling">
|
---|
| 489 | <term><command>hal-disable-polling</command></term>
|
---|
| 490 | <listitem>
|
---|
| 491 | <para>can be used to to disable and enable media detection on
|
---|
| 492 | drives with removable storage.</para>
|
---|
| 493 | <indexterm zone="hal hal-disable-polling">
|
---|
| 494 | <primary sortas="b-hal-disable-polling">hal-disable-polling</primary>
|
---|
| 495 | </indexterm>
|
---|
| 496 | </listitem>
|
---|
| 497 | </varlistentry>
|
---|
| 498 |
|
---|
[9eea651] | 499 | <varlistentry id="hal-find-by-capability">
|
---|
| 500 | <term><command>hal-find-by-capability</command></term>
|
---|
| 501 | <listitem>
|
---|
| 502 | <para>prints the Unique Device Identifiers for
|
---|
| 503 | <application>HAL</application> device objects of a given
|
---|
| 504 | capability.</para>
|
---|
| 505 | <indexterm zone="hal hal-find-by-capability">
|
---|
[b8dba81] | 506 | <primary sortas="b-hal-find-by-capability">hal-find-by-capability</primary>
|
---|
[9eea651] | 507 | </indexterm>
|
---|
| 508 | </listitem>
|
---|
| 509 | </varlistentry>
|
---|
| 510 |
|
---|
| 511 | <varlistentry id="hal-find-by-property">
|
---|
| 512 | <term><command>hal-find-by-property</command></term>
|
---|
| 513 | <listitem>
|
---|
| 514 | <para>prints the Unique Device Identifiers for
|
---|
| 515 | <application>HAL</application> device objects where a given property
|
---|
| 516 | assumes a given value.</para>
|
---|
| 517 | <indexterm zone="hal hal-find-by-property">
|
---|
| 518 | <primary sortas="b-hal-find-by-property">hal-find-by-property</primary>
|
---|
| 519 | </indexterm>
|
---|
| 520 | </listitem>
|
---|
| 521 | </varlistentry>
|
---|
| 522 |
|
---|
| 523 | <varlistentry id="hal-get-property">
|
---|
| 524 | <term><command>hal-get-property</command></term>
|
---|
| 525 | <listitem>
|
---|
| 526 | <para>retrieves a property from a device.</para>
|
---|
| 527 | <indexterm zone="hal hal-get-property">
|
---|
| 528 | <primary sortas="b-hal-get-property">hal-get-property</primary>
|
---|
| 529 | </indexterm>
|
---|
| 530 | </listitem>
|
---|
| 531 | </varlistentry>
|
---|
| 532 |
|
---|
| 533 | <varlistentry id="hal-set-property">
|
---|
| 534 | <term><command>hal-set-property</command></term>
|
---|
| 535 | <listitem>
|
---|
| 536 | <para>attempts to set property for a device. Note that, due to
|
---|
| 537 | security considerations, it may not be possible to set a
|
---|
| 538 | property.</para>
|
---|
| 539 | <indexterm zone="hal hal-set-property">
|
---|
| 540 | <primary sortas="b-hal-set-property">hal-set-property</primary>
|
---|
| 541 | </indexterm>
|
---|
| 542 | </listitem>
|
---|
| 543 | </varlistentry>
|
---|
| 544 |
|
---|
[4ea8ecd1] | 545 | <varlistentry id="hal-is-caller-locked-out">
|
---|
| 546 | <term><command>hal-is-caller-locked-out</command></term>
|
---|
| 547 | <listitem>
|
---|
| 548 | <para>determines if a specific caller is locked out of a specific
|
---|
| 549 | <application>D-Bus</application> interface on a specific device.</para>
|
---|
| 550 | <indexterm zone="hal hal-is-caller-locked-out">
|
---|
| 551 | <primary sortas="b-hal-is-caller-locked-out">hal-is-caller-locked-out</primary>
|
---|
| 552 | </indexterm>
|
---|
| 553 | </listitem>
|
---|
| 554 | </varlistentry>
|
---|
| 555 |
|
---|
[9eea651] | 556 | <varlistentry id="hald">
|
---|
| 557 | <term><command>hald</command></term>
|
---|
| 558 | <listitem>
|
---|
| 559 | <para>is the <application>HAL</application> daemon program.</para>
|
---|
| 560 | <indexterm zone="hal hald">
|
---|
| 561 | <primary sortas="b-hald">hald</primary>
|
---|
| 562 | </indexterm>
|
---|
| 563 | </listitem>
|
---|
| 564 | </varlistentry>
|
---|
| 565 |
|
---|
| 566 | <varlistentry id="lshal">
|
---|
| 567 | <term><command>lshal</command></term>
|
---|
| 568 | <listitem>
|
---|
| 569 | <para>shows all devices and their properties. If the --monitor option
|
---|
| 570 | is given then the device list and all devices are monitored for
|
---|
| 571 | changes.</para>
|
---|
| 572 | <indexterm zone="hal lshal">
|
---|
| 573 | <primary sortas="b-lshal">lshal</primary>
|
---|
| 574 | </indexterm>
|
---|
| 575 | </listitem>
|
---|
| 576 | </varlistentry>
|
---|
| 577 |
|
---|
| 578 | <varlistentry id="libhal">
|
---|
[1039de3] | 579 | <term><filename class='libraryfile'>libhal.{so,a}</filename></term>
|
---|
[9eea651] | 580 | <listitem>
|
---|
| 581 | <para>contains the API functions required by the
|
---|
| 582 | <application>HAL</application> programs.</para>
|
---|
| 583 | <indexterm zone="hal libhal">
|
---|
[1039de3] | 584 | <primary sortas="c-libhal">libhal.{so,a}</primary>
|
---|
[9eea651] | 585 | </indexterm>
|
---|
| 586 | </listitem>
|
---|
| 587 | </varlistentry>
|
---|
| 588 |
|
---|
| 589 | <varlistentry id="libhal-storage">
|
---|
[1039de3] | 590 | <term><filename class='libraryfile'>libhal-storage.{so,a}</filename></term>
|
---|
[9eea651] | 591 | <listitem>
|
---|
| 592 | <para>contains the API functions required by the
|
---|
| 593 | <application>HAL</application> storage and volume utility
|
---|
| 594 | programs.</para>
|
---|
| 595 | <indexterm zone="hal libhal-storage">
|
---|
[1039de3] | 596 | <primary sortas="c-libhal-storage">libhal-storage.{so,a}</primary>
|
---|
[9eea651] | 597 | </indexterm>
|
---|
| 598 | </listitem>
|
---|
| 599 | </varlistentry>
|
---|
| 600 |
|
---|
| 601 | </variablelist>
|
---|
| 602 |
|
---|
| 603 | </sect2>
|
---|
| 604 |
|
---|
| 605 | </sect1>
|
---|