LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-29-2006, 07:28 AM   #1
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
man outputs garbage (solved)


Hi All,

I've recently installed Gentoo and everything works really nicely, except that when I run man, instead of getting a formatted man pages, I get a block of random characters. They seem to all be ASCII characters and there are hints of real text in there. The name of the man page shows up near the top along with the section number.

My initial feeling is that it isn't decompresing the man pages before displaying it, but I have gzip installed ok, so I don't understand why.

Any help is much appreciated as I take most of my information from man pages!

Thanks,
James

Last edited by crazyjimbo; 11-29-2006 at 08:28 AM.
 
Old 11-29-2006, 07:45 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
The subject sounds like a headline in the tabloid. It gave me a giggle.

Is the PAGER environment variable set, if so, what to?
 
Old 11-29-2006, 07:52 AM   #3
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Original Poster
Rep: Reputation: 16
It is indeed set, to /usr/bin/less.

Thanks,
James
 
Old 11-29-2006, 08:01 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Hmm, weird. Can you paste some example garbage?
 
Old 11-29-2006, 08:07 AM   #5
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Original Poster
Rep: Reputation: 16
I can indeed paste some garbage (this is the first page of output from man less) :

Code:
^H^H+ODless.1O<ks7Bn+aUlIAEIae(R)jaO>1/2lkcK(;IZo8II|s1B~y0>,%nbimm)4oyFAgouNh$iEe(R)LZo/yvWbu<O+-uaeb1/2yApoLi1/286F^d9&-
u,'2/+M3F?Gb,/#;o1,WaEa`|3uUo<< iobbU}<<oaDML|Cubybc8yyCunFIEW_yIUvAyA2+-1/41oaai-Ip$KmUEInAaA^NOAEOAbRbJ<<E(C)As<<oOUaAEIh~*oyijaOt3iu-
      !aA1u>>?il1FEo;ceAyDuYI]a+Aya`o?cU1/2P9a;2"bHkYI'<=>>8>=ILahRVReH.BO Yuu
i=YYLY85AA"tx4:8?&pbx,AyOH%gOJaOxy(C)JOYA     ${1/2u;}9nj1YnvIEc_-TAkeciAO"-R1DYyl;ob/3eAL1/4xOFe-geZaAEV     AEiYeZIas;OMKS<<aNi_OR~ai8OE'aeiF6s9QO@a"?OR'i]VFfeFL(R)S$seO...KoXIeoObRJduKA..6.......tOo1/2xaJu1/2Doa*3Cq1OHuZouHO2W5eoe,awx3/4eK<{(fV6YuL<<jaa]Ib...MiOWU8IOO0SuJx
$A33qPae1*CCEA, iO3/o53mOIIO.x+-N`Ix      pS1EdNac]oYAzaEi%NUJ
"YA2Mv..oa1UYu(Xix1h@2da>8}nbiap$                            ((C)
&]uoYkkuAeQWe6x= (..i1/23#        |e......e*g4>,9|`"YaxT"fouF+- u8(C)NuOu&L`I"nIo(R)LR3IoE4@[A23O|%v('rY6ATx"
^HlO2xo"(R)O3a[Yh>>aeli7}-:-                                  yNeaHb
>ouyAOnMT........aLHEiiIaa#O!vRau<<4~O}--

                                                   _
](C)uBMYanTU.....GuUQ.<|AZi2s&OT*K?*BC3bRu1IA(C)%QIv+uXIa>*iXe4i,oAX[PxOfx!b!Z@J@UuvAApBE EY1{+-]1/4<?isic>OyLyvoiYgA+-6O~M:i1U"-:-eC3X%'oaie|2iu|+ae;P"hA4cVLZ+Uo@"     u}uKeeqo^e_+IaAaoC$qIobDIoi}ubtV1obOOOE+-3 k*Uo/oyhy.uo?}v+-w~~uLCsVVeG         oRVetV,mB9Aw&a=Iip#C?:aUYaxLocj+-DS(C)AEbW@O3';`a;9vAYaNOALgcAOoaY9cSUc1(C)'Doa~iIuEoay>>"$ob>A1+aybuou"WO%x"cOUACNeP1/44AExaK1A%:(R)j~qa:OoTOuvaoJe1~<<%Iw!oaPAy 1-
The plot thickens however... I was playing around with gzip and uncompressed and then recompressed the man page for man and ls. Once recompressed, these ones work perfectly. I'm not really sure what this implies? None of my man pages are compressed correctly? Surely not!?

EDIT: Actually, it hasn't made a difference, I had just left the uncompressed one lying around and it must have been reading that.

Thanks,
James

Last edited by crazyjimbo; 11-29-2006 at 08:09 AM.
 
Old 11-29-2006, 08:15 AM   #6
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Original Poster
Rep: Reputation: 16
More updates with my progress:

By changing the PAGER environment variable, to something which didn't exist (lucky typo!), I got man to give me an error message telling me what command it was trying to run:

Code:
Error executing formatting or display command.
System command (cd /usr/share/man && (echo ".pl 1100i"; /bin/cat '/usr/share/man/man2/open.2.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -mandoc -c | /usr/bin/les) exited with status 127.
Running an edited version of this command, I got a proper man page output:

Code:
cd /usr/share/man && /bin/cat '/usr/share/man/man2/open.2.gz' | gzip -cd - | /usr/bin/gtbl | /usr/bin/nroff -mandoc -c | /usr/bin/less
Is there someway I can change the command man runs? Or can someone tell from the commands it is executing why it doesn't work?

Thanks,
James

EDIT: I've managed to solve the problem by adding the following line to man.conf: 'CAT gzip -cd' This replaces the cat command which before was ouputting compressed junk with gzip which now ouputs uncompressed things Many thanks for your help!

Last edited by crazyjimbo; 11-29-2006 at 08:27 AM.
 
Old 11-29-2006, 08:43 AM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Good to see it's fixed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
waht file have paths for man? man.conf? where? xcore_on Linux - Newbie 4 05-23-2006 09:38 AM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 08:52 AM
How to quit man (less) and keep man info on screen? peb Linux - Newbie 7 03-25-2004 10:02 PM
should i worry about these outputs? wza Linux - General 3 01-10-2004 12:18 AM
Compiling packages on RH 7.1 causes man files to be named man.gz mmboam Linux - General 0 05-09-2001 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration