Hanterm-3.1 Manual

This is a preliminary version of hanterm manual. Much should be added here.


Hanterm is a Hangul terminal emulator. It is intended to replace XTerm whenever Hangul input/output is needed.

Hanterm uses X11 JOHAB* (johab, johabs, johabsh, and NZ series fonts) encoded fonts as well as X11 KSC5601.1987 encoded font(aka Wansung). Since the johab* fonts can represent all the Hangul syllables in modern use as well as some archaic syllables, you can use JOHAB encoding specified as a supplementary encoding in KS X 1001:1997 annex 3 as well as more widely used EUC-KR and newly added UTF-8 encoding.

Moreover, JOHAB* fonts are much smaller than usual KSC5601.1987-* encoded fonts, so you can run hanterm in more restrictive environment. You can also use johab844 encoded fonts to enjoy a kind of ``modernized'' look.

Since this version of the program is based on X11R5 XTerm code, all XTerm options (including Xt options) and VT100 Menus are retained in hanterm. You can find more information of the basic features from xterm(1) man page.

Getting started - Compiling and Installing

You can get the tar'ed and gzip'ed source from http://hanterm.org/download/. After storing the file, you can issue

$ gzip -dc hanterm-<version>.tar.gz | tar xf -

commands to extract the source tree. After extracting the source, on most OS/X-window system combinations

% xmkmf; make
% su
$ make install

will do the job.

On some systems hanterm must be installed suid root. Compare the permissions of your xterm and hanterm carefully. Their permissions should be identical.

With some OS/compiler/X server combinations installing hanterm might require some tweakings.

Solaris 2.x + OpenWindows 4

Config files of OpenWindows are set up to use Sun CC package, which is not bundled with basic Solaris package. If you want to install hanterm with gcc, you should do one of the following:

Here is the config files for those want to do the second option. WARNING: these files are not written by hanterm-dev team, nor do we know the creator. Any problems you might encounter has nothing to do with us.

SunOS 4.x + OpenWindows 3

At the last stage of make, it complains things like

   ld: Undefined symbol

You can safely ignore these messages. hanterm works anyway.


cc in IRIX 6.5 issues many warnings. You can ignore these warnings.


If xmkmf doesn't work properly, try make -f Makefile.hp


DG/UX users should try make -f Makefile.dgux

Installing the fonts

If you previously installed hanterm, then somewhere you should have JOHAB* encoded fonts. Of course, you can always use KSC5601.1987 encoded fonts with hanterm, but if you want to enjoy various look and feel, you might want to install hanterm-fonts.tar.gz package.

CAUTION: remove the old johab844 fonts, which has wrong XLFD names. do

% xlsfonts "*johab844*"

and carefully count the number of "-" in the font names. If it is not 14, you're in trouble. Run remove-wrong-fonts.sh script included in hanterm-fonts.tar.gz package as root, then re-install hanterm-fonts package.

You can get hanterm-fonts.tar.gz package from the same place where you got hanterm. Note that included Makefile does NOT work currently. Use bdftopcf with mkfontsdir.

Basic Usage

Most features of hanterm are identical to xterm except you can see the Status line most below the window. There you could see something like "[영어][2벌식][완성]". Each []-cell represents a status of hanterm. Basically, you can change its status by clicking on the []-cell, or by some special key combinations.

Switching between Korean/English input method

