Problem
On my machine (Ubuntu 18.04), I am able to view man pages normally in the console.
However, I cannot seem to get man --html (man -H) or man --gxditview (man -X) to work.
Might anyone have any inklings as to what is wrong?
Related Posts
- https://askubuntu.com/a/339268/692420 - Found this to realize I needed sudo apt install groff.
- https://bbs.archlinux.org/viewtopic.php?id=238227 - Mentions MAN_DISABLE_SECCOMP, but I tried it out and didn't seem to change my issue.
- Reinstall man pages & fix man - This mentions reinstalling packages, but this user wasn't even able to view man cpon the console.
- For other posts that I've searched and found, they just had issues with their DISPLAY. In this case, I feel that I've discounted that possibility by opening upfirefoxandgxditviewjust fine on their own.
Potential Workarounds
I'm guessing that I could use something like man2html in other posts, but if possible, would prefer to know how to fix the "builtin" setup first.
There's also yelp man:cp, suggested from the above-linked post, which looks uber nice, so will probably stick with that for now (but hope that xref's are there...)
Reproduction
I have "minimized" my environment variables using the following command:
$ alias bash-isolate='env -i HOME=$HOME DISPLAY=$DISPLAY SHELL=$SHELL TERM=$TERM USER=$USER PATH=/usr/local/bin:/usr/bin:/bin bash --norc'
$ bash-isolate
# In isolated session
$ env | sort
DISPLAY=:1
HOME=/home/eacousineau
PATH=/usr/local/bin:/usr/bin:/bin
PWD=/home/eacousineau
SHELL=/bin/bash
SHLVL=1
TERM=screen
USER=eacousineau
_=/usr/bin/env
All of my examples will be posted starting from this environment.
Here's showing that man normally works:
$ man cp | head -n 4
CP(1)                                       User Commands                                      CP(1)
NAME
       cp - copy files and directories
However, when I try to call man --html=/usr/bin/firefox or man --gxditview, I get the following:
$ which groff
/usr/bin/groff
$ firefox
# A window opens up fine and dandy.
$ man --html=/usr/bin/firefox cp
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :1
man: couldn't execute any browser from /usr/bin/firefox
$ gxditview
# A window opens up fine and dandy, also.
$ man --gxditview cp
groff: gxditview: Signal 31 (core dumped)
man: command exited with status 1: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && groff -mandoc -TX75 -X)
If I run the same commands, but precede them with export MAN_DISABLE_SECCOMP=1, I see no difference in behavior:
$ export MAN_DISABLE_SECCOMP=1
$ env | sort
DISPLAY=:1
HOME=/home/eacousineau
MAN_DISABLE_SECCOMP=1
PATH=/usr/local/bin:/usr/bin:/bin
PWD=/home/eacousineau
SHELL=/bin/bash
SHLVL=1
TERM=screen
USER=eacousineau
_=/usr/bin/env
$ man --html=/usr/bin/firefox cp
# Same as above.
$ man --gxditview cp
# Same as above.
I also tried haphazardly using xhost + and xhost +local:root (and quickly calling xhost - / xhost -local:root and terminating those sessions thereafter), but found the same behavior.

