Bug 153666 - konsole should set MANWIDTH for man pages
Summary: konsole should set MANWIDTH for man pages
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.6.6
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-08 09:11 UTC by p13
Modified: 2008-01-10 17:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description p13 2007-12-08 09:11:58 UTC
Version:           1.6.6 (using KDE 3.5.7, compiled sources)
Compiler:          Target: i586-mandriva-linux-gnu
OS:                Linux (i686) release 2.6.22.12-desktop-1mdv

Man page formatting expects 80 column width screens.  Other widths can be given by setting the environment variable MANWIDTH.  

Possibly there is some other mechanism by which man should be notified of the Konsole width, but if nothing else can be found then MANWIDTH should be set everytime the Konsole size or Konsole font size is changed.
Comment 1 Robert Knight 2007-12-08 16:40:21 UTC
> Man page formatting expects 80 column width screens.  
> Other widths can be given by setting the environment variable MANWIDTH.  

Shell programs can query the size of the terminal window in lines and columns using the ioctl() system call with the TIOCGWINSZ request code.  Unlike relying on environment variables, this information updates without having to restart the program, although man does not appear to reformat if the window size changes.  The shell also sets $LINES and $COLUMNS variables.  

I presume man uses one of these since it produces output of the correct width on my display, if MANWIDTH is not set.  If MANWIDTH is set then it acts as an over-ride, and the man page will be formatted to MANWIDTH columns regardless of the window size.
Comment 2 p13 2007-12-09 01:24:00 UTC
OK setting MANWIDTH would definitely be wrong.  The bug seems to be in "man".  

Man page formatting is mostly OK when the number of columns is => 80, although I can confuse it with a font enlargement.  It is consistently misbehaving in narrow Konsoles.  

Unless you have something else to add, I guess that this should be closed.  

I'll send a bug report to the man maintainer in a day or two with a reference to this (non) bug.  

Thank you.  
Comment 3 Robert Knight 2007-12-16 00:09:47 UTC
Closing as per reporters suggestion.
Comment 4 Matthew Woehlke 2008-01-10 17:48:08 UTC
To the OP: there was another konsole "bug" about man recently, though I forget the number. That one was more about dynamic resizing, which basically is not do-able without a major re-write of man. For me, I get correct initial sizing (with Linux man, anyway, YMMV if you use man from e.g. Solaris, HP-UX, etc.) by adding 'export COLUMNS' to .bashrc/.bash_profile. (Which is not to say having 'man' query the terminal width itself wouldn't be nice :-).)