source: chapter06/man.xml@ 0e9a9e2

6.0
Last change on this file since 0e9a9e2 was 0e9a9e2, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Fixed some tags and validation issues.

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

  • Property mode set to 100644
File size: 6.6 KB
RevLine 
[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]>
[752f4e5]6<sect1 id="ch-system-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,
[69993f4]24Glibc, Grep, Make, and Sed</seg></seglistitem>
[a001133]25</segmentedlist>
26</sect2>
[3554fa3a]27
[a001133]28<sect2 role="installation">
[73aedd1d]29<title>Installation of Man</title>
30
[ef13657]31<para>Three adjustments need to be made to the sources of Man.</para>
[73aedd1d]32
[ef13657]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>
[73aedd1d]36
[c8ba565]37<screen><userinput>patch -Np1 -i ../man-&man-version;-80cols-1.patch</userinput></screen>
[73aedd1d]38
[ef13657]39<para>The second is a sed substitution to add the
[752f4e5]40<parameter>-R</parameter> switch to the <envar>PAGER</envar>
[ef13657]41variable so that escape sequences are properly handled by Less:</para>
[73aedd1d]42
[8dffa04]43<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
[73aedd1d]44
[ef13657]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>
[73aedd1d]49
[2ec4b60]50<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
[37dcf2a]51
[ef13657]52<para>Prepare Man for compilation:</para>
[73aedd1d]53
[e5f8a42]54<screen><userinput>./configure -confdir=/etc</userinput></screen>
[73aedd1d]55
56<para>The meaning of the configure options:</para>
57
[df8334f]58<variablelist>
59<varlistentry>
[ef57e3b]60<term><parameter>-confdir=/etc</parameter></term>
[ef13657]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>
[df8334f]64</varlistentry>
65</variablelist>
[73aedd1d]66
67<para>Compile the package:</para>
68
69<screen><userinput>make</userinput></screen>
70
[ef13657]71<para>Install the package:</para>
[73aedd1d]72
73<screen><userinput>make install</userinput></screen>
74
[ef13657]75<note><para>To disable Select Graphic Rendition (SGR) escape
[69993f4]76sequences, edit the <filename>man.conf</filename> file and
[ef13657]77add the <parameter>-c</parameter> switch to
[752f4e5]78the <envar>NROFF</envar> variable.</para></note>
[73aedd1d]79
[69993f4]80<para>If the character set uses 8-bit characters, search for the line
[ef13657]81beginning with <quote>NROFF</quote> in
82<filename>/etc/man.conf</filename>, and verify that it looks as
83follows:</para>
[b32e803]84
85<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
86
[ef13657]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
[69993f4]90characters outside International Organization for Standards
91(ISO) 8859-1 without some strange escape codes. When formatting manual
92pages, <command>groff</command> thinks that they are in the ISO 8859-1
93encoding and this <parameter>-Tlatin1</parameter> switch tells
94<command>groff</command> to use the same encoding for output. Since
95<command>groff</command> does no recoding of input characters, the
96formatted result is really in the same encoding as input, and therefore
97it is usable as the input for a pager.</para>
[ef13657]98
99<para>This does not solve the problem of a non-working
100<command>man2dvi</command> program for localized manual pages in
[69993f4]101non-ISO 8859-1 locales. Also, it does not work with multibyte
[ef13657]102character sets. The first problem does not currently have a solution.
[69993f4]103The second issue is not of concern because the LFS installation does
[ef13657]104not support multibyte character sets.</para>
105
[38bb44a]106<para>Additional information with regards to the compression of
107man&mdash;and info&mdash;pages can be found in the BLFS book at
108<phrase condition="html"><ulink
109url="&blfs-root;view/cvs/postlfs/compressdoc.html"/></phrase>
[0e9a9e2]110<phrase condition="pdf"><ulink
111url="&blfs-root;view/cvs/postlfs/compressdoc.html">http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/
112compressdoc.html</ulink></phrase>.</para>
[73aedd1d]113
[0e9a9e2]114<beginpage/>
[73aedd1d]115</sect2>
[6370fa6]116
[5888299]117
[c6cb3aa]118<sect2 id="contents-man" role="content"><title>Contents of Man</title>
[673b0d8]119
[c6cb3aa]120<segmentedlist>
121<segtitle>Installed programs</segtitle>
122<seglistitem><seg>apropos, makewhatis, man,
[69993f4]123man2dvi, man2html, and whatis</seg></seglistitem>
[c6cb3aa]124</segmentedlist>
[673b0d8]125
[3ed279f]126<variablelist><bridgehead renderas="sect3">Short descriptions</bridgehead>
127<?dbfo list-presentation="list"?>
[673b0d8]128
[b8a819f]129<varlistentry id="apropos">
130<term><command>apropos</command></term>
[c6cb3aa]131<listitem>
[ef13657]132<para>searches the whatis database and displays the short descriptions
133of system commands that contain a given string.</para>
[3ed279f]134<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
[c6cb3aa]135</listitem>
136</varlistentry>
[673b0d8]137
[b8a819f]138<varlistentry id="makewhatis">
139<term><command>makewhatis</command></term>
[c6cb3aa]140<listitem>
[ef13657]141<para>builds the whatis database. It reads all the manual pages in the
142manpath and writes the name and a short description in the whatis
143database for each page.</para>
[3ed279f]144<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
[c6cb3aa]145</listitem>
146</varlistentry>
[6370fa6]147
[b8a819f]148<varlistentry id="man">
149<term><command>man</command></term>
[c6cb3aa]150<listitem>
151<para>formats and displays the requested on-line manual page.</para>
[3ed279f]152<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
[c6cb3aa]153</listitem>
154</varlistentry>
[673b0d8]155
[b8a819f]156<varlistentry id="man2dvi">
157<term><command>man2dvi</command></term>
[c6cb3aa]158<listitem>
159<para>converts a manual page into dvi format.</para>
[3ed279f]160<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
[c6cb3aa]161</listitem>
162</varlistentry>
[673b0d8]163
[b8a819f]164<varlistentry id="man2html">
165<term><command>man2html</command></term>
[c6cb3aa]166<listitem>
[69993f4]167<para>converts a manual page into HTML.</para>
[3ed279f]168<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
[c6cb3aa]169</listitem>
170</varlistentry>
[673b0d8]171
[b8a819f]172<varlistentry id="whatis">
173<term><command>whatis</command></term>
[c6cb3aa]174<listitem>
[ef13657]175<para>searches the whatis database and displays the short descriptions
176of system commands that contain the given keyword as a separate
177word.</para>
[3ed279f]178<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
[c6cb3aa]179</listitem>
180</varlistentry>
181</variablelist>
[673b0d8]182
183</sect2>
184
185</sect1>
[ef13657]186
Note: See TracBrowser for help on using the repository browser.