Package: man-db Version: 2.6.5-2 Severity: wishlist Tags: patch This is an idea for /etc/mailcap entries to run "man" on man pages. It allows for example
see /usr/share/man/man1/man.1.gz to display with man in either X or a tty, and also non-interactive like the following (though groff-base trumps this just yet ...) run-mailcap --action=cat /usr/share/man/man1/man.1.gz The debian/man-db.mime file below can be taken by dh_installmime to install as /usr/lib/mime/packages/man-db. /usr/lib/mime/packages/groff-base has a "copiousoutput" entry at priority=5 which is above what I propose here for man non-interactive, which means for now the groff bit has precedence in the --action=cat above. I think the groff should be lower, but that will be a matter of groff and man-db cooperating. The priority levels apply before the output style is considered, so usually any copiousoutput should be below any interactive viewing.
# priority=6 above the default 5 on the basis that viewing a man page # with man is above average sensible. # # Priority above /usr/lib/mime/packages/groff-base "nroff -mandoc" # since "man" has the advantage of running preprocessors such as tbl # specified in the man page and so gives better results. Eg on # /usr/share/man/man1/gtbl.1.gz (the tbl man page uses tbl). Locale # charset handling in man is probably better too. # # "man -X" is only priority=6 since the gxditview it runs is rather # basic and perhaps something more sophisticated could be higher. The # X entry is before the tty so the X is preferred under X. (The tty # one still works there, in its declared needsterminal.) # # "-X100" seems to make better output than the default -X 75 dpi. # Dunno if that's some font dodginess or matching the X server's # advertised screen size resolution or something. # # "test -e gxditview" because it's in the "groff" package which is # only a Suggests of man-db and so may not be available. application/x-troff-man; /usr/bin/man -X100 -l '%s'; test=test -n "$DISPLAY" -a -e /usr/bin/gxditview; description=Man page; priority=6 application/x-troff-man; /usr/bin/man -l '%s'; needsterminal; description=Man page; priority=6 # "-Tascii" gives backspace overstriking, so use "col -b" to undo # that. Piping to col also means "man" has a non-tty output and so # does not run its usual "more" etc pager, ensuring this entry is # non-interactive. # application/x-troff-man; /usr/bin/man -Tascii -l '%s' | col -b; copiousoutput; description=Man page; priority=2
-- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages man-db depends on: ii bsdmainutils 9.0.5 ii debconf [debconf-2.0] 1.5.51 ii dpkg 1.17.1 ii groff-base 1.22.2-3 ii libc6 2.17-92 ii libgdbm3 1.8.3-12 ii libpipeline1 1.2.4-1 ii zlib1g 1:1.2.8.dfsg-1 man-db recommends no packages. Versions of packages man-db suggests: ii chimera2 [www-browser] 2.0a19-8 ii chromium [www-browser] 29.0.1547.57-3+b1 ii conkeror [www-browser] 1.0~~pre+git130817-1 ii dillo [www-browser] 3.0.3-6 ii elinks-lite [www-browser] 0.12~pre6-1+b1 ii groff 1.22.2-3 ii iceape [www-browser] 2.7.12-1+b1 ii iceweasel [www-browser] 24.0-2 ii less 458-2 ii links [www-browser] 2.7-2 ii links2 [www-browser] 2.7-2 ii lynx-cur [www-browser] 2.8.8dev.16-1 ii netrik [www-browser] 1.16.1-1.1 ii netsurf [www-browser] 2.9-2 ii netsurf-gtk [www-browser] 2.9-2 ii w3-el-e21 [www-browser] 4.0pre.2001.10.27.nodocs-5 ii w3m [www-browser] 0.5.3-11 ii xemacs21-mule [www-browser] 21.4.22-4 -- debconf information: * man-db/build-database: true * man-db/rebuild-database: true * man-db/install-setuid: true man-db/auto-update: true