How to change the INFOPATH, possibly only user wide?

In my system (Fedora 33) echo $INFOPATH returns nothing. (Info works nonetheless.) I’ve read that Fedora uses /etc/man_db.conf instead of the MANPATH environment variable, but I’ve not found an analogue for Info manuals. I tried changing the INFOPATH anyway by adding

export INFOPATH="$INFOPATH:$HOME/.local/share/info"

in my ~/.profile but the value of the variable changes when I log out and in again. I might add some checks to the setting but first I’d like to know if setting the INFOPATH variable is the right way to add new directories of Info manuals.

Also, is the PATH set in a similar way to the MANPATH, i.e. without actually looking at the environment variable?

I tested info on Fedora 33, and the following paths work by default without profile customization:

1 Like

Hey, thanks! But where is this setting stored? Is there some documentation online for how to setup environment variables or their replacement?

${HOME}/.local/share/info works for standalone Info but not for Emacs, which uses INFOPATH.

The relevant code and documentation:

I guess, the simplest approach is to avoid declaring the INFOPATH explicitly if possible.


Thanks. To sum up, I had a book in Info format that I wanted to put somewhere under ~ and read with Emacs. I thought I needed to add ~/.local/share/info to the INFOPATH because I didn’t know that the system already searches for manuals there. Emacs doesn’t, though, but that’s fixed with (add-to-list 'Info-additional-directory-list "~/.local/share/info") in Emacs’ init file.

What about TeX Live’s Info directory, /usr/local/texlive/2020/texmf-dist/doc/info; what would you suggest to make it available to Info?

> If the value of @code{INFOPATH} ends with a colon […], the
> initial list of directories is constructed by appending
> the build-time default to the value of @code{INFOPATH}.
> […]
> Regardless of whether @code{INFOPATH} is defined, the
> default documentation directory defined when Info was
> built is added to the search path.

So if I set the INFOPATH are the default directories still searched? Do I just have to leave a trailing semicolon?

1 Like

Update Issues have branched:

  • I can’t find a reliable way to add manuals outside the predefined directories, for example TeX Live’s manuals at /usr/local/texlive/2020/texmf-dist/doc/info. If the directory is in the INFOPATH, the manual’s name gets Bash completion, but trying to open it returns info: No menu item 'kpathsea' in node '(dir)Top'.
  • I couldn’t find any way to tell what these predefined directories are. In @vgaetera answer there’s no mention of ~/.local/share/info (I’ve also searched in Fedora package’s code but I didn’t find it) even though manuals in there are picked up by Info.

I was able to add a manual once after much fiddling. I did

mkdir ~/info-test
ln -s /usr/local/texlive/2020/texmf-dist/doc/info/ ~/info-test
touch ~/info-test/dir
install-info ~/info-test/ ~/info-test/dir
info asymptote

~/info-test wasn’t in the INFOPATH. I couldn’t get it to work again after a reboot, not even after adding ~/info-test to the INFOPATH.

The problem doesn’t seem to lie in TeX Live’s manuals or the dir file themselves because they work allright in Emacs if /usr/local/texlive/2019/texmf-dist/doc/info is added to Info-additional-directory-list.


I’ve opened a new, more general question: How to add new manuals to Info.

1 Like