Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ever since i installed gentoo i had a niggle about bash (i think it's bash... not really sure who's fault it is) where rather than formatting a manpage like http://thirtythreeandathird.net/goodman.png which happens if i ssh to my server and look at a man page, i get something like http://thirtythreeandathird.net/badman.png . From what i can gather the $COLUMNS variable is not being reported correctly inside a shell script or something in that vein as it happens with other scripts too, such as http://thirtythreeandathird.net/scrollbar from the bash examples scripts. Some *very* vaguely related threads on the net point a finger at readline, but that's not exactly my problem....
any ideas??
Last edited by acid_kewpie; 05-12-2003 at 05:53 PM.
I had the same problem a year ago. The problem/solution is in man itself (would you believe 'man man' for more info?). The command is something like 'man -c <command>' to reformat the display. Anyhow, try 'man man' or 'info man' for more info.
man pages were the best example i could think of, but it is in other areas too, on any shell, i'ev looked through the man pages and fiddled with -c, nada....
don't know if my post was cofusing tink, but it's the local terminal that is formatted badly, not the remote one...
Last edited by acid_kewpie; 05-13-2003 at 12:19 PM.
what I meant is: what is your local terminal
identifying itself as?
eg ... if I telnet (yeah, I know, it's not my fault)
to one of our Dec unix hosts and do a man
it comes back to me telling me my terminal
of type linux is unknown and thus isn't fully
functional. When I locally start a xterm -ti linux&,
and do a man man, I get a horribly garbled output :)
and even reset won't clean up the mess...
Should tell you the terminal width. "man stty" talks about setting the number of columns but I have never needed to know that so I can't help much there.
hmm, ok i've been digging around an awful lot and i *think* i've traced it back to man itself, or more specifically groff version 1.18 which (maybe only on gentoo) ignores one of the man formatting commands, namely .ll which sets the line length. i'm not sure if this is gentoo specific or not, and i'd really appreciate it if someone 1) not on gentoo and 2) with groff 1.18 or 1.18.1 could confirm wether their manpages do get automatically resized to match the width of their terminal. thanks.
sorry if i confused you saying it wasn't just man as i was sure it wasn't. arse.
OK - I've done some checking/playing with groff and I am able to change my default man width to 50 cols by using:
NROFF /usr/bin/nroff -c -mandoc -rLL=50n
instead of:
NROFF /usr/bin/nroff -c -mandoc
in my /etc/man.config.
Also after reading the groff man pages it looks like it should default to 78 cols if there is no override.
A simple grep:
grep -R "ll 78n" /usr/share/groff/*
Shows the following files hold the default values.
/usr/share/groff/1.18.1/tmac/an-old.tmac:. ie n .nr LL 78n
/usr/share/groff/1.18.1/tmac/an-old.tmac:. ie n .nr LT 78n
/usr/share/groff/1.18.1/tmac/doc-old.tmac:. nr ll 78n
/usr/share/groff/1.18.1/tmac/doc-old.tmac:. ll 78n
/usr/share/groff/1.18.1/tmac/doc-old.tmac:. nr lt 78n
/usr/share/groff/1.18.1/tmac/doc-old.tmac:. lt 78n
/usr/share/groff/1.18.1/tmac/mdoc/doc-nroff:.ll 78n
/usr/share/groff/1.18.1/tmac/mdoc/doc-nroff:.lt 78n
/usr/share/groff/1.18.1/tmac/mdoc/docj-nroff:.nr ll 78n
/usr/share/groff/1.18.1/tmac/mdoc/docj-nroff:.ll 78n
/usr/share/groff/1.18.1/tmac/mdoc/docj-nroff:.nr lt 78n
/usr/share/groff/1.18.1/tmac/mdoc/docj-nroff:.lt 78n
To change my man pages I can edit the LL line in:
/usr/share/groff/1.18.1/tmac/an-old.tmac
To the value I want to make the default (if you do this there is no need to edit /etc/man.config).
Hope that all makes sense - I have never done it before but from the tests I have carried out - it does work for me and hopefully you too
interesting, i would be fairly confident that this is a bug of some sort, but can't for the life of me understrand how this hasn't been fixed if that is the case... it's surely not a deliberte thing...!? if you try downgrading to 1.17 (and removing the -c from the NROFF statement in man.conf) then you should find that your manpages perfectly fit the termainl, whatever the width of the window. there's no way AFAIK to make that default command depend on the width. man builds up a real long command line and just uses set values for nroff / groff... thanks for looking into it... it can be fun getting your hands dirty.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.