man pages improvement

Giorgos Keramidas keramida at freebsd.org
Mon Sep 3 01:52:30 UTC 2007


On 2007-09-03 00:17, t_ziel <t_ziel at wp.pl> wrote:
> Hello
> Is it possible to improve FreeBSD's man pages usability by removing
> white background?

White background?  Are you referring to the web interface?

I'm reading manpages with:

    % man foo

and there's no background and/or colour support in my terminal :-)

> Some man pages have large chunks of text with background -- for
> example in a man pkg_add there is:
>
> ---begin of example--
> Since the pkg_add command may execute scripts or programs contained
> within a package file, your system may be susceptible to ``trojan
> horses'' or other subtle attacks from miscreants who create dangerous
> package files.
>
> You are advised to verify the competence and identity of those who pro-
> vide installable package files.  For extra protection, use the -M flag to
> extract the package file, and inspect its contents and scripts to ensure
> it poses no danger to your system's integrity.  Pay particular attention
> to any +INSTALL, +POST-INSTALL, +DEINSTALL, +POST-DEINSTALL, +REQUIRE or
> +MTREE_DIRS files, and inspect the +CONTENTS file for @cwd, @mode (check
> for setuid), @dirrm, @exec, and @unexec directives, and/or use the
> pkg_info(1) command to examine the package file.
> ---end of example---
>
> This part of pkg_add man page is hard to read. It would be useful to
> remove white background and replace it with plain white text (without
> changing its color; preserving very light white hue).

My Firefox window uses a white background when I read this page:

  http://www.freebsd.org/cgi/man.cgi?query=pkg_add&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html

My terminal is set up to show "underlined text" with a cyan colour, to
make it stand out from plain text:

  http://people.freebsd.org/~keramida/files/pkg_add.png

What you probably see as "white background" is underlined text, which
xterm will show with "reverse video", unless you configure it otherwise.

You can configure your xterm windows to use any other colour you prefer,
by editing or creating the file .Xresources in your HOME directory.  For
example mine includes (among other settings):

    ! XTerm -- cursor & mouse pointer.
    XTerm*cursorColor: #c0b020
    XTerm*cursorBlink: false
    XTerm*cursorOnTime: 600
    XTerm*cursorOffTime: 400
    XTerm*pointerColor: #a0a0a0
    XTerm*pointerColorBackground: #222222
    XTerm*pointerShape: left_ptr

    ! XTerm -- misc other colours.
    ! XTerm*background: #001d3d
    XTerm*background: #002030
    XTerm*foreground: #a8a8a8
    XTerm*underLine: off
    XTerm*colorULMode: on
    XTerm*colorUL: #00b0c0
    XTerm*boldMode: off
    XTerm*colorBDMode: on
    XTerm*colorBD: #f0f0f0

> For reference you can see for example:
> http://www.redhat.com/docs/manuals/linux/RHL-7-Manual/getting-started-guide/figs/basics/man.gif
> This man page has not a such white background, only plain text and is
> very easy to read and friendly for eyes. I also recommend to see
> OpenBSD's man pages -- very aesthetic and easy to read.

This manpage has underlined text shown as with a proper line displayed
under the text.

You can configure your X11 terminals to show text like this too.

Or you can use settings similar to mine, and display bold text with a
bright white colour, and underlined text with cyan, orange, magenta,
yellow or whatever you prefer :-)

I hope all this helps a bit,

- Giorgos




More information about the freebsd-doc mailing list