| 1 | <?xml version="1.0" encoding="ISO-8859-1"?> | 
|---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | 
|---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ | 
|---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> | 
|---|
| 5 | %general-entities; | 
|---|
| 6 | ]> | 
|---|
| 7 |  | 
|---|
| 8 | <sect1 id="ch-system-man" role="wrap"> | 
|---|
| 9 | <?dbhtml filename="man.html"?> | 
|---|
| 10 |  | 
|---|
| 11 | <title>Man-&man-version;</title> | 
|---|
| 12 |  | 
|---|
| 13 | <indexterm zone="ch-system-man"> | 
|---|
| 14 | <primary sortas="a-Man">Man</primary> | 
|---|
| 15 | </indexterm> | 
|---|
| 16 |  | 
|---|
| 17 | <sect2 role="package"> | 
|---|
| 18 | <title/> | 
|---|
| 19 |  | 
|---|
| 20 | <para>The Man package contains programs for finding and viewing man | 
|---|
| 21 | pages.</para> | 
|---|
| 22 |  | 
|---|
| 23 | <segmentedlist> | 
|---|
| 24 | <segtitle>&dependencies;</segtitle> | 
|---|
| 25 |  | 
|---|
| 26 | <seglistitem> | 
|---|
| 27 | <seg>Bash, Bzip2, Binutils, Coreutils, Diffutils, Gawk, Groff, Gzip, | 
|---|
| 28 | GCC, Glibc, Grep, Less, Make, and Sed</seg> | 
|---|
| 29 | </seglistitem> | 
|---|
| 30 | </segmentedlist> | 
|---|
| 31 |  | 
|---|
| 32 | </sect2> | 
|---|
| 33 |  | 
|---|
| 34 | <sect2 role="installation"> | 
|---|
| 35 | <title>Installation of Man</title> | 
|---|
| 36 |  | 
|---|
| 37 | <para os="a">A few adjustments need to be made to the sources of Man.</para> | 
|---|
| 38 |  | 
|---|
| 39 | <para os="b">First, a <command>sed</command> substitution is | 
|---|
| 40 | needed to add the <option>-R</option> switch to the | 
|---|
| 41 | <envar>PAGER</envar> variable so that escape sequences are | 
|---|
| 42 | properly handled by Less:</para> | 
|---|
| 43 |  | 
|---|
| 44 | <screen os="c"><userinput>sed -i 's@-is@&R@g' configure</userinput></screen> | 
|---|
| 45 |  | 
|---|
| 46 | <para os="d">Another <command>sed</command> substitution comments out the | 
|---|
| 47 | <quote>MANPATH /usr/man</quote> line in the <filename>man.conf</filename> | 
|---|
| 48 | file to prevent redundant results when using programs such as | 
|---|
| 49 | <command>whatis</command>:</para> | 
|---|
| 50 |  | 
|---|
| 51 | <screen os="e"><userinput>sed -i 's@MANPATH./usr/man@#&@g' src/man.conf.in</userinput></screen> | 
|---|
| 52 |  | 
|---|
| 53 | <para os="f">Finally, correct a syntax error in the | 
|---|
| 54 | <command>makewhatis</command> script:</para> | 
|---|
| 55 |  | 
|---|
| 56 | <screen os="g"><userinput>sed -i 's@)) |@) |@' src/makewhatis.sh</userinput></screen> | 
|---|
| 57 |  | 
|---|
| 58 | <para os="h">Prepare Man for compilation:</para> | 
|---|
| 59 |  | 
|---|
| 60 | <screen os="i"><userinput>./configure -confdir=/etc</userinput></screen> | 
|---|
| 61 |  | 
|---|
| 62 | <variablelist os="j"> | 
|---|
| 63 | <title>The meaning of the configure options:</title> | 
|---|
| 64 |  | 
|---|
| 65 | <varlistentry> | 
|---|
| 66 | <term><parameter>-confdir=/etc</parameter></term> | 
|---|
| 67 | <listitem> | 
|---|
| 68 | <para>This tells the <command>man</command> program to look for the | 
|---|
| 69 | <filename>man.conf</filename> configuration file in the <filename | 
|---|
| 70 | class="directory">/etc</filename> directory.</para> | 
|---|
| 71 | </listitem> | 
|---|
| 72 | </varlistentry> | 
|---|
| 73 | </variablelist> | 
|---|
| 74 |  | 
|---|
| 75 | <para os="k">Compile the package:</para> | 
|---|
| 76 |  | 
|---|
| 77 | <screen os="l"><userinput>make</userinput></screen> | 
|---|
| 78 |  | 
|---|
| 79 | <para os="m">This package does not come with a test suite.</para> | 
|---|
| 80 |  | 
|---|
| 81 | <para os="n">Install the package:</para> | 
|---|
| 82 |  | 
|---|
| 83 | <screen os="o"><userinput>make install</userinput></screen> | 
|---|
| 84 |  | 
|---|
| 85 | <note os="p"> | 
|---|
| 86 | <para>If you will be working on a terminal that does not support | 
|---|
| 87 | text attributes such as color and bold, you can disable Select | 
|---|
| 88 | Graphic Rendition (SGR) escape sequences by editing the | 
|---|
| 89 | <filename>man.conf</filename> file and adding the <option>-c</option> | 
|---|
| 90 | option to the <envar>NROFF</envar> variable. If you use multiple | 
|---|
| 91 | terminal types for one computer it may be better to selectively add | 
|---|
| 92 | the <envar>GROFF_NO_SGR</envar> environment variable for the terminals | 
|---|
| 93 | that do not support SGR.</para> | 
|---|
| 94 | </note> | 
|---|
| 95 |  | 
|---|
| 96 | <para os="q">If the character set of the locale uses 8-bit characters, search | 
|---|
| 97 | for the line beginning with <quote>NROFF</quote> in | 
|---|
| 98 | <filename>/etc/man.conf</filename>, and verify that it matches the | 
|---|
| 99 | following:</para> | 
|---|
| 100 |  | 
|---|
| 101 | <screen os="r">NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen> | 
|---|
| 102 |  | 
|---|
| 103 | <para os="s">Note that <quote>latin1</quote> should be used even if it is not | 
|---|
| 104 | the character set of the locale. The reason is that, according to the | 
|---|
| 105 | specification, <command>groff</command> has no means of typesetting | 
|---|
| 106 | characters outside International Organization for Standards (ISO) 8859-1 | 
|---|
| 107 | without some strange escape codes. When formatting man pages, | 
|---|
| 108 | <command>groff</command> thinks that they are in the ISO 8859-1 encoding | 
|---|
| 109 | and this <parameter>-Tlatin1</parameter> switch tells | 
|---|
| 110 | <command>groff</command> to use the same encoding for output. Since | 
|---|
| 111 | <command>groff</command> does no recoding of input characters, the f | 
|---|
| 112 | ormatted result is really in the same encoding as input, and therefore | 
|---|
| 113 | it is usable as the input for a pager.</para> | 
|---|
| 114 |  | 
|---|
| 115 | <para os="t">This does not solve the problem of a non-working | 
|---|
| 116 | <command>man2dvi</command> program for localized man pages in | 
|---|
| 117 | non-ISO 8859-1 locales. Also, it does not work with multibyte | 
|---|
| 118 | character sets. The first problem does not currently have a solution. | 
|---|
| 119 | The second issue is not of concern because the LFS installation does | 
|---|
| 120 | not support multibyte character sets.</para> | 
|---|
| 121 |  | 
|---|
| 122 | <para os="u">Additional information with regards to the compression of | 
|---|
| 123 | man and info pages can be found in the BLFS book at | 
|---|
| 124 | <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para> | 
|---|
| 125 |  | 
|---|
| 126 | </sect2> | 
|---|
| 127 |  | 
|---|
| 128 | <sect2 id="contents-man" role="content"> | 
|---|
| 129 | <title>Contents of Man</title> | 
|---|
| 130 |  | 
|---|
| 131 | <segmentedlist> | 
|---|
| 132 | <segtitle>Installed programs</segtitle> | 
|---|
| 133 |  | 
|---|
| 134 | <seglistitem> | 
|---|
| 135 | <seg>apropos, makewhatis, man, man2dvi, man2html, and whatis</seg> | 
|---|
| 136 | </seglistitem> | 
|---|
| 137 | </segmentedlist> | 
|---|
| 138 |  | 
|---|
| 139 | <variablelist> | 
|---|
| 140 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> | 
|---|
| 141 | <?dbfo list-presentation="list"?> | 
|---|
| 142 | <?dbhtml list-presentation="table"?> | 
|---|
| 143 |  | 
|---|
| 144 | <varlistentry id="apropos"> | 
|---|
| 145 | <term><command>apropos</command></term> | 
|---|
| 146 | <listitem> | 
|---|
| 147 | <para>Searches the <command>whatis</command> database and | 
|---|
| 148 | displays the short descriptions of system commands that contain | 
|---|
| 149 | a given string</para> | 
|---|
| 150 | <indexterm zone="ch-system-man apropos"> | 
|---|
| 151 | <primary sortas="b-apropos">apropos</primary> | 
|---|
| 152 | </indexterm> | 
|---|
| 153 | </listitem> | 
|---|
| 154 | </varlistentry> | 
|---|
| 155 |  | 
|---|
| 156 | <varlistentry id="makewhatis"> | 
|---|
| 157 | <term><command>makewhatis</command></term> | 
|---|
| 158 | <listitem> | 
|---|
| 159 | <para>Builds the <command>whatis</command> database; it reads all | 
|---|
| 160 | the man pages in the <envar>MANPATH</envar> and writes the name | 
|---|
| 161 | and a short description in the <command>whatis</command> database | 
|---|
| 162 | for each page</para> | 
|---|
| 163 | <indexterm zone="ch-system-man makewhatis"> | 
|---|
| 164 | <primary sortas="b-makewhatis">makewhatis</primary> | 
|---|
| 165 | </indexterm> | 
|---|
| 166 | </listitem> | 
|---|
| 167 | </varlistentry> | 
|---|
| 168 |  | 
|---|
| 169 | <varlistentry id="man"> | 
|---|
| 170 | <term><command>man</command></term> | 
|---|
| 171 | <listitem> | 
|---|
| 172 | <para>Formats and displays the requested on-line man page</para> | 
|---|
| 173 | <indexterm zone="ch-system-man man"> | 
|---|
| 174 | <primary sortas="b-man">man</primary> | 
|---|
| 175 | </indexterm> | 
|---|
| 176 | </listitem> | 
|---|
| 177 | </varlistentry> | 
|---|
| 178 |  | 
|---|
| 179 | <varlistentry id="man2dvi"> | 
|---|
| 180 | <term><command>man2dvi</command></term> | 
|---|
| 181 | <listitem> | 
|---|
| 182 | <para>Converts a man page into dvi format</para> | 
|---|
| 183 | <indexterm zone="ch-system-man man2dvi"> | 
|---|
| 184 | <primary sortas="b-man2dvi">man2dvi</primary> | 
|---|
| 185 | </indexterm> | 
|---|
| 186 | </listitem> | 
|---|
| 187 | </varlistentry> | 
|---|
| 188 |  | 
|---|
| 189 | <varlistentry id="man2html"> | 
|---|
| 190 | <term><command>man2html</command></term> | 
|---|
| 191 | <listitem> | 
|---|
| 192 | <para>Converts a man page into HTML</para> | 
|---|
| 193 | <indexterm zone="ch-system-man man2html"> | 
|---|
| 194 | <primary sortas="b-man2html">man2html</primary> | 
|---|
| 195 | </indexterm> | 
|---|
| 196 | </listitem> | 
|---|
| 197 | </varlistentry> | 
|---|
| 198 |  | 
|---|
| 199 | <varlistentry id="whatis"> | 
|---|
| 200 | <term><command>whatis</command></term> | 
|---|
| 201 | <listitem> | 
|---|
| 202 | <para>Searches the <command>whatis</command> database and | 
|---|
| 203 | displays the short descriptions of system commands that | 
|---|
| 204 | contain the given keyword as a separate word</para> | 
|---|
| 205 | <indexterm zone="ch-system-man whatis"> | 
|---|
| 206 | <primary sortas="b-whatis">whatis</primary> | 
|---|
| 207 | </indexterm> | 
|---|
| 208 | </listitem> | 
|---|
| 209 | </varlistentry> | 
|---|
| 210 |  | 
|---|
| 211 | </variablelist> | 
|---|
| 212 |  | 
|---|
| 213 | </sect2> | 
|---|
| 214 |  | 
|---|
| 215 | </sect1> | 
|---|