Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Broken MAN pages??? Control Characters?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
30 posts
  • 1
  • 2
  • Next
Author
Message
PopeJohnPaulII
n00b
n00b
User avatar
Posts: 23
Joined: Tue Sep 25, 2007 7:27 pm

Broken MAN pages??? Control Characters?

  • Quote

Post by PopeJohnPaulII » Mon Mar 03, 2008 3:24 am

I'm not sure if the problem is with my terminals or with my man pages, but whenever I do man [some-command] the man pages appear with control characters (i.e. ESC[1m ). They appear this way in both terminal (xfce terminal) and xterm, however they display nicely in Eterm. Anyone know how to fix this problem, it makes checking man pages a real pain.

If you need any more information just let me know.
Top
didl
Retired Dev
Retired Dev
User avatar
Posts: 1106
Joined: Tue Sep 09, 2003 11:01 pm
Location: Pittsburgh, PA

  • Quote

Post by didl » Mon Mar 03, 2008 11:04 am

I had the same problem using rxvt-unicode on one of my machines
and the reason seems to be that the "-c" flag was removed
from /etc/man.conf in the latest man ebuild.
You can fix this by changing

Code: Select all

NROFF          /usr/bin/nroff -mandoc
to

Code: Select all

NROFF          /usr/bin/nroff -mandoc -c
either in /etc/man.conf or in a local ~/.man.conf
that can then be source via

Code: Select all

alias man='man -C ~/.man.conf'
Top
PopeJohnPaulII
n00b
n00b
User avatar
Posts: 23
Joined: Tue Sep 25, 2007 7:27 pm

  • Quote

Post by PopeJohnPaulII » Tue Mar 04, 2008 2:36 am

Nice, that sort of worked, some of the man pages got fixed.
Man pages for stuff like bash, zsh, ypserv, ls, ps, zip, zgrep; these all seem to be working.
However a few man pages still show up weird, for example; man, znew, cmatrix, pinger, basename

Below is my man.conf, not sure what to do, but it is an improvement so far

/etc/man.conf

Code: Select all

...
# Useful paths - note that COL should not be defined when
# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
# not only is it superfluous, but it actually damages the output.
# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
#
# If you have a new troff (version 1.18.1?) and its colored output
# causes problems, add the -c option to TROFF, NROFF, JNROFF.
#
TROFF           /usr/bin/groff -Tps -mandoc -c
NROFF           /usr/bin/nroff -mandoc -c
JNROFF          /usr/bin/groff -Tnippon -mandocj -c
...
Kernel: 2.6.24-zen3
User:PopeJohnPaulII @ Gentoo-Wiki
Top
didl
Retired Dev
Retired Dev
User avatar
Posts: 1106
Joined: Tue Sep 09, 2003 11:01 pm
Location: Pittsburgh, PA

  • Quote

Post by didl » Fri Mar 07, 2008 1:59 pm

I am not sure what the problem could be in this case. After
adding "-c" all man pages show up fine for me, even the
ones you mentioned.
Top
mzq
n00b
n00b
Posts: 4
Joined: Mon Feb 11, 2008 9:15 am

  • Quote

Post by mzq » Thu May 01, 2008 10:36 am

Hello,

I had the same problem here. The following worked for me:

Code: Select all

TROFF       /usr/bin/groff -Tps -mandoc -c
NROFF       /usr/bin/nroff -mandoc -c -Tlatin1
JNROFF      /usr/bin/groff -Tnippon -mandocj -c
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Sun May 25, 2008 7:28 pm

