Linux – How to install a font in Linux so that it’s usable by xterm

fontlinuxx11

I came across a question today asking for good Linux xterm fonts, and an answer suggests one called Terminus. I've been looking for a new terminal font for a while now, so I downloaded it (BTW, I'm running Ubuntu Intrepid) and read the README:

1.1. Quick installation.
The commands:
  $ ./configure [--prefix=PREFIX]
  $ make
  # make install
compile and install the Linux console and X11 Window System fonts, and
  # make fontdir
updates fonts.dir for X11 (if you don't know what fonts.dir is, execute the
command).

1.2. Legend.    
The file names are structured as follows: ter-u<SIZE><STYLE>.bdf    
where <SIZE> is 12, 14, 16, 20, 24, 28 or 32, and <STYLE> is n for normal
(all sizes), b for bold (all sizes except 6x12) and v for EGA/VGA bold (8x14
and 8x16 only, makes use of the eight character matrix column).

So I ran:

$ ./configure
$ make
$ sudo make install
$ sudo make fontdir

…and I restarted X11 just to be sure, and the new font was nowhere to be found:

$ xterm -font ter-u14n
xterm:  unable to open font "ter-u14n", trying "fixed"....

Sigh. Back to the README. Later in this file, I saw:

4. X11 Window System.
4.1. Installation.

$ ./configure [--prefix=PREFIX | --x11dir=DIRECTORY]
$ make pcf
# make install-pcf

Well, I know that "xterm -font 8×16" works, so I ran "locate 8×16" and saw that this font seemed to live in /usr/share/fonts/X11/misc, so that seemed like a good –x11dir to use. So I ran:

$ ./configure --x11dir=/usr/share/fonts/X11/misc
$ make pcf
$ make install-pcf
$ sudo make fontdir

…and I restarted X11 again, and even my whole computer just for good measure, and I even verified that there were now a bunch of files like /usr/share/fonts/X11/misc/ter-u14n.pcf.gz on my system, but still:

$ xterm -font ter-u14n
xterm:  unable to open font "ter-u14n", trying "fixed"....

What is the magical incantation I have to perform in order to get this font working with xterm?

Best Answer

Ubuntu has a package:

apt-get install xfonts-terminus xfonts-terminus-oblique

Note that this is in the universe repository, so you may have to add that to /etc/apt/sources.list.