[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[a001133] | 6 | <sect1 id="ch-system-man" xreflabel="Man" role="wrap">
|
---|
[673b0d8] | 7 | <title>Man-&man-version;</title>
|
---|
| 8 | <?dbhtml filename="man.html"?>
|
---|
| 9 |
|
---|
| 10 | <indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
|
---|
[6370fa6] | 11 |
|
---|
[a001133] | 12 | <sect2 role="package"><title/>
|
---|
[5888299] | 13 | <para>The Man package contains programs for finding and viewing manual pages.</para>
|
---|
| 14 |
|
---|
[a001133] | 15 | <segmentedlist>
|
---|
| 16 | <segtitle>&buildtime;</segtitle>
|
---|
| 17 | <segtitle>&diskspace;</segtitle>
|
---|
| 18 | <seglistitem><seg>0.1 SBU</seg><seg>1.9MB</seg></seglistitem>
|
---|
| 19 | </segmentedlist>
|
---|
[673b0d8] | 20 |
|
---|
[a001133] | 21 | <segmentedlist>
|
---|
| 22 | <segtitle>Man installation depends on</segtitle>
|
---|
| 23 | <seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
|
---|
| 24 | Glibc, Grep, Make, Sed</seg></seglistitem>
|
---|
| 25 | </segmentedlist>
|
---|
| 26 | </sect2>
|
---|
[3554fa3a] | 27 |
|
---|
[a001133] | 28 | <sect2 role="installation">
|
---|
[73aedd1d] | 29 | <title>Installation of Man</title>
|
---|
| 30 |
|
---|
| 31 | <para>We'll make three adjustments to the sources of Man.</para>
|
---|
| 32 |
|
---|
[37dcf2a] | 33 | <para>The first is a patch which allows Man to work better with recent releases
|
---|
| 34 | of Groff. In particular, man pages will now display using the full terminal
|
---|
| 35 | width instead of being limited to 80 characters:</para>
|
---|
[73aedd1d] | 36 |
|
---|
[c8ba565] | 37 | <screen><userinput>patch -Np1 -i ../man-&man-version;-80cols-1.patch</userinput></screen>
|
---|
[73aedd1d] | 38 |
|
---|
[37dcf2a] | 39 | <para>The second is a sed substitution to add the <emphasis>-R</emphasis>
|
---|
| 40 | switch to the <emphasis>PAGER</emphasis> variable so that escape sequences are
|
---|
| 41 | properly handled by Less:</para>
|
---|
[73aedd1d] | 42 |
|
---|
[2ec4b60] | 43 | <screen><userinput>sed -i 's@-is@&R@g' configure</userinput></screen>
|
---|
[73aedd1d] | 44 |
|
---|
[673b0d8] | 45 | <para>The third is also a sed substitution to comment out the <quote>MANPATH
|
---|
| 46 | /usr/man</quote> line in the <filename>man.conf</filename> file to prevent
|
---|
| 47 | redundant results when using programs such as <command>whatis</command>:</para>
|
---|
[73aedd1d] | 48 |
|
---|
[2ec4b60] | 49 | <screen><userinput>sed -i 's@MANPATH./usr/man@#&@g' src/man.conf.in</userinput></screen>
|
---|
[37dcf2a] | 50 |
|
---|
[73aedd1d] | 51 | <para>Now prepare Man for compilation:</para>
|
---|
| 52 |
|
---|
[e5f8a42] | 53 | <screen><userinput>./configure -confdir=/etc</userinput></screen>
|
---|
[73aedd1d] | 54 |
|
---|
| 55 | <para>The meaning of the configure options:</para>
|
---|
| 56 |
|
---|
[df8334f] | 57 | <variablelist>
|
---|
| 58 | <varlistentry>
|
---|
| 59 | <term><userinput>-confdir=/etc</userinput></term>
|
---|
| 60 | <listitem><para>This tells the
|
---|
[90e3cb3] | 61 | <command>man</command> program to look for the <filename>man.conf</filename>
|
---|
[73aedd1d] | 62 | configuration file in the <filename>/etc</filename> directory.</para></listitem>
|
---|
[df8334f] | 63 | </varlistentry>
|
---|
| 64 | </variablelist>
|
---|
[73aedd1d] | 65 |
|
---|
| 66 | <para>Compile the package:</para>
|
---|
| 67 |
|
---|
| 68 | <screen><userinput>make</userinput></screen>
|
---|
| 69 |
|
---|
[673b0d8] | 70 | <para>Lastly, install it:</para>
|
---|
[73aedd1d] | 71 |
|
---|
| 72 | <screen><userinput>make install</userinput></screen>
|
---|
| 73 |
|
---|
[673b0d8] | 74 | <note><para>If you wish to disable SGR (Select Graphic Rendition) escape sequences, you should edit the
|
---|
[90e3cb3] | 75 | <filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch
|
---|
| 76 | to NROFF.</para></note>
|
---|
[73aedd1d] | 77 |
|
---|
[b32e803] | 78 | <para>If your character set uses 8-bit characters, search for the line
|
---|
| 79 | beginning with "NROFF" in /etc/man.conf, and verify that it coincides
|
---|
| 80 | with the following:</para>
|
---|
| 81 |
|
---|
| 82 | <screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
|
---|
| 83 |
|
---|
| 84 | <para>Note that you should use "latin1" even if it is not the character set
|
---|
| 85 | of your locale. The reason is that,
|
---|
| 86 | according to the specification, <application>groff</application> has
|
---|
| 87 | no means of typesetting characters outside ISO-8859-1
|
---|
| 88 | without some strange escape codes, and localized manual
|
---|
| 89 | pages are therefore really a hack. When formatting manual pages,
|
---|
| 90 | <application>groff</application> thinks that they are in the ISO-8859-1
|
---|
| 91 | encoding and this <emphasis>-Tlatin1</emphasis> switch tells
|
---|
| 92 | <application>groff</application> to use the same encoding for output.
|
---|
| 93 | Since <application>groff</application> does no recoding of input characters,
|
---|
| 94 | the formatted result is really in the same encoding as input (although
|
---|
| 95 | <application>groff</application> doesn't know that it is not ISO-8859-1)
|
---|
| 96 | and therefore it is usable as the input for a pager.</para>
|
---|
| 97 |
|
---|
| 98 | <para>Of course, this hack does not solve the problem of non-working
|
---|
| 99 | <command>man2dvi</command> program for localized manual
|
---|
| 100 | pages in non-ISO-8859-1 locales.
|
---|
| 101 | Also, it does not work at all with multibyte character sets.
|
---|
| 102 | The first problem does not have a solution currently. The second
|
---|
| 103 | one is not of a concern because the LFS installation does not support
|
---|
| 104 | multibyte character sets properly anyway. You may want to look at
|
---|
| 105 | internationalization related hints, though.</para>
|
---|
| 106 |
|
---|
[73aedd1d] | 107 | <para>You may want to also take a look at the BLFS page at
|
---|
| 108 | <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
|
---|
| 109 | formatting and compression issues for man pages.</para>
|
---|
| 110 |
|
---|
| 111 | </sect2>
|
---|
[6370fa6] | 112 |
|
---|
[5888299] | 113 |
|
---|
[c6cb3aa] | 114 | <sect2 id="contents-man" role="content"><title>Contents of Man</title>
|
---|
[673b0d8] | 115 |
|
---|
[c6cb3aa] | 116 | <segmentedlist>
|
---|
| 117 | <segtitle>Installed programs</segtitle>
|
---|
| 118 | <seglistitem><seg>apropos, makewhatis, man,
|
---|
| 119 | man2dvi, man2html and whatis</seg></seglistitem>
|
---|
| 120 | </segmentedlist>
|
---|
[673b0d8] | 121 |
|
---|
[c6cb3aa] | 122 | <variablelist><title>Short descriptions</title>
|
---|
[673b0d8] | 123 |
|
---|
[b8a819f] | 124 | <varlistentry id="apropos">
|
---|
| 125 | <term><command>apropos</command></term>
|
---|
[c6cb3aa] | 126 | <listitem>
|
---|
[673b0d8] | 127 | <indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
|
---|
[c6cb3aa] | 128 | <para>searches the whatis database and displays
|
---|
[673b0d8] | 129 | the short descriptions of system commands that contain a given string.</para>
|
---|
[c6cb3aa] | 130 | </listitem>
|
---|
| 131 | </varlistentry>
|
---|
[673b0d8] | 132 |
|
---|
[b8a819f] | 133 | <varlistentry id="makewhatis">
|
---|
| 134 | <term><command>makewhatis</command></term>
|
---|
[c6cb3aa] | 135 | <listitem>
|
---|
[673b0d8] | 136 | <indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
|
---|
[c6cb3aa] | 137 | <para>builds the whatis database. It reads
|
---|
[673b0d8] | 138 | all the manual pages in the manpath and for each page writes the name and a
|
---|
| 139 | short description in the whatis database.</para>
|
---|
[c6cb3aa] | 140 | </listitem>
|
---|
| 141 | </varlistentry>
|
---|
[6370fa6] | 142 |
|
---|
[b8a819f] | 143 | <varlistentry id="man">
|
---|
| 144 | <term><command>man</command></term>
|
---|
[c6cb3aa] | 145 | <listitem>
|
---|
[673b0d8] | 146 | <indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
|
---|
[c6cb3aa] | 147 | <para>formats and displays the requested on-line manual page.</para>
|
---|
| 148 | </listitem>
|
---|
| 149 | </varlistentry>
|
---|
[673b0d8] | 150 |
|
---|
[b8a819f] | 151 | <varlistentry id="man2dvi">
|
---|
| 152 | <term><command>man2dvi</command></term>
|
---|
[c6cb3aa] | 153 | <listitem>
|
---|
[673b0d8] | 154 | <indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
|
---|
[c6cb3aa] | 155 | <para>converts a manual page into dvi format.</para>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
[673b0d8] | 158 |
|
---|
[b8a819f] | 159 | <varlistentry id="man2html">
|
---|
| 160 | <term><command>man2html</command></term>
|
---|
[c6cb3aa] | 161 | <listitem>
|
---|
[673b0d8] | 162 | <indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
|
---|
[c6cb3aa] | 163 | <para>converts a manual page into html.</para>
|
---|
| 164 | </listitem>
|
---|
| 165 | </varlistentry>
|
---|
[673b0d8] | 166 |
|
---|
[b8a819f] | 167 | <varlistentry id="whatis">
|
---|
| 168 | <term><command>whatis</command></term>
|
---|
[c6cb3aa] | 169 | <listitem>
|
---|
[673b0d8] | 170 | <indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
|
---|
[c6cb3aa] | 171 | <para>searches the whatis database and displays the short descriptions of system
|
---|
| 172 | commands that contain the given keyword as a separate word.</para>
|
---|
| 173 | </listitem>
|
---|
| 174 | </varlistentry>
|
---|
| 175 | </variablelist>
|
---|
[673b0d8] | 176 |
|
---|
| 177 | </sect2>
|
---|
| 178 |
|
---|
| 179 | </sect1>
|
---|