make sure you remove the cached versions of your man pages in /var/man/cat*/*

Also, if you changed the env variable $LESS, it seems that -R is now a "default" which will work with nroff without -c ...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
pumpichank
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Jul 28, 2005 3:20 pm

"man ls" is garbage; "info ls" works...

  • Quote

Post by pumpichank » Sat Nov 08, 2008 10:40 pm

Why does "man whatever" look terrible but "info whatever" looks okay?

Thanks!
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Sun Nov 09, 2008 12:35 am

Are you referring to [topic=670013]escape[/topic] characters being displayed instead of functioning in their canonical roles?
Top
pumpichank
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Jul 28, 2005 3:20 pm

  • Quote

Post by pumpichank » Sun Nov 09, 2008 12:58 pm

Yep! Note that this happens
  • on a remote console using Terminal.app (mac)
  • on a remote gnome terminal
  • at the machine's console
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Mon Nov 10, 2008 4:24 am

Merged the above three posts.
Top
pumpichank
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Jul 28, 2005 3:20 pm

  • Quote

Post by pumpichank » Mon Nov 10, 2008 12:26 pm

Thanks, that fixed things. Note though that the man cache is now

/var/cache/man
Top
metalus
n00b
n00b
Posts: 52
Joined: Sun May 09, 2004 1:45 am

  • Quote

Post by metalus » Wed Feb 04, 2009 2:25 pm

Recently, I added LESS=-X to my .bashrc so my terminal would not be blanked after I read a man page. Unfortunately, that screwed up man pages. It took me an hour to realize that by doing so, I had overwritten the value set in /etc/profile.env for LESS. After I restored that value for LESS, man pages became readable again.
Top
pumpichank
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Jul 28, 2005 3:20 pm

  • Quote

Post by pumpichank » Wed Feb 04, 2009 2:48 pm

metalus wrote:Recently, I added LESS=-X to my .bashrc so my terminal would not be blanked after I read a man page. Unfortunately, that screwed up man pages. It took me an hour to realize that by doing so, I had overwritten the value set in /etc/profile.env for LESS. After I restored that value for LESS, man pages became readable again.
Interesting. I've had LESS=-X in my bash profile for a bajillion years and haven't noticed a problem with it.
Top
lyallp
Veteran
Veteran
User avatar
Posts: 1655
Joined: Thu Jul 15, 2004 12:07 am
Location: Adelaide/Australia
Contact:
Contact lyallp
Website

  • Quote

Post by lyallp » Thu Feb 05, 2009 8:43 am

I found that if I changed /etc/man.conf

Code: Select all

PAGER           /usr/bin/less -is
to

Code: Select all

PAGER           /usr/bin/less -isR
my problems went away.

Alternatively, you could set your environment variables in a similar way.
...Lyall
Top
jordanwb
l33t
l33t
User avatar
Posts: 642
Joined: Thu Jul 10, 2008 10:28 pm
Location: Ottawa, Canada

  • Quote

Post by jordanwb » Thu Feb 05, 2009 4:33 pm

I get the ESC characters when I run man as root, running as non root doesn't cause any problems.
Top
lyallp
Veteran
Veteran
User avatar
Posts: 1655
Joined: Thu Jul 15, 2004 12:07 am
Location: Adelaide/Australia
Contact:
Contact lyallp
Website

  • Quote

Post by lyallp » Sat Feb 07, 2009 4:40 am

You probably have PAGER or MANPAGER set in one of the your profiles.
...Lyall
Top
revertTS
n00b
n00b
Posts: 11
Joined: Mon Jan 21, 2008 12:16 am

  • Quote

Post by revertTS » Tue Feb 10, 2009 3:28 am

I seem to be getting this on a very small subset of man pages, namely ssh related ones.

For those of you who have it working properly, do the ssh pages also display without a groff error?
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Tue Feb 10, 2009 4:13 am

Have you cleared out the [post=5103866]cached[/post] [post=5276337]versions[/post]?
Top
revertTS
n00b
n00b
Posts: 11
Joined: Mon Jan 21, 2008 12:16 am

  • Quote

Post by revertTS » Tue Feb 10, 2009 5:48 am

desultory wrote:Have you cleared out the [post=5103866]cached[/post] [post=5276337]versions[/post]?
Yes, I have.
This might be a bit of a different problem, actually.
The specific error I get is:

Code: Select all

/usr/share/groff/1.20.1/tmac/doc.tmac:3375: bad character definition
The line referenced is:

Code: Select all

.char \- \N'45'
It only seems to affect BSD man pages (OpenSSH, leave, etc.) and my other Gentoo systems don't have the same problem.
Top
cwr
Veteran
Veteran
Posts: 1969
Joined: Sat Dec 17, 2005 11:17 am

  • Quote

Post by cwr » Tue Feb 10, 2009 4:56 pm

I found various bugs in the BSD man pages; I assumed they were caused
by changes in nroff/troff/roff or the macro packages or whatever. I just
edited them out and re-compressed the pages. But i don't know why
you would have different problems on different systems; the problems
I saw were stable.

Will
Top
revertTS
n00b
n00b
Posts: 11
Joined: Mon Jan 21, 2008 12:16 am

  • Quote

Post by revertTS » Wed Feb 11, 2009 3:36 pm

Ah yes, it is on all my systems. Before I had checked on one that wasn't fully updated.
Top
pumpichank
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Jul 28, 2005 3:20 pm

  • Quote

Post by pumpichank » Mon Feb 16, 2009 1:35 pm

I just emerged up to man 1.6f-r3. The $*ROFF settings of adding -c no longer work, but adding -R to less for $PAGER does work. Can we please stop changing this?! :)
Top
gohmdoree
Guru
Guru
Posts: 533
Joined: Tue Oct 12, 2004 6:48 am

Man pages with ESC chars

  • Quote

Post by gohmdoree » Thu Feb 26, 2009 6:53 am

Not sure when this occurred, but noticed that my man pages are filled with ESC chars :

Code: Select all

ESC[1mNAMEESC[0m
       ls - list directory contents

ESC[1mSYNOPSISESC[0m
       ESC[1mls ESC[22m[ESC[4mOPTIONESC[24m]... [ESC[4mFILEESC[24m]...

ESC[1mDESCRIPTIONESC[0m
       List  information  about  the FILEs (the current directory by default).
       Sort entries alphabetically if none of ESC[1m-cftuvSUX ESC[22mnor ESC[1m--sortESC[22m.

       Mandatory arguments to long options are  mandatory  for  short  options
       too.

       ESC[1m-aESC[22m, ESC[1m--allESC[0m
              do not ignore entries starting with .

       ESC[1m-AESC[22m, ESC[1m--almost-allESC[0m
              do not list implied . and ..

       ESC[1m--authorESC[0m
Do I need to regenerate my man files? Is it a result of some setting?

My use from make.conf :

Code: Select all

USE="-* apache2 bash-completion bzip2 caps cgi chpax cli crypt ctype dba extensions fastcgi foomaticdb gd gif hardened imagemagick jpeg lib libg++ loop-aes mysql ncurses nls nptl nptlonly openssl pax-utils pcre perl php pic pie 
png python readline ruby session sieve snmp ssl suhosin tcpd tls unicode unzip vhosts xml xsl zip zlib pam cracklib"
Top
makism
Tux's lil' helper
Tux's lil' helper
Posts: 85
Joined: Wed Oct 24, 2007 3:10 pm

  • Quote

Post by makism » Thu Feb 26, 2009 8:29 am

i`m having the same issue when i do:

Code: Select all

sudo su

Code: Select all

man somemanpage
Top
jcornez
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 12, 2006 8:51 pm
Location: Spain
Contact:
Contact jcornez
Website

  • Quote

Post by jcornez » Thu Feb 26, 2009 10:12 am

This was just recently discussed:

http://forums.gentoo.org/viewtopic-t-670013.html
Top
Post Reply

30 posts
  • 1
  • 2
  • Next

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic