MLTERM(1)

NAME
mlterm - Multi Lingual TERMinal emulator for X

SYNOPSIS
mlterm [-options]

DESCRIPTION
mlterm is a multi-lingual terminal emulator written from scratch, which supports various character sets and encodings in the world and complex characters such as doublewidth for East Asian, combining for Thai, Vietnamese, and so on, and bi-direction for Arab and Hebrew. More complex Indic scripts are not supported yet. It also supports various unique feature such as anti-alias using FreeType, multiple XIM, multiple windows, scrollbar API, scroll by mouse wheel, automatic selection of encoding, and so on.

Supported encodings are: ISO-8859-[1-10], ISO-8859-[13-16], TCVN5712, KOI8-R, KOI8-U, VISCII, EUC-JP, EUC-JISX0213, ISO-2022-JP[1-3], Shift_JIS, Shift_JISX0213, ISO-2022-KR, EUC-KR, UHC, JOHAB, GB2312 (EUC-CN), GBK, ISO-2022-CN, BIG5, BIG5HKSCS, EUC-TW, HZ, TIS-620, UTF-8, and GB18030. If you have already set locale (for example LANG variable; see locale(7) for detail) mlterm will automatically select proper encoding.

OPTIONS
Note that bool is to be substituted by true or false.

-A, --aa(=bool)
    Use anti-aliased fonts using Xft. The default is false. Note that if mlterm encoding is not a subset of Unicode like ISO-2022-JP-2 or EUC-TW, characters which are regarded as a same character in Unicode are displayed with the same glyph and you cannot distinguish these characters. This is because Xft library which is used for anti-alias font rendering is based on Unicode.

-B, --sbbg=color
    Specify background color of the scrollbar. Valid values for color are white, black, red, green, yellow, blue, magenta, cyan, gray, lightgray, pink, brown, priv_fg, and priv_bg. See COLOR CONFIGURATION FILE section for detail of priv_fg and priv_bg. The default is same to the color specified by -b option.

-D, --bi(=bool)
    Use BiDi (bi-direction) rendering on UTF8 encoding to support RTL (right-to-left) languages such as Arab and Hebrew. The default is true.

-E, --km=encoding
    Specify encoding. Valid encodings were shown in DESCRIPTION section above in this manpage. "AUTO" means that encoding is determined properly by using locale information (default AUTO).

-F, --sbfg=color
    Specify foreground color of the scrollbar. Valid values for color are white, black, red, green, yellow, blue, magenta, cyan, gray, lightgray, pink, brown, priv_fg, and priv_bg. See COLOR CONFIGURATION FILE section for detail of priv_fg and priv_bg. The default is same to the color specified by -f option.

-I, --icon=name
    Specify icon name. The default is "mlterm".

-L, --ls(=bool)
    Whether to use login shell or not. The default is false.

-M, --menu=path
    Specify path name for the GUI configurator command. The default depends on compilation or "/usr/local/libexec/mlconfig". See GUI CONFIGURATOR section for detail.

-N, --name=name
    Specify application name. The default is "mlterm".

-P, --ptys=value
    Specify number of ptys to be used in start up. The default is 1. See MULTIPLE PTY section for detail.

-R, --fsrange=range
    Range of size of usable fonts. The format is "minsize-maxsize", where minsize and maxsize are font sizes in pixel (default 10-24). You cannot choose font sizes in GUI configurator against this range.

-S, --sbview=name
    Specify name of scrollbar. See SCROLLBAR section below for detail. The default is "simple" which means the built-in simple scrollbar. Scrollbars are supplied as libraries and this version of mlterm contains two scrollbar libraries of "sample" and "sample2".

-T, --title=name
    Specify title name. The default is "mlterm".

-U, --viaucs(=bool)
    If the received selection (i.e., copy-and-paste strings) is not UTF8_STRING type, convert the selection into Unicode and then to the current mlterm encoding, in order to identify equivalent characters (i.e., characters which share the same codepoint in Unicode) from various character sets. See SELECTION section below for detail. The default is "false".

