How to setup Linux XTerm with Persian support

Following are the instructions for getting Linux XTerm work with Persian Unicode. Two screenshots are available for a sonnet of Hafez (15KB) and First Soore of Quran (9 KB). Please note that these are not for novice Linux users.

1 The font

Download 10x20.bdf.bz2. Run:

    bunzip2 10x20.bdf.gz
    bdftopcf 10x20.bdf > 10x20.pcf
    gzip -9 10x20.pcf
    mv -b 10x20.pcf.gz /usr/lib/X11/fonts/misc
    cd /usr/lib/X11/fonts/misc

Add the following line to 'fonts.alias':

    10x20U  -Misc-Fixed-Medium-R-Normal--20-200-75-75-C-100-ISO10646-1


    xset fp rehash

To test the font, run:

    xfd -fn 10x20U

2 The Terminal

Get xterm-156.tar.bz2 and xterm-bidi-27.diff.bz2. Run:

    bzip2 -cd | tar xvf -
    cd xterm-156
    bzcat ../xterm-bidi-27.diff.bz2 | patch -p1
    ./configure --enable-wide-chars
    ./xterm -u8 -bi -fn 10x20U

To test your installation, download hafez.utf8 and hamd.utf8 and run:

    cat hafez.utf8
    cat hamd.utf8

You should be able to see the first Sonnet of Hafez (alaa yaa ayyohas-saaghi) and the first Soore of Quran (hamd).

Problems? contact the FarsiWeb Project Group at

Back to The FarsiWeb Project homepage.