From Gentoo Wiki
Jump to:navigation Jump to:search

Mlterm is a multilingual terminal emulator for X11, with support for various complex characters and bi-directional text layout.


USE flags

USE flags for x11-terms/mlterm A multi-lingual terminal emulator

X Add support for X11
bidi Enable bidirectional language support
brltty Enable support for app-accessibility/brltty
cairo Enable support for the cairo graphics library
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
fbcon Add framebuffer support for the console, via the kernel
fcitx Enable support for app-i18n/fcitx
gtk Add support for x11-libs/gtk+ (The GIMP Toolkit)
harfbuzz Enable support for OpenType Layout (media-libs/harfbuzz)
ibus Enable support for app-i18n/ibus
libssh2 Enable support for net-libs/libssh2
m17n-lib Enable m17n-lib support
nls Add Native Language Support (using gettext - GNU locale utilities)
regis Enable support for ReGIS
scim Enable support for app-i18n/scim
skk Enable support for SKK (virtual/skkserv or app-i18n/skk-jisyo)
static-libs Build static versions of dynamic libraries as well
uim Enable support for app-i18n/uim
utempter Enable support for sys-libs/libutempter
wayland Enable support for Wayland
xft Build with support for XFT font renderer (x11-libs/libXft)


root #emerge --ask x11-terms/mlterm



  • /etc/mlterm/ - Global (system wide) configuration files.
  • ~/.mlterm - Local (per user) configuration files.

During the emerge, example configuration files were installed into /etc/mlterm/. These can be copied into the local config directory and used as a base for further configuration.

Color scheme

FILE ~/.mlterm/main
fg_color = black
bg_color = white

# Color of text under the cursor
cursor_fg_color = black
# Color of the cursor itself
# Note that #aaaaaa is an RGB tuple, not a comment
cursor_bg_color = #aaaaaa

# Specifies the colors used to display bold, underlined, blinking, reverse,
# italic and crossed-out characters, respectively
# bd_color =
# ul_color =
# bl_color =
# rv_color =
# it_color =
# co_color =

The file /etc/mlterm/color defines which RGB values color names such as black or green correspond to.


There are several font configuration files, to configure different kinds of fonts:

font Ordinary X fonts
vfont Ordinary X fonts of variable column width
tfont Ordinary X fonts of vertical writing
aafont Xft or cairo fonts
vaafont Xft or cairo fonts of variable column width
taafont Xft or cairo fonts of vertical writing

Note that the correct font rendering engine needs to be enabled in ~/.mlterm/main:

FILE ~/.mlterm/main
type_engine = xft

Enabling anti-aliasing might make the font more visually appealing:

FILE ~/.mlterm/main
use_anti_alias = true

Mlterm supports selecting a font based on character range. An example configuration with Xft fonts could be:

FILE ~/.mlterm/aafont
DEFAULT=Droid Sans Mono 15
U+0620-065F=Noto Sans Arabic
U+1200-137F=Noto Sans Ethiopic


The scrollbar can be configured with the following settings:

FILE ~/.mlterm/main
# Whether to enable the scrollbar. Values: true,false
use_scrollbar = true
# Which side of the screen the scrollbar should appear on. Values: left,right
use_scrollbar = right
# Appearance of the scrollbar. Values:
#   simple,sample,sample2,sample3,next,motif,athena,mozmodern
scrollbar_view_name = mozmodern

# Foreground and background color of the scrollbar:
# sb_fg_color =
# sb_bg_color =

Mlterm supports pseudo-transparency. It appears that adjusting alpha, brightness and contrast only works when Mlterm was emerged with the gtk USE flag.

FILE ~/.mlterm/main
use_transbg = true
alpha = 10
brightness = 2
contrast = 50



Improper spacing

Improper spacing might be caused by the use of variable-width fonts without variable width option being enabled. If mlterm -V has proper spacing, variable-width fonts may be enabled in the configuration files:

FILE ~/.mlterm/main
use_variable_column_width = true

See also