Unix administration - Change color of key words in MAN pages

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > August 2005 > Change color of key words in MAN pages





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Change color of key words in MAN pages
adam.petrie@gmail.com

2005-08-25, 6:04 pm

When viewing the man pages of any command on a Linux OS telnetted using
X Windows, the colors seem to be messed up. When trying to view the
parameters of a man page such as:
man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C
config_file]
[-M pathlist] [-P pager] [-S section_list] [section] name ...

They are showing up as a bright yellow and very hard to read. I have
to view the man page by creating a temporary file: man <command> | col
-b > <command>.mantxt

I looked at the config file for the man command (/etc/man.config), but
I don't see any color references being mentioned. How can I change the
default colors the man command uses when displaying a reference?

*PS - Even if I use putty to login to the server, the manual pages
still have weird colors.

Bit Twister

2005-08-25, 6:04 pm

On 25 Aug 2005 12:40:13 -0700, adam.petrie@gmail.com wrote:
> When viewing the man pages of any command on a Linux OS telnetted using
> X Windows, the colors seem to be messed up. When trying to view the
> parameters of a man page such as:


Please read http://www.catb.org/~esr/faqs/smart-questions.html
it would have been nice to give us a man page example to check and which linux.

Guessing you have not set the TERM terminal environment variable.

Guessing you can turn off color in /etc/man.config

Thomas Dickey

2005-08-25, 8:52 pm

Bit Twister <BitTwister@mouse-potato.com> wrote:
> On 25 Aug 2005 12:40:13 -0700, adam.petrie@gmail.com wrote:
[vbcol=seagreen]
> Please read http://www.catb.org/~esr/faqs/smart-questions.html


don't bother (most of the people recommending it need more help than that ;-)

> it would have been nice to give us a man page example to check and which linux.


it doesn't matter (they're all based on groff).

> Guessing you have not set the TERM terminal environment variable.


that's irrelevant for this case - it's hardcoded grotty (well chosen name)

> Guessing you can turn off color in /etc/man.config


finally.

man grotty


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Bit Twister

2005-08-25, 8:52 pm

On Thu, 25 Aug 2005 23:44:33 -0000, Thomas Dickey wrote:
> Bit Twister <BitTwister@mouse-potato.com> wrote:
>
>
> don't bother (most of the people recommending it need more help than that ;-)


But you would be supprised how knowing what linux and version can help.

>
>
> it doesn't matter (they're all based on groff).
>
>
> that's irrelevant for this case


I don't know, I would have thought using xterm would help.

> - it's hardcoded grotty (well chosen name)
>
>
> finally.
>
> man grotty


But in Mandriva 2006 /etc/man.config, we see
# If you have a new troff (version 1.18.1?) and its colored output
# causes problems, add the -c option to TROFF, NROFF, JNROFF.

Then again your can override the colors with .Xresources if using
xterm.
adam.petrie@gmail.com

2005-08-26, 7:55 am

I do have a .Xresources in my .profile as the term is set to xterm. I
tried renaming it to see if that was causing the problem. After going
back in, sure enough, the colors looked different. So, at least now I
now what is causing the difference in the color schemes. All I have to
do is figure out what line(s) is/are causing the problem.

Bill Marcum

2005-08-26, 6:00 pm

On 25 Aug 2005 12:40:13 -0700, adam.petrie@gmail.com
<adam.petrie@gmail.com> wrote:
> When viewing the man pages of any command on a Linux OS telnetted using
> X Windows, the colors seem to be messed up. When trying to view the
> parameters of a man page such as:
> man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C
> config_file]
> [-M pathlist] [-P pager] [-S section_list] [section] name ...
>
> They are showing up as a bright yellow and very hard to read. I have
> to view the man page by creating a temporary file: man <command> | col
> -b > <command>.mantxt
>
> I looked at the config file for the man command (/etc/man.config), but
> I don't see any color references being mentioned. How can I change the
> default colors the man command uses when displaying a reference?
>

It might either your terminal or your $PAGER that is colorizing bold and
underlined(italic) text.


--
Knowledge, sir, should be free to all!
-- Harry Mudd, "I, Mudd", stardate 4513.3
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com