-W, --sep=characterlist
    Delimiter characters used for word selection, which are consulted when you double-clicked mlterm, to define what is a word. The default is " ,.:;/@")

-X, --openim(=bool)
    Connect to an XIM (X Input Method) server on startup. Most east Asian people will want to enable this option. Other people can also safely enable this. The name of the XIM server to be connected is specified by standard way (i.e., XMODIFIERS environmental variable). The default is "true".

-5, --big5bug(=bool)
    Support Big5 CTEXT bugs (which exist in XFree86 4.1.0 or before). This affects Big5 selections (i.e., copy-and-paste strings) in COMPOUND_TEXT format which mlterm sends. The default is "false".

-7, --bel(=mode)
    Behavior when BEL (0x07) is received. sound for beep and visual for blanking screen.

-8, --88591(=bool)
    Use ISO8859-1 fonts for US-ASCII part of various encodings.

-a, --ac=value
    Specify number of columns of Unicode characters with EastAsianAmbiguous property. The default is 1 and some of Asian people may want to specify 2. See Unicode Standard Annex (UAX) #11 East Asian Width found at Unicode website for detail.

-b, --bg=color
    Specify background color (default "white"). Valid values for color are white, black, red, green, yellow, blue, magenta, cyan, gray, lightgray, pink, brown, priv_fg, and priv_bg. See COLOR CONFIGURATION FILE section for detail of priv_fg and priv_bg.

-d, --display=string
    Specify X display to connect with.

-e program [ arguments ... ]
    Invoke the command in the mlterm window. This option must be the last option on the command line.

-f, --fg=color
    Foreground color (default "black"). Valid values for color are white, black, red, green, yellow, blue, magenta, cyan, gray, lightgray, pink, brown, priv_fg, and priv_bg. See COLOR CONFIGURATION FILE section for detail of priv_fg and priv_bg.

-g, --geometry=geometry
    Specify size and position of the window; see X(7).

-h, --help(=bool)
    Show help messages.

-i, --xim(=bool)
    Whether to use XIM (X Input Method). Most east Asian people will want to enable this option. Other people can also safely enable this. The default is "true". The name of the XIM server to be connected is specified by standard way (i.e., XMODIFIERS environmental variable).

-k, --meta(=mode)
    Behavior of META key. esc for sending ESC and 8bit for turning on the most significant bit. The default is "none" which ignores META key.

-l, --sl=value
    Specify number of lines of backlog. The default is 128.

-m, --comb(=bool)
    Enable combining characters by overstriking glyphs (recommended for TIS-620, TCVN5712, and UTF-8). Note that fonts which contain combining characters which extend backward cannot be used, since mlterm does combine characters by controlling the writing positions. The default is "true".

-n, --noucsfont(=bool)
    Use non-Unicode fonts even when mlterm encoding is UTF-8. Useful when you don't have ISO10646-1 fonts and you want to use UTF-8 encoding. The default is "false".

-p, --pic=path
    Path for wallpaper (background) image. Note that wallpaper cannot be used with transparent background.

-s, --sb(=bool)
    Whether to use scrollbar. The default is "false".

-t, --transbg(=bool)
    Whether to use transparent background. Note that transparent background cannot be used with wallpaper. The default is "false".

-u, --onlyucsfont(=bool)
    Use Unicode fonts even when mlterm encoding is not UTF-8. Useful when you have ISO10646 fonts but you don't have other fonts and want to use non-UTF-8 encodings. Note that if mlterm encoding is not a subset of Unicode like ISO-2022-JP-2 or EUC-TW, characters which are regarded as a same character in Unicode are displayed with the same glyph and you cannot distinguish these characters. Since Xft library which is used for anti-alias font rendering is based on Unicode, anti-alias has the same problem. The default is "false".

-v, --version
    Show version message.

-w, --fontsize=value
    Specify font size in pixel. The default is 16.

-x, --tw=value
    Specify tab width. The default is 8.

-y, --term=string
    Specify terminal type. The default is "xterm" and you can specify "kterm" also.

GUI CONFIGURATOR
Pushing control key and mouse button 3 invokes GUI configurator (mlconfig). It can modify encoding, foreground and background color, tab size, backlog size, font size, usage of combining character, and so on.

GUI configurator has four pages (Encoding, Copy&paste, Appearance, and Others), Apply and Cancel buttons, and four special buttons.

Note this feature needs GTK+ 1.2.

  Encoding page
Encoding-related configurations are located in this page. Note that configurations will be enabled when you push Apply button.

Encoding
    Specify encoding. Equivalent to -E or --km option.

X Input Method
    Specify the name of XIM server to be connected. You can input from your keyboard or you can choose one of registered XIM servers. This doesn't have equivalent command option. See the section of XIM Configuration File for registration of XIM servers.

XIM locale
    Specify the name of the locale to be used for connection to the XIM server. Popular XIM servers usually have acceptable locales to be used for connection. If you choose registered XIM server in Input Method, this will be set automatically. You can also input the locale name from your keyboard.

Bidi (UTF-8 only)
    Whether to support BiDi (bi-direction). Equivalent to -D or --bi option.

Combining
    Whether to support combining characters by overstriking. Equivalent to -m or --comb option.

  Copy&paste page
Configurations related to copy and paste are located in this page.

Process received strings via Unicode
    When you paste some strings into mlterm, the strings are converted into Unicode and then to mlterm encoding. Equivalent to -U or --viaucs option.

  Appearance page
Configurations related to appearance (or look&feel) are located in this page.

FG color
    Foreground color, equivalent to -f or --fg option.

BG color
    Background color, equivalent to -b or --bg option.

Font size
    Font size in pixel, equivalent to -w or --fontsize option.

Bel mode
    Behavior when mlterm receives BEL (0x07) code. Equivalent to -7 or --bel option.

Anti-alias
    Use anti-alias fonts by using Xft. Equivalent to -A or --aa option.

Transparent
    Transparent background, equivalent to -t or --transbg option.

  Others page
Other configurations are located in this page.

Tab size
    Column number of tab, equivalent to -x or --tw option.

Log size
    Number of lines of backlog, equivalent to -l or --sl option.

Mod Meta mode
    Behavior of META key, equivalent to -k or --meta option.

  Buttons
There are buttons which is independent from Accept/Cancel buttons.

Font size (Larger and Smaller)
    Change font size.

Wall picture (Select and Off)
    Specify the image file to be used for background image.

MULTIPLE XIM
mlterm can use multiple XIM (X Input Method) servers. The current XIM is specified by the GUI configurator. Using this feature you can input multiple complex languages such as Japanese and Korean. Locale to be used for communication with XIM can also be specified for each XIM. In the GUI configurator, you can choose one of registered pair of XIM and its locale or you can input your favorite XIM and its locale.

The locale for XIM is only used for communication with the XIM and is not related to the current mlterm locale. You have to properly configure the XIM locale only when your XIM has preference on the locale of XIM client (i.e., mlterm in this case). mlterm automatically convert the inputed string into proper encoding and you don't have to care about it.

Of course the initial XIM is chosen by using standard configuration, i.e., using XMODIFIERS environmental variable. See X(7) for detail on XIM and XMODIFIERS variable.

SCROLLBAR
mlterm supports scrollbar API so that users can develop scrollbar libraries with arbitrary look and feel. The scrollbar libraries can be used by putting the libraries at the specified directory (determined on the compilation process) and invoke mlterm with -s -S name option. Sample scrollbar libraries named "sample" and "sample2" are supplied.

ANTI-ALIAS
mlterm can use TrueType fonts using -A option via FreeType library when it has been compiled with anti-alias option.

Note this feature needs XFree86 4.0.2 or above and FreeType 2.0.2 or above.

WALLPAPER
mlterm can use background image (as known as wallpaper), by using -p option.

Note this feature needs imlib.

MULTIPLE PTY
This is one of most unique features of mlterm. The number of windows can be specified using -P option. Typing control + F1 opens another window which shares the same process. The maximum number of windows is five.

BACKSCROLL MODE
mlterm enters into backscroll mode by typing Shift + up or Shift + PageUp key. In the mode, you can use the following keys

j or Down
    Scroll down one line.

k or Up
    Scroll up one line.

d or PageDown
    Scroll down one page.

u or PageUp
    Scroll up one page.

Shift + space
    Initialize XIM.

Shift + Insert
    Insert selection.

Control + F1
    Open a new pty window.

other keys
    Exit from the backscroll mode.

SELECTION
Selection is a mechanism to be used for copy-and-paste in X Window System. Thus, this section describes on so-called copy-and-paste.

There are many encodings in the world. Though copy-and-paste needs sender and receiver and each of them can use one of various encodings, mlterm is designed to be able to receive characters from various encodings as much as possible.

There are two internationalized types of selection. One is COMPOUND_TEXT is the another is UTF8_STRING. COMPOUND_TEXT is ISO2022-based and can distinguish character sets which a character belongs to. However, the character sets which COMPOUND_TEXT supports are limited to ISO8859-* and East Asian character sets. On the other hand, UTF8_STRING is Unicode-based and can express all characters from Unicode character set. However, it cannot distinguish characters from different character sets which share one codepoint in Unicode, which can be a problem especially for CJK Han Ideogram (in other words, Kanji, Hanji, or Hanja). Note that UTF8_STRING is rather new and can be used only with XFree86.

Though the receiver of copy-and-paste can request the preferable type of selection, the sender sometimes doesn't support the type. Thus mlterm has to be able to process both of COMPOUND_TEXT and UTF8_STRING.

On the other hand, encodings supported by mlterm (see DESCRIPTION section for detail) are classified into four categories;

(a) Unicode itself
    UTF-8.

(b) subset of Unicode and ISO-2022-compliant
    "Subset of Unicode" means that Unicode supports round-trip compatibility for the encoding, i.e., the conversion of the encoding --> Unicode --> the encoding doesn't lose any information. "ISO-2022-compliant" means that the encoding can be regarded as a subset of ISO-2022 where a part of ISO-2022 control codes and escape sequences are not supported. Many popular encodings belong to this category such as ISO-8859-*, EUC-*, ISO-2022-KR, TIS-620, TCVN5712, and so on.

(c) subset of Unicode and non-ISO-2022-compliant
    Some of popular encodings such as Shift_JIS, Big5, GBK, GB18030, Johab, and so on belongs to this category.

(d) not subset of Unicode
    ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-3, EUC-TW, and so on. All of them are ISO-2022-compliant.

Now the behavior of mlterm can be explained.

-------------------------------------------------------
encoding received selection  how to process?
-------------------------------------------------------
   a     COMPOUND_TEXT       convert to Unicode
   a     UTF8_STRING         no need for conversion
   b     COMPOUND_TEXT       user preference *1
   b     UTF8_STRING         convert to the encoding *2
   c     COMPOUND_TEXT       user preference *1
   c     UTF8_STRING         convert to the encoding *2
   d     COMPOUND_TEXT       no need for conversion *3
   d     UTF8_STRING         convert to the encoding *2
-------------------------------------------------------

*1 Characters from unsupported character sets (i.e., characters which cannot be expressed in the mlterm encoding) may appear in the selection (received copy-and-paste string). If you want to receive characters which are equivalent to characters which are supported in the current mlterm encoding (i.e., characters which share the same codepoint in Unicode), you can use -U (or --viaucs) option. Otherwise, these characters are pasted into mlterm using ISO-2022 escape sequence (when mlterm encoding is category b). Note such ISO-2022 escape sequences are illegal in the current mlterm encoding and the application software will need special feature to treat them properly, though it is displayed well in mlterm. When mlterm encoding is category c, such characters are simply ignored (when -U option is not enabled).

*2 Characters which cannot be converted into mlterm encoding are simply ignored.

