LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   trouble with the way man pages are displayed (https://www.linuxquestions.org/questions/slackware-14/trouble-with-the-way-man-pages-are-displayed-433486/)

win32sux 04-09-2006 07:15 PM

trouble with the way man pages are displayed
 
i'm having an issue with the way my man pages are displaying from my xterm... they seem to display fine from a console (runlevel 3), but when i'm in X11, and i look at a man page from my xterm, they display in an awkward manner... for example, here's a snippet of what a "man diff" looks like:
Code:

DIFF(1)                          User Commands                        DIFF(1)

NAME
iff - compare files line by line

SYNOPSIS
diffOPTION]... FILES

DESCRIPTION
ompare files line by line.

      -i--ignore-case
gnore case differences in file contents.

      --ignore-file-name-case
gnore case when comparing file names.

see how the text is like cut off to the left and stuff?? :confused:

i'm sure i messed something up somewhere but i can't figure-out what, and i'm not exactly sure where to look... so far i've recompiled man, groff, and x11 with no luck...

any guidance you could give me with this issue would be most appreciated...

thanks in advance...

edavis 04-09-2006 07:50 PM

Does this happen in any other terminal emulators such as aterm, rxvt, konsole or gnome-terminal?

win32sux 04-09-2006 07:53 PM

i just tried with xfterm4 and yeah, it happens there also... :(

edavis 04-09-2006 08:07 PM

I'd suggest removepkg man groff and installpkg'ing those again from Pat's vanilla packages. Something could of gotten screwy. Have you updated anything big lately? Does this happen in all man pages or just a select few?

win32sux 04-09-2006 08:36 PM

okay, i might test with patrick's packages in a minute...

meanwhile, i'm am starting to suspect that libtermcap might have something to do with this... any thoughts on that?? i uninstalled it a few days ago during a cleanup... so right now i installed libtermcap again and i recompiled groff and man but still no luck... however, if the problem is with the terminals themselves (and not groff/man) then perhaps i need to recompile X11 (xterm) in order for it to work?? hmmm, well, i'm gonna do some googling before i recompile X11 again cuz on my box it takes about an hour and 15 minutes to compile X11... hehe...

in response to your questions: yeah, i've updated lots of stuff during the past weeks, but i can't remember exactly when the man pages started getting messed-up...

and yeah, it seems to happen to all man pages... here's some more snippets for your enjoyment :) :

Code:

NAME
quid - proxy caching server

SYNOPSIS
squid  -dhsvzCDFNRVYX [ -lfacility ] [ -fconfig-file ] [ -[ au
      port ] [ -ksignal

DESCRIPTION
squids a high-performance proxy caching server for web clients,  sup-
      porting FTP, gopher, and HTTP data objects.  Unlike traditional caching
      software, squidandles all requests in a  single,  non-blocking,  I/O-
      driven process.

      squideeps meta data and especially hot objects cached in RAM, caches
      DNS lookups, supports non-blocking DNS lookups, and implements negative
      caching of failed requests.

Code:

NAME
p - copy files and directories

SYNOPSIS
cp[options]file path
      cp[options]file... directory

      POSIX options: [-fiprR][--]

dditional POSIX 1003.1-2003 options: [-HLP]

NU file-utils 4.0 options (shortest form):
      [-abdfilprsuvxPR][-SSUFFIX][-V{numbered,existing,simple}]
[--backup=CONTROL][--sparse=WHEN][--help][--version][--]

dditional GNU file-utils 4.1 options (shortest form):


Code:

NAME
etstat  - Print network connections, routing tables, interface statis-
      tics, masquerade connections, and multicast memberships

SYNOPSIS
netstataddress_family_options]  [--tcp-t  [--udp-u  [--raw-w
      [--listening-l [--all-a [--numeric-n [--numeric-hosts[umeric-
      ports]--numeric-ports  [--symbolic-N    [--extend-e--extend-e]
      [--timers-o [--program-p [--verbose-v [--continuous-c]

netstat--route-r              [address_family_options]
      [--extend-e--extend-e]  [--verbose-v  [--numeric-n  [--numeric-
hosts[umeric-ports]--numeric-ports [--continuous-c]

netstat--interfaces-i [iface] [--all-a [--extend-e--extend-e]
      [--verbose-v      [--program-p      [--numeric-n      [--numeric-
hosts[umeric-ports]--numeric-ports [--continuous-c]

BTW, thanks for your input!!! :)

win32sux 04-09-2006 09:18 PM

okay, well, i was thinking bash itself might have something to do with it... so after installing libtermcap i went ahead and recompiled bash to see if it made any difference... the man page problem still happens, but i can see that, at least, bash enjoyed the libtermcap install:
Code:

bash-3.1$ ldd /bin/bash
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x4001e000)
        libdl.so.2 => /lib/libdl.so.2 (0x40022000)
        libc.so.6 => /lib/libc.so.6 (0x40027000)
        /lib/ld-linux.so.2 (0x40000000)

UPDATE: just tried with patrick's groff/man packages for 10.2 and no luck...

edavis 04-09-2006 09:50 PM

Some greps in /var/log/packages/ shows that libtermcap.so.2 is actually installed in the aaa_elflibs package. I don't know libtermcap well enough, so maybe this is normal but even after I removepkg libtermcap I was able to view man pages and run bash without a hitch. So I don't believe libtermcap is the problem. I still think it has something to do with groff and/or man (maybe even less for all I know). I'm still sticking to my suggestion of removing man and groff and just installing them again. You shouldn't have to recompile X. If it was only happening in xterm then I'd suggest it but if the problem is terminal emulator neutral then it's something with the programs they're calling. Just my two cents, good luck.

UPDATE: Just read your edit, so nevermind about my suggestion. I'll keep poking around google but I don't have a clue anymore.

win32sux 04-10-2006 12:25 AM

yeah, recompiling X11 didn't help... i also recompiled XFCE just in case... nothing... well, i'm wasted for today... i'll keep at it tomorrow though... i'll keep you posted... if you think of anything please do post... once again, thanks for all your help...

/bin/bash 04-10-2006 05:09 AM

What is TERM variable set to?
echo $TERM
Try changing it, e.g. if it is set to xterm then change it to linux or visa-versa.

<edit> You can also try turning on or off the auto-margin by adding -am or -nam to the $TERM variable for auto-margin or no-auto-margin respectivly.

http://www.linuxmanpages.com/man7/term.7.php

win32sux 04-10-2006 09:26 AM

Quote:

Originally Posted by /bin/bash
What is TERM variable set to?
echo $TERM
Try changing it, e.g. if it is set to xterm then change it to linux or visa-versa.

<edit> You can also try turning on or off the auto-margin by adding -am or -nam to the $TERM variable for auto-margin or no-auto-margin respectivly.

http://www.linuxmanpages.com/man7/term.7.php

thanks man!!! that seems to have been it!!! :)

if i do a
Code:

TERM=linux
then the pages display properly...

if i then go back to what i had (xterm) with a:
Code:

TERM=xterm
then the pages display in the awkward manner again...

so now i'm reading the link you posted in an effort to understand what might have caused this change on my system in the first place, and of course how to change it back permanently and stuff...

thanks a million!!!

win32sux 04-10-2006 09:54 AM

when you guys open an xterm and do a:
Code:

echo $TERM
what do you get??

after a fresh boot, i get "linux" when i do it at a console (runlevel 3) but i get "xterm" when i do it from my xterm in X11 (runlevel 4)...

win32sux 04-10-2006 11:13 AM

been tryin' to figure-out how to change the value of $TERM to "linux" for X11 sessions on a system-wide level but no luck... i'd like to make it so that it gets set for all users... could you show me how to do this?? which file must i edit?? :confused:

win32sux 04-10-2006 12:25 PM

well i think i found out how to change $TERM to "linux" for all X11 sessions... i did it by opening the /usr/X11/bin/startx file and changing this:
Code:

clientargs=""
to this:
Code:

clientargs="-tn linux"
from "man xterm":
Quote:

-tn name
This option specifies the name of the terminal type to be set
in the TERM environment variable. It corresponds to the
termName resource. This terminal type must exist in the termi-
nal database (termcap or terminfo, depending on how xterm is
built) and should have li# and co# entries. If the terminal
type is not found, xterm uses the built-in list ``xterm'',
``vt102'', etc.
the problem is that it apparently made X11 load without a window manager... so it was quite a weird and interesting sight indeed... hehe... kinda like a stripped-down version of twm...

so i guess this kinda thing isn't set for the entire X11 session... i can always start an xterm within X11 by using "xterm -tn linux" and then it works fine, though... i just thought it would be more kosher to make it so that whenever a user executes "xterm" they will have that term open with a $TERM value of "linux" so that everything displays properly (specially man pages)...

Alien_Hominid 04-10-2006 12:43 PM

That's strange. I have TERM set as xterm and everything works normally in xterm (man pages too). Just tried for curiosity.

win32sux 04-10-2006 12:47 PM

okay, i came-up with a cheap/stupid work-around...

basically, i created a shell script ( /usr/bin/xterm ) which contains the following:
Code:

#!/bin/bash
/usr/bin/X11/xterm -tn linux "$@" &

so now when someone executes "xterm", that script will get run and it will run the real xterm with the -tn linux option... hence, the xterm will open with the $TERM variable set to "linux"...


All times are GMT -5. The time now is 12:33 PM.