3. Devanagri Input and Output setup

3.1. Linux console

Devanagari characters do not display properly in a Linux console. However, NCST has developed ncst-term (a terminal emulator program in X Window System) which has support for converting keystrokes to UTF-8 before sending them to the application running in the ncst-term, and for displaying Unicode characters that the application outputs as UTF-8 byte sequence.

3.2. X Window System

You need to make some changes in your XF86Config-4 file (usually resides in /etc/X11/ directory). A sample config file XF86Config-4.indix is installed along with IndiX system. This file can be found in /etc/X11/ directory.

3.2.1. Devanagri Font

OpenType is the most suitable font format to render any Indic script properly. The IndiX system ships with one OpenType font called "raghu" for Hindi. Anyone can use and distribute this font free-of-cost. You can find this font in /usr/X11R6/lib/X11/fonts/TrueType/ directory.

Installing the Indic Fonts:

In order to install the Indic fonts, you must log in as root. The X Font Server (xfs) is known to have some problems with the IndiX system, so remove it from the FontPath of the X Server. This can be achieved by modifying your XF86Config-4 file (usually in /etc/X11/) and commenting the line in the Files section and adding /usr/X11R6/lib/X11/fonts/TrueType/ to the current FontPath.

After that, the FontPath should look something similar to this:
  FontPath   "unix/:7100"
  FontPath   "/usr/X11R6/lib/X11/fonts/misc"
  FontPath   "/usr/X11R6/lib/X11/fonts/100dpi"
  FontPath   "/usr/X11R6/lib/X11/fonts/75dpi"
  FontPath   "/usr/X11R6/lib/X11/fonts/TrueType"
  FontPath   "/usr/X11R6/lib/X11/fonts/Type1"
Next, in order to make use of the OpenType font you have, load the "freetype" module at startup. You can achieve this by adding the following line in the Module section of XF86Config-4 file.
  Load "freetype"
Make sure you specify the modules search path in the Files section, too.
  ModulePath "/usr/X11R6/lib/modules/fonts"
  ModulePath "/usr/X11R6/lib/modules/drivers"
  ModulePath "/usr/X11R6/lib/modules"
  ModulePath "/usr/X11R6/lib"
  ModulePath "/usr/lib"
Any new Indic fonts you want to install should be placed in the /usr/X11R6/lib/X11/fonts/TrueType/ directory. Now, change to this directory and run the following commands:
  $ mkfontdir
  $ xset fp rehash
In case you want to place your new Indic fonts in some other directory, you must use xset to add the new FontPath. Please see the xset man-page for further assistance. You can check the new installed fonts by running the xlsfonts command. In case you don't see any Indic fonts using this command, you may need to restart X.

3.2.2. Devanagri Keyboard Layout

The IndiX system comes with a keyboard map file for xmodmap. You can use the utility xmodmap to map a Devanagri keyboard. For most distributions, when you start X, the X-Server will look for a Xmodmap in /etc/X11/ directory. If that file does not exist, the server will look for a .Xmodmap in your $HOME. Just putting the .Xmodmap in your $HOME will be okay. When you start the X server, it will load this file. You can also load .Xmodmap from the command line:
  $ xmodmap ~/.Xmodmap


If you are using XFree86 version 4.0 or later, you need to add the line XkbDisable in InputDevice section of XF86Config-4 file. You may config the keyboard section like the following sample.
  Section "InputDevice"
  Identifier  "Keyboard0"
  Driver      "keyboard"
  Option      "XkbDisable"