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.
3 Answers
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.
-
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 RossCommented Jul 31, 2014 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 RossCommented Aug 2, 2014 at 9:21 -
1Note, also, that
info --subnodes -o foo.txt foo.info
will convert the subject.info
file to a text file. Very useful.– DiggerCommented Jul 1, 2021 at 18:23
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.
The current releases’ info
pages are available on gnu.org. They come in different formats including HTML and nice tex
y PDF, e. g. for the coreutils:
- gnu.org/software/coreutils/manual – overview
- gnu.org/software/coreutils/manual/coreutils.html – one big HTML
- gnu.org/software/coreutils/manual/html_node/index.html – one HTML page per node
- gnu.org/software/coreutils/manual/coreutils.pdf – shiny PDF
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.
-
I'm looking for the info page for
top
online. I couldn't find it in any of those links.– Katerl3sCommented Sep 28, 2020 at 21:24 -
@Katerl3s That’s because
top
is not a GNU package, refer to the manpage instead, e.g. for Ubuntu Focal.– dessertCommented Sep 29, 2020 at 6:45