Next Previous Contents

7. The Bash Prompt Package

7.1 Availability

The Bash Prompt package is available at http://bash.current.nu, and is the work of several people, co-ordinated by Rob Current (aka BadLandZ). The package is an early beta, but offers a simple way of using multiple prompts (or themes), allowing you to set prompts for login shells, and for subshells (ie. putting PS1 strings in  /.bash_profile and  /.bashrc). Most of the themes use the extended VGA character set, so they look bad unless they're used with VGA fonts (which aren't the default on most systems).

7.2 Changing the Xterm Font

To use some of the most attractive prompts in the Bash Prompt package, you need to get and install fonts that support the character sets expected by the prompts. These are referred to as "VGA Fonts," but I'm unclear on the distinction between them and the fonts Linux usually ships with - although clearly they support different character sets. Standard Xterm fonts support an extended alphabet, including a lot of letters with accents. In VGA fonts, this material is replaced by graphical characters - blocks, dots, lines. If anyone can explain this in more detail, e-mail me and I'll include the explanation here.

Getting and installing these fonts is a somewhat involved process. First, retrieve the font(s). Next, ensure they're .pcf or .pcf.gz files. If they're .bdf files, investigate the "bdftopcf" command (ie. read the man page). Drop the .pcf or .pcf.gz files into the /usr/X11R6/lib/X11/fonts/misc dir (this is the correct directory for RedHat 5.1 and Slackware 3.4, it may be different on other distributions). "cd" to that directory, and run the "mkfontdir" command. Then run "xset fp rehash". Sometimes it's a good idea to go into the fonts.alias file in the same directory, and create shorter alias names for the fonts.

To use the new fonts, you start your Xterm program of choice with the appropriate command to your Xterm, which can be found either in the man page or by using the "--help" parameter on the command line. Popular terms would be used as follows:

xterm -font <fontname>
OR
xterm -fn <fontname> -fb <fontname-bold>
Eterm -f <fontname>
rxvt -fn <fontname>

VGA fonts are available from Stumpy's ANSI Fonts page at http://home.earthlink.net/~us5zahns/enl/ansifont.html (which I have borrowed from extensively while writing this).


Next Previous Contents