Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken MAN pages??? Control Characters?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
PopeJohnPaulII
n00b
n00b


Joined: 25 Sep 2007
Posts: 23

PostPosted: Mon Mar 03, 2008 3:24 am    Post subject: Broken MAN pages??? Control Characters? Reply with quote

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.
Back to top
View user's profile Send private message
didl
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 1106
Location: Pittsburgh, PA

PostPosted: Mon Mar 03, 2008 11:04 am    Post subject: Reply with quote

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:
NROFF          /usr/bin/nroff -mandoc

to
Code:
NROFF          /usr/bin/nroff -mandoc -c

either in /etc/man.conf or in a local ~/.man.conf
that can then be source via
Code:
alias man='man -C ~/.man.conf'
Back to top
View user's profile Send private message
PopeJohnPaulII
n00b
n00b


Joined: 25 Sep 2007
Posts: 23

PostPosted: Tue Mar 04, 2008 2:36 am    Post subject: Reply with quote

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:
...
# 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
Back to top
View user's profile Send private message
didl
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 1106
Location: Pittsburgh, PA

PostPosted: Fri Mar 07, 2008 1:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
mzq
n00b
n00b


Joined: 11 Feb 2008
Posts: 4

PostPosted: Thu May 01, 2008 10:36 am    Post subject: Reply with quote

Hello,

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

Code:

TROFF       /usr/bin/groff -Tps -mandoc -c
NROFF       /usr/bin/nroff -mandoc -c -Tlatin1
JNROFF      /usr/bin/groff -Tnippon -mandocj -c
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7232
Location: almost Mile High in the USA

PostPosted: Sun May 25, 2008 7:28 pm    Post subject: Reply with quote

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@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pumpichank
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 81

PostPosted: Sat Nov 08, 2008 10:40 pm    Post subject: "man ls" is garbage; "info ls" works... Reply with quote

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

Thanks!
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9273

PostPosted: Sun Nov 09, 2008 12:35 am    Post subject: Reply with quote

Are you referring to escape characters being displayed instead of functioning in their canonical roles?
Back to top
View user's profile Send private message
pumpichank
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 81

PostPosted: Sun Nov 09, 2008 12:58 pm    Post subject: Reply with quote

Yep! Note that this happens

  • on a remote console using Terminal.app (mac)
  • on a remote gnome terminal
  • at the machine's console
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9273

PostPosted: Mon Nov 10, 2008 4:24 am    Post subject: Reply with quote

Merged the above three posts.
Back to top
View user's profile Send private message
pumpichank
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 81

PostPosted: Mon Nov 10, 2008 12:26 pm    Post subject: Reply with quote

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

/var/cache/man
Back to top
View user's profile Send private message
metalus
n00b
n00b


Joined: 09 May 2004
Posts: 52

PostPosted: Wed Feb 04, 2009 2:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
pumpichank
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 81

PostPosted: Wed Feb 04, 2009 2:48 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1403
Location: Adelaide/Australia

PostPosted: Thu Feb 05, 2009 8:43 am    Post subject: Reply with quote

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

PAGER           /usr/bin/less -is

to
Code:

PAGER           /usr/bin/less -isR


my problems went away.

Alternatively, you could set your environment variables in a similar way.
_________________
...Lyall
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Thu Feb 05, 2009 4:33 pm    Post subject: Reply with quote

I get the ESC characters when I run man as root, running as non root doesn't cause any problems.
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1403
Location: Adelaide/Australia

PostPosted: Sat Feb 07, 2009 4:40 am    Post subject: Reply with quote

You probably have PAGER or MANPAGER set in one of the your profiles.
_________________
...Lyall
Back to top
View user's profile Send private message
revertTS
n00b
n00b


Joined: 21 Jan 2008
Posts: 11

PostPosted: Tue Feb 10, 2009 3:28 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9273

PostPosted: Tue Feb 10, 2009 4:13 am    Post subject: Reply with quote

Have you cleared out the cached versions?
Back to top
View user's profile Send private message
revertTS
n00b
n00b


Joined: 21 Jan 2008
Posts: 11

PostPosted: Tue Feb 10, 2009 5:48 am    Post subject: Reply with quote

desultory wrote:
Have you cleared out the cached versions?


Yes, I have.
This might be a bit of a different problem, actually.
The specific error I get is:
Code:
/usr/share/groff/1.20.1/tmac/doc.tmac:3375: bad character definition

The line referenced is:
Code:
.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.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue Feb 10, 2009 4:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
revertTS
n00b
n00b


Joined: 21 Jan 2008
Posts: 11

PostPosted: Wed Feb 11, 2009 3:36 pm    Post subject: Reply with quote

Ah yes, it is on all my systems. Before I had checked on one that wasn't fully updated.
Back to top
View user's profile Send private message
pumpichank
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 81

PostPosted: Mon Feb 16, 2009 1:35 pm    Post subject: Reply with quote

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?! :)
Back to top
View user's profile Send private message
gohmdoree
Guru
Guru


Joined: 12 Oct 2004
Posts: 533

PostPosted: Thu Feb 26, 2009 6:53 am    Post subject: Man pages with ESC chars Reply with quote

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

Code:

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:

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"
Back to top
View user's profile Send private message
makism
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2007
Posts: 85

PostPosted: Thu Feb 26, 2009 8:29 am    Post subject: Reply with quote

i`m having the same issue when i do:

Code:
sudo su

Code:
man somemanpage
Back to top
View user's profile Send private message
jcornez
Apprentice
Apprentice


Joined: 12 Jan 2006
Posts: 201
Location: Spain

PostPosted: Thu Feb 26, 2009 10:12 am    Post subject: Reply with quote

This was just recently discussed:

https://forums.gentoo.org/viewtopic-t-670013.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum