12

Is there any way I can use a browser to view info pages? I know that it can be done with man pages based on the man page for man, but I couldn't find any such option for info.

8

Info files are created from .texinfo source, which is a special kind of markup language. The program used to convert .texinfo files to .info files is GNU TexInfo. This software can also produce HTML output:

Texinfo uses a single source file to produce output in a number of formats, both online and printed (dvi, html, info, pdf, xml, etc.). This means that instead of writing different documents for online information and another for a printed manual, you need write only one document.

For instance, you can use the coreutils.texi file with texi2any:

texi2any --html --no-split --no-headers --force -o core.htm coreutils.texi

to produce a single html file with the entire content from the coreutils info pages.

Note the info utility, which is also part of the texinfo suite, allows for some exporting of the content, but not directly to html; for instance:

info --subnodes -o ls.txt ls

to output the ls command info content to a text file.

3
  • I'm not sure I follow exactly what you did there @illuminÉ. When I tried to execute that command, my terminal gave me the message could not open coreutils.texi: No such file or directory.
    – Koz Ross
    Jul 31 '14 at 10:38
  • Thanks for adding the instructions. Can you do something like info --subnodes -o ls.texi ls to get output in Texinfo?
    – Koz Ross
    Aug 2 '14 at 9:21
  • 1
    Note, also, that info --subnodes -o foo.txt foo.info will convert the subject .info file to a text file. Very useful.
    – Digger
    Jul 1 at 18:23
4

For what it's worth, KDE's Konqueror and Rekonq browsers can display info pages directly, by exposing them through the info: protocol.

Simply launch Konqueror or Rekonq, and type e.g. "info:ls" in the address bar to access the info page for ls.

man pages are supported in the same way, via the man: protocol.

1

The current releases’ info pages are available on gnu.org. They come in different formats including HTML and nice texy PDF, e. g. for the coreutils:

A simple function to easily open e. g. the big HTML version of given packages could be:

infohtml(){
  for i; do
    vivaldi-stable "https://www.gnu.org/software/$i/manual/$i.html"
  done
}

With this, a command line infohtml bash screen opens the online info pages of these two using vivaldi-stable – replace the browser command if necessary.

2
  • I'm looking for the info page for top online. I couldn't find it in any of those links.
    – Katerl3s
    Sep 28 '20 at 21:24
  • @Katerl3s That’s because top is not a GNU package, refer to the manpage instead, e.g. for Ubuntu Focal.
    – dessert
    Sep 29 '20 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.