hanterm has its own input method(which doesn't comply with XIM standard). It supports Korean/English input method. To switch between them, Press LeftShift-Space(that is, while pressing left shift key, press the space bar). Pressing ESC key forces the input method fall back to English. This is especially handy when you're using vi.

For rare cases in which the X server cannot accept the LeftShift-Space combination, F2 key also switches between the input methods.

Switching between 2-bul and 3-bul(390) Korean input method

You must click the second []-cell. No key combinations exists as of current version.

Switching between EUC-KR and KSC-5601:1991 Annex 3 (aka johab) code

You must click the third []-cell. No key combinations exists as of current version.

The Chatting mode

You can toggle Chatting mode with F3 key. It is a buffered mode which can be useful when you do IRC-type chatting or using a horridly slow connection.

Note that the line editing can be different from the usual shell mode you might be using.

Ctrl-H(Backspace) or DEL erases one ``character(English or Korean)'' backwards, Ctrl-W erases one word, Ctrl-U deletes the whole buffer.

Pressing Enter flushes out the input buffer, with trailing CR/LF. ESC also flushes out the buffer, but without trailing CR/LF.

Hanja (Chinese) input

You can input Hanja part of EUC-KR. To do this, after typing all syllables of a Korean character and while the cursor is still on freshly input character, press F9. The list of Hanjas with the pronunciation corresponding to the syllable under the curosr will show up in the status line at the bottom, from which you can select appropriate Hanja. If the number of selections is larger than 9, you should use cursor key (Left or Right) to select among additional set of Hanja.

Code input

To input special characters, or Japanese or Russian characters included in EUC-KR, press F7. You can input the hexadecimal EUC-KR codepoint value directly.

Cut & Paste

Selecting some text with mouse copies to X selection buffer. To paste to hanterm, click 3rd mouse button.

Options for hanterm

Here are options for hanterm. Options identical with xterm are omitted.

Assign X font for Korean characters. Overrides hangulFont resource.
-h, -help
Shows a help screen, containing every available options.
-hc number
Assigns Korean charset encoding. 0 for EUC-KR, 1 for KS X 1001:1997 JOHAB and 2 for UTF-8. See Resource hangulCode.
Specifies that given hangul font is encoded by KSC5601.1987-0 scheme. Normally this is done automatically, but some fonts might not be understood by hanterm. In that case use this option.
Specifies that given hangul font is encoded by KSC5601.1987-1 scheme.

Relevant X resources

Surely, editing .Xdefaults s**ks, but you don't have any alternatives currently. Let's hope next version will remedy this.

Specifies the hangul font. johab* and ksc5601.1987-* encoded fonts can be specified. To use larger fonts, you can specify greater points value like:
Hanterm*font: -*-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1
Hanterm*hangulFont: -*-myeongjo-bold-r-*--*-180-95-75-c-*-johabs-1

Note that the pixel and y value is the same with english font, and x value is the twice of english font. About X font name specification, See X(1).

Specifies that given hangul font is encoded by KSC5601.1987-0 scheme. Same as the option -ks.
Specifies that given hangul font is encoded by KSC5601.1987-1 scheme. Same as the option -kst.
Specifies the Hangul encoding to use when you start hanterm. See -hc from OPTIONS above. The default is 0 (EUC-KR).
Specifies the hangul keyboard layout to use when you start hanterm. "2" means 2 BUL keyboard, and "3" means 3 BUL 390 keyboard. This option can be overriden by HANGUL_KEYBOARD_TYPE environment variable. See ENVIRONMENT below.


In most cases you can just run hanterm without worrying about environment variables. Here are some variables in some cases you might need to know.

Specifies hangul keyboard type. "2" means 2 BUL keyboard, and "389", "390", etc. For detailed information see http://www.mizi.co.kr/info/hankbd.htm.
If you replaced the ordinary libX11 with libHanX11 from HanX or preloaded libhanx(by Sung-kyu Oh hanmaum@sparcs.kaist.ac.kr), you have to set this variable to 1 to prevent input mechanism of HanX from interfering with Hangul input mechanism offered by other programs(e.g. Hangul input method server). As Hanterm sets this variable automatically, usually you don't need to care about this variable while using hanterm.


Expect MANY troubles ahead. Enjoy when you cannot parry them.

On Exceed, Korean characters appear broken/does not displayed

You must use KSC5601.1987-* encoded X fonts, or, if you want to use johab* encoded fonts, use johab*nz-1 encoded fonts. This is due to a bug in Exceed, which cannot deal with 0 width fonts.

I cannot correctly Cut & Paste between hanterm and Netscape/IE/whatever

hanterm doesn't follow ICCCM. More will be explained here soon.

Last Update : $Date: 2001/06/06 17:52:36 $ (UTC)