source: chapter06/man.xml@ 96e8f71

6.0
Last change on this file since 96e8f71 was 3ed279f, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Tags changes in the contents sections to make a better print output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4009 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.4 KB
Line 
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]>
6<sect1 id="ch-system-man" xreflabel="Man" role="wrap">
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>
11
12<sect2 role="package"><title/>
13<para>The Man package contains programs for finding and viewing manual pages.</para>
14
15<segmentedlist>
16<segtitle>&buildtime;</segtitle>
17<segtitle>&diskspace;</segtitle>
18<seglistitem><seg>0.1 SBU</seg><seg>1.9MB</seg></seglistitem>
19</segmentedlist>
20
21<segmentedlist>
22<segtitle>Man installation depends on</segtitle>
23<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
24Glibc, Grep, Make, Sed</seg></seglistitem>
25</segmentedlist>
26</sect2>
27
28<sect2 role="installation">
29<title>Installation of Man</title>
30
31<para>Three adjustments need to be made to the sources of Man.</para>
32
33<para>The first is a patch which allows Man to work better with recent
34releases of Groff. In particular, man pages will now display using the
35full terminal width instead of being limited to 80 characters:</para>
36
37<screen><userinput>patch -Np1 -i ../man-&man-version;-80cols-1.patch</userinput></screen>
38
39<para>The second is a sed substitution to add the
40<parameter>-R</parameter> switch to the <emphasis>PAGER</emphasis>
41variable so that escape sequences are properly handled by Less:</para>
42
43<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
44
45<para>The third is also a sed substitution to comment out the
46<quote>MANPATH /usr/man</quote> line in the
47<filename>man.conf</filename> file to prevent redundant results when
48using programs such as <command>whatis</command>:</para>
49
50<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
51
52<para>Prepare Man for compilation:</para>
53
54<screen><userinput>./configure -confdir=/etc</userinput></screen>
55
56<para>The meaning of the configure options:</para>
57
58<variablelist>
59<varlistentry>
60<term><parameter>-confdir=/etc</parameter></term>
61<listitem><para>This tells the man program to look for the
62<filename>man.conf</filename> configuration file in the <filename
63class="directory">/etc</filename> directory.</para></listitem>
64</varlistentry>
65</variablelist>
66
67<para>Compile the package:</para>
68
69<screen><userinput>make</userinput></screen>
70
71<para>Install the package:</para>
72
73<screen><userinput>make install</userinput></screen>
74
75<note><para>To disable Select Graphic Rendition (SGR) escape
76sequences, you should edit the <filename>man.conf</filename> file and
77add the <parameter>-c</parameter> switch to
78the <quote>NROFF</quote> variable.</para></note>
79
80<para>If your character set uses 8-bit characters, search for the line
81beginning with <quote>NROFF</quote> in
82<filename>/etc/man.conf</filename>, and verify that it looks as
83follows:</para>
84
85<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
86
87<para>Note that <quote>latin1</quote> should be used even if it is not
88the character set of the locale. The reason is that, according to the
89specification, <command>groff</command> has no means of typesetting
90characters outside ISO-8859-1 without some strange escape codes. When
91formatting manual pages, <command>groff</command> thinks that they are
92in the ISO-8859-1 encoding and this <parameter>-Tlatin1</parameter>
93switch tells <command>groff</command> to use the same encoding for
94output. Since <command>groff</command> does no recoding of input
95characters, the formatted result is really in the same encoding as
96input and therefore it is usable as the input for a pager.</para>
97
98<para>This does not solve the problem of a non-working
99<command>man2dvi</command> program for localized manual pages in
100non-ISO-8859-1 locales. Also, it does not work with multibyte
101character sets. The first problem does not currently have a solution.
102The second issue is not of a concern because the LFS installation does
103not support multibyte character sets.</para>
104
105<para>Users can also refer to the BLFS page at <ulink
106url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
107formatting and compression issues for man pages.</para>
108
109</sect2>
110
111
112<sect2 id="contents-man" role="content"><title>Contents of Man</title>
113
114<segmentedlist>
115<segtitle>Installed programs</segtitle>
116<seglistitem><seg>apropos, makewhatis, man,
117man2dvi, man2html and whatis</seg></seglistitem>
118</segmentedlist>
119
120<variablelist><bridgehead renderas="sect3">Short descriptions</bridgehead>
121<?dbfo list-presentation="list"?>
122
123<varlistentry id="apropos">
124<term><command>apropos</command></term>
125<listitem>
126<para>searches the whatis database and displays the short descriptions
127of system commands that contain a given string.</para>
128<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
129</listitem>
130</varlistentry>
131
132<varlistentry id="makewhatis">
133<term><command>makewhatis</command></term>
134<listitem>
135<para>builds the whatis database. It reads all the manual pages in the
136manpath and writes the name and a short description in the whatis
137database for each page.</para>
138<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
139</listitem>
140</varlistentry>
141
142<varlistentry id="man">
143<term><command>man</command></term>
144<listitem>
145<para>formats and displays the requested on-line manual page.</para>
146<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
147</listitem>
148</varlistentry>
149
150<varlistentry id="man2dvi">
151<term><command>man2dvi</command></term>
152<listitem>
153<para>converts a manual page into dvi format.</para>
154<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
155</listitem>
156</varlistentry>
157
158<varlistentry id="man2html">
159<term><command>man2html</command></term>
160<listitem>
161<para>converts a manual page into html.</para>
162<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
163</listitem>
164</varlistentry>
165
166<varlistentry id="whatis">
167<term><command>whatis</command></term>
168<listitem>
169<para>searches the whatis database and displays the short descriptions
170of system commands that contain the given keyword as a separate
171word.</para>
172<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
173</listitem>
174</varlistentry>
175</variablelist>
176
177</sect2>
178
179</sect1>
180
Note: See TracBrowser for help on using the repository browser.