From owner-freebsd-questions Mon Dec 20 16:43:40 1999 Delivered-To: freebsd-questions@freebsd.org Received: from typhoon.mail.pipex.net (typhoon.mail.pipex.net [158.43.128.27]) by hub.freebsd.org (Postfix) with SMTP id 9AA15152DB for ; Mon, 20 Dec 1999 16:43:34 -0800 (PST) (envelope-from mark@dogma.freebsd-uk.eu.org) Received: (qmail 14085 invoked from network); 21 Dec 1999 00:43:32 -0000 Received: from useraj78.uk.uudial.com (HELO marder-1.) (62.188.133.207) by smtp.dial.pipex.com with SMTP; 21 Dec 1999 00:43:32 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.8.8) id AAA00583; Tue, 21 Dec 1999 00:43:29 GMT (envelope-from mark) Date: Tue, 21 Dec 1999 00:43:29 +0000 From: Mark Ovens To: Ben Smithurst , "Alexey N. Dokuchaev" Cc: freebsd-questions Subject: Re: Colour manpages Message-ID: <19991221004329.A454@marder-1> References: <19991220175717.A1054@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <19991220175717.A1054@strontium.scientia.demon.co.uk> Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Dec 20, 1999 at 05:57:17PM +0000, Ben Smithurst wrote: > Alexey N. Dokuchaev wrote: > > > Say I want to change the man colors when I read mans at the console. More > > precisely, I don't like that underlined text shows up as reversed (black > > letter on while(grey,7) backround). How (and where) do I need to say that > > I want, say, yellow on black instead of reversed when displaying > > underlined-supposed-to-be text. Any help is greatly appreciated. > > This is a function of your pager, rather than the "man" program, I > believe. Searching more's manpage for "colou?r" shows nothing, and less' > manpage says the --color option is for MS-DOS only. If you're using > another pager, check it's documentation, if you're currently using > more or less you may have to find another pager (or write something > yourself). > Actually, it's a combination of the function of the pager *and* the termcap entry for that terminal. The text that appears in inverse video on the console is underlined (f^H_o^H_o^H_ in the output from man(1)) and appears as such in an xterm. The termcap(5) entry for the console (cons25) has no underline attributes defined and in /usr/src/usr.bin/more/screen.c if there is no underline attribute defined for the terminal it uses "standout mode", i.e. inverse video. If Alexey wants underlining to appear as yellow on black as he says then in /usr/share/misc/termcap change the line :tc=cons25w: in the definition of cons25|ansis|ansi80x25:\ to :us=\E[40;34;1m:ue=\E[m:tc=cons25w: ^^ ^^ || fg colour || bg colour then, as root, run ``cd /usr/share/misc ; cap_mkdb termcap'' and then try ``man chmod'' on the console. For a visual "list" of colour combinations, run this script (the numbers along the top of the display are the bg colours and the ones at the left are the fg colours): #!/bin/sh # Display ANSI colours. # esc="\033[" echo -e "\t 40\t 41\t 42\t 43\t 44 45\t46\t 47" for fore in 30 31 32 33 34 35 36 37; do line1="$fore " line2=" " for back in 40 41 42 43 44 45 46 47; do line1="${line1}${esc}${back};${fore}m Normal ${esc}0m" line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m" done echo -e "$line1\n$line2" done HTH > -- > Ben Smithurst | PGP: 0x99392F7D > ben@scientia.demon.co.uk | key available from keyservers and > | ben+pgp@scientia.demon.co.uk > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- "there's a long-standing bug relating to the x86 architecture that allows you to install Windows too ;" -Matthew D. Fuller ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message