• How to get the manual pages formatted right?
  • Solution:
#!/bin/sh
export GROFF_NO_SGR=1
/usr/local/bin/xman
  • Explanation:

GROFF_NO_SGR needs to be set when starting xman on FreeBSD because during compiling, xman.c checks which OS it's being compiled on & hardwires nroff -mandoc as its page formatting aid if it detects the BSDs. However, nroff's mandoc macros output ANSI escape codes, while xman expects typewriter-style back up & overstrike codes.

  • Why are all the manuals missing?
  • Solution:

Add the following to the your script starting xman:

if [ -z "$MANPATH" ]; then export MANPATH=`manpath`; fi
  • Explanation:

xman relies on the MANPATH variable being set, but fresh installs don't set it (relying on /usr/bin/manpath as well instead).

  • ports/x11/xman.txt
  • Last modified: 2018/04/20 12:30
  • by MateuszPiotrowski