*3 Characters from unsupported character sets will be pasted into mlterm using ISO-2022 escape sequence.

CONFIGURATION
mlterm loads configuration files of "main", "font", "aafont", "color", "key", "termcap", and "xim" on start up. Configuration files for one user are to be located in "~/.mlterm/" directory, while location for configuration files for all users depends on the compilation option. Possible locations are "/etc/", "/etc/X11/", "/usr/X11R6/lib/X11/mlterm/", and so on.

The names and the roles of configuration files are:

main
    Main configuration items which can be overrided by command line options.

font
    Configurations for ordinary X fonts.

aafont
    Configurations for anti-alias Xft fonts.

color
    Designate concrete RGB values for color names.

key Key definitions for special features of mlterm.

termcap
    Define string sequences to be inputed by pressing control keys.

xim Define preset locales for X Input Methods which are shown in the GUI configurator. Of course you can input XIM names and locales for the GUI configurator which are not listed in this configuration file.

The contents of these configuration files consist of lines of "key=value" format. Lines beginning with "#" are ignored.

Note that the configuration files are changed since version 1.9.44.

  Main Configuration File
This file contains main configuration items which can be overrided by command line options. The main configuration file "main" has the following keys. Parentheses show the corresponding command-line options. See the explanation on these command-line options for detail.

tabsize=value (-x, --tw)
    Specify tab width.

logsize=value (-l, --sl)
    Specify number of lines of backlog.

use_login_shell=bool (-L, --ls)
    Whether to use login shell or not.

app_name=name (-N, --name)
    Application name.

title=name (-T, --title)
    Title name.

icon_name=name (-I, --icon)
    Icon name.

termtype=string (-y, --term)
    Terminal type.

ptys=value (-P, --ptys)
    Number of pty windows to be opened on start up.

word_separators=characterlist (-W, --sep)
    Delimiter characters used for word selection.

mod_meta_mode=mode (-k, --meta)
    Behavior of META key.

bel_mode=mode (-7, --bel)
    Behavior when BEL (0x07) is received.

scrollbar_view_name=name (-S, --sbview)
    Specify name of scrollbar. See SCROLLBAR section below for detail.

conf_menu_path=path (-M, --menu)
    Path for mlconfig GUI configurator.

use_xim=bool (-i, --xim)
    Use XIM (X Input Method).

xim_open_in_startup=bool (-X, --openim)
    Open XIM on startup.

use_bidi=bool (-D, --bi)
    Use BiDi rendering on UTF8 encoding.

use_scrollbar=bool (-s, --sb)
    Use scrollbar.

use_combining=bool (-m, --comb)
    Enable combining characters.

use_transbg=bool (-t, --transbg)
    Use transparent background.

big5_buggy=bool (-5, --big5bug)
    Support Big5 CTEXT bugs (which exist in XFree86 4.1.0 or before).

not_use_unicode_font=bool (-n, --noucsfont)
    Use non-Unicode fonts even when mlterm encoding is UTF-8.

only_use_unicode_font=bool (-u, --onlyucsfont)
    Use Unicode fonts even when mlterm encoding is not UTF-8.

iso88591_font_for_usascii=bool (-8, --88591)
    Use ISO8859-1 fonts for US-ASCII part of various encodings.

copy_paste_via_ucs=bool (-U, --viaucs)
    If the received selection (i.e., copy-and-paste strings) is not UTF8_STRING type, convert the selection into Unicode and then to the current mlterm encoding, in order to identify equivalent characters (i.e., characters which share the same codepoint in Unicode) from various character sets. See SELECTION section below for detail.

col_size_of_width_a=value (-a, --ac)
    Number of columns of Unicode characters with EastAsianAmbiguous property (default 1).

fg_color=color (-f, --fg)
    Foreground color.

bg_color=color (-b, --bg)
    Background color.

sb_fg_color=color (-F, --sbfg)
    Foreground color for scrollbar.

sb_bg_color=color (-B, --sbbg)
    Background color for scrollbar.

