man.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. <!ENTITY % patches-entities SYSTEM "../patches.ent">
  5. %general-entities;
  6. %patches-entities;
  7. ]>
  8. <sect1 id="ch-system-man" role="wrap">
  9. <title>Man-&man-version;</title>
  10. <?dbhtml filename="man.html"?>
  11. <indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
  12. <sect2 role="package"><title/>
  13. <para>The Man package contains programs for finding and viewing manual pages.</para>
  14. <segmentedlist>
  15. <segtitle>&buildtime;</segtitle>
  16. <segtitle>&diskspace;</segtitle>
  17. <seglistitem><seg>0.1 SBU</seg><seg>2.9 MB</seg></seglistitem>
  18. </segmentedlist>
  19. <segmentedlist>
  20. <segtitle>&dependencies;</segtitle>
  21. <seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
  22. Glibc, Grep, Make, and Sed</seg></seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Man</title>
  27. <para>Two adjustments need to be made to the sources of Man.</para>
  28. <para>The first is a <command>sed</command> substitution to add the
  29. <parameter>-R</parameter> switch to the <envar>PAGER</envar>
  30. variable so that escape sequences are properly handled by Less:</para>
  31. <screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
  32. <para>The second is also a <command>sed</command> substitution to comment out the
  33. <quote>MANPATH /usr/man</quote> line in the
  34. <filename>man.conf</filename> file to prevent redundant results when
  35. using programs such as <command>whatis</command>:</para>
  36. <screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
  37. <para>Prepare Man for compilation:</para>
  38. <screen><userinput>./configure -confdir=/etc</userinput></screen>
  39. <para>The meaning of the configure options:</para>
  40. <variablelist>
  41. <varlistentry>
  42. <term><parameter>-confdir=/etc</parameter></term>
  43. <listitem><para>This tells the <command>man</command> program to look for the
  44. <filename>man.conf</filename> configuration file in the <filename
  45. class="directory">/etc</filename> directory.</para></listitem>
  46. </varlistentry>
  47. </variablelist>
  48. <para>Compile the package:</para>
  49. <screen><userinput>make</userinput></screen>
  50. <para>Install the package:</para>
  51. <screen><userinput>make install</userinput></screen>
  52. <note><para>If you will be working on a terminal that does not support text
  53. attributes such as color and bold, you can disable Select Graphic Rendition
  54. (SGR) escape sequences by editing the <filename>man.conf</filename> file and
  55. adding the <parameter>-c</parameter> option to the <envar>NROFF</envar>
  56. variable. If you use multiple terminal types for one computer it may be better
  57. to selectively add the <envar>GROFF_NO_SGR</envar> environment variable for the
  58. terminals that do not support SGR.</para></note>
  59. <para>If the character set of the locale uses 8-bit characters, search for the
  60. line beginning with <quote>NROFF</quote> in <filename>/etc/man.conf</filename>,
  61. and verify that it matches the following:</para>
  62. <screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
  63. <para>Note that <quote>latin1</quote> should be used even if it is not
  64. the character set of the locale. The reason is that, according to the
  65. specification, <command>groff</command> has no means of typesetting
  66. characters outside International Organization for Standards
  67. (ISO) 8859-1 without some strange escape codes. When formatting manual
  68. pages, <command>groff</command> thinks that they are in the ISO 8859-1
  69. encoding and this <parameter>-Tlatin1</parameter> switch tells
  70. <command>groff</command> to use the same encoding for output. Since
  71. <command>groff</command> does no recoding of input characters, the
  72. formatted result is really in the same encoding as input, and therefore
  73. it is usable as the input for a pager.</para>
  74. <para>This does not solve the problem of a non-working
  75. <command>man2dvi</command> program for localized manual pages in
  76. non-ISO 8859-1 locales. Also, it does not work with multibyte
  77. character sets. The first problem does not currently have a solution.
  78. The second issue is not of concern because the LFS installation does
  79. not support multibyte character sets.</para>
  80. <para>Additional information with regards to the compression of
  81. man and info pages can be found in the BLFS book at
  82. <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
  83. </sect2>
  84. <sect2 id="contents-man" role="content"><title>Contents of Man</title>
  85. <segmentedlist>
  86. <segtitle>Installed programs</segtitle>
  87. <seglistitem><seg>apropos, makewhatis, man,
  88. man2dvi, man2html, and whatis</seg></seglistitem>
  89. </segmentedlist>
  90. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  91. <?dbfo list-presentation="list"?>
  92. <?dbhtml list-presentation="table"?>
  93. <varlistentry id="apropos">
  94. <term><command>apropos</command></term>
  95. <listitem>
  96. <para>Searches the whatis database and displays the short descriptions
  97. of system commands that contain a given string</para>
  98. <indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="makewhatis">
  102. <term><command>makewhatis</command></term>
  103. <listitem>
  104. <para>Builds the whatis database; it reads all the manual pages in the
  105. manpath and writes the name and a short description in the whatis
  106. database for each page</para>
  107. <indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="man">
  111. <term><command>man</command></term>
  112. <listitem>
  113. <para>Formats and displays the requested on-line manual page</para>
  114. <indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="man2dvi">
  118. <term><command>man2dvi</command></term>
  119. <listitem>
  120. <para>Converts a manual page into dvi format</para>
  121. <indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
  122. </listitem>
  123. </varlistentry>
  124. <varlistentry id="man2html">
  125. <term><command>man2html</command></term>
  126. <listitem>
  127. <para>Converts a manual page into HTML</para>
  128. <indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry id="whatis">
  132. <term><command>whatis</command></term>
  133. <listitem>
  134. <para>Searches the whatis database and displays the short descriptions
  135. of system commands that contain the given keyword as a separate
  136. word</para>
  137. <indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
  138. </listitem>
  139. </varlistentry>
  140. </variablelist>
  141. </sect2>
  142. </sect1>