wall_picture=path (-p, --pic)
    Path for wallpaper image.

fontsize=value (-w, --fontsize)
    Font size in pixel.

font_size_range=range (-R, --fsrange)
    Range of size of usable fonts.

ENCODING=encoding (-E, --km)
    Specify encoding.

  Font Configuration File
The font configuration files "font" and "aafont" have the following keys.

DEC_SPECIAL=fonts
ISO8859_n=fonts
TIS620=fonts
VISCII=fonts
KOI8_R=fonts
KOI8_U=fonts
TCVN5712=fonts
JISX0201_ROMAN=fonts
JISX0201_KANA=fonts
JISX0208_1978=fonts
JISX0208_1983=fonts
JISX0208_1990=fonts
JISX0213_2000_1=fonts
JISX0213_2000_2=fonts
KSX1001_1997=fonts
UHC=fonts(not used)
JOHAB=fonts(not used)
GB2312_80=fonts
GBK=fonts
BIG5=fonts
HKSCS=fonts
CNS11643_1992_n=fonts
ISO10646_UCS2_1=fonts
ISO10646_UCS2_1_BIWIDTH=fonts
    Specify fonts for corresponding charsets. The format is different between "font" and "aafont" files.

    In "font" file, "font" is specified in "SIZE,NAME;SIZE,NAME;..." format where "SIZE" is font size in pixel and "NAME" is XLFD or alias names of X fonts.

    In "aafont" file, "font" is specified in "FAMILY-ENCODING;SIZE,FAMILY-ENCODING;..." format. The first pair of FAMILY and ENCODING specifies the default font and the others with SIZE are for specific sizes.

encoding_BOLD=fonts
    Specify boldface fonts.

  Color Configuration File
The color configuration file "color" has the following key.

color_rgb=color , RGB
    Assign a concrete color for the name color, where RGB is RED-GREEN-BLUE, where RED, GREEN, and BLUE are hexadigimal value from 0 to ffff.

  XIM Configuration File
The X Input Methods configuration file "xim" has the following format

XIM=locale

where XIM is XIM name and locale is locale name used for communication with the XIM server. For example,
kinput2=ja_JP.eucJP
Ami=ko_KR.eucKR
xcin-zh_CN.GB2312=zh_CN.GB2312
These settings are used for choices of XIM in the GUI configurator. You can use XIMs which are not listed in this configuration file.

  Feature Key Configuration File
The feature key configuration file "key" has the following keys.

XIM_OPEN=key
    Specify key to open XIM. This is not used if xim_open_in_startup is enabled (default Shift+space).

XIM_CLOSE=key
    Specify key to close XIM (default UNUSED).

NEW_PTY=key
    Specify key to open new pty (default Ctrl+F1).

PAGE_UP=key
    Specify key to start backscroll mode and scroll up one page (default Shift+prior).

SCROLL_UP=key
    Specify key to start backscroll mode and scroll up one line (default Shift+up).

INSERT_SELECTION=key
    Specify key to insert selection (default Shift+Insert).

INIT_PARSER=key
    Specify key to initialize the parser state of the current mlterm encoding (default UNUSED).

The format for key is "(MASK+)KEY", where MASK is one of Control, Shift, and Mod.

  Control Key Configuration File
The feature key configuration file "termcap" has the following keys.

kD=sequence
    Specify sequence to be outputted when Delete key is pushed (default ^?).

kb=sequence
    Specify sequence to be outputted when BackSpace key is pushed (default ^H).

The following special characters can be used to specify sequence.

\E  ESC code (0x1b).

^?  DEL code (0x7f).

^A, ^B,...
    Corresponding control code (0x01 - 0x1a).

SEE ALSO
Manual pages of locale(7), charsets(7), UTF-8(7), and X(7).

README.sb for development of scrollbar library.

FILES

"main", "font", "aafont", "color", "key", "termcap", and "xim"
    Configuration files.

"mlconfig"
    GUI configurator.

AUTHOR
Araki Ken <j00v0113@ip.media.kyoto-u.ac.jp>