A wrapper for X terminal emulator which is sensible to your native language (or encoding). To be the default X terminal emulator for Debian GNU/Linux.
Debian GNU/Linux provides a menu system where installed packages can supply items. Sometimes the items are related to terminal-based applications. These applications are invoked in X terminal emulator in X Window System environment.
These application are sometimes internationalized and displays messages in your native language. However, if the X terminal emulator cannot display your native language, the messages will be meaningless row of characters. This is much worse than non-internationalized applications display English messages.
Fortunately, Debian GNU/Linux has X terminal emulators which can display special character encoding system which ordinal terminal emulators cannot display. For example,
|encoding (language)||terminal emulator|
|EUC-JP, Shift-JIS, ISO-2022-JP (Japanese)||kterm|
|EUC-JP, ISO-2022-JP (Japanese)||krxvt|
|Big5 (traditional Chinese)||crxvt-big5|
|GB2312 (simplified Chinese)||crxvt-gb|
However, you have to rewrite configuration file of Debian menu system so that these X terminal emulators are invoked. I think native language is so basic and important that we should not need troublesome settings other than setting LANG variable. --- Do you want to manually modify hundreds of configuration files so that your native language is displayed?
Then, why don't we provide a wrapper which is sensible to locale and choose proper X terminal emulator? This is what I am introducing here! This is sensible-xtermemu package. This contains sensible-x-terminal-emulator script which invokes proper X terminal emulator for your language.
Debian GNU/Linux provides sensible-pager and sensible-editor which are sensible to environmental variables $PAGER, $EDITOR, and $VISUAL. sensible-x-terminal-emulator is an analogy of these mechanisms. It checks $X_TERMINAL_EMULATOR environmental variable and then checks charset (locale)-specific X terminal emulators. Finally it falls into /usr/bin/x-terminal-emulator.
The current version is made to divert xterm. This means that softwares which calls xterm will call sensible-x-terminal-emulator.
This package will not display its ability to the full unless (1) other softwares (such as Debian menu system) invoke sensible-x-terminal-emulator as a default X terminal emulator instead of x-terminal-emulator or xterm and (2) X terminal emulators which can display special encodings (non-8bit, multibyte, combining, right-to-left, and so on) register itself into /etc/X11/sensible-x-terminal-emulator/*. In other words, this package needs modification of Debian Policy to include these points.
However, to demonstrate how this works, the current version has the following temporal features:
The current version is 0.05.
Since this package is experimental one and I am in the process of registration of Debian official developer, this package is not available in Debian archive. Instead, this is available at ftp://surfchem0.riken.go.jp/pub/sensible-xtermemu/.
This package is also distributed at Debian JP Project.
At first, XFree86 4.0 xterm does not support multicolumn characters (CJK ideograms, Japanese hiragana and katakana, Korean hangul, and so on) nor combining characters (Thai and so on).
You may say that there is an unofficial patch to support them. The answer is: we still need conventional character encoding systems, though in the future softwares may be ported into UTF-8.
For example, you (western-European people) will need ISO-8859-1 besides UTF-8, won't you?
'Alternative' is a Debian's faculty to provide preferable version of softwares (for example, vim, elvis, nvi,...) in a common name (for example, vi). 'x-terminal-emulator' is described in the Debian Policy Manual as a common name for X terminal emulator. A Japanese user can use kterm or krxvt as x-terminal-emulator.
However, at first, this mechanism is not clever enough to be locale-sensible. Next, this mechanism provides preference for each site, not for each user. If people speaking different language share one machine, 'alternative' mechanism cannot be used.
After all, this way depends on the user's configuration by hand. Asian users need additional meaningless configuration.
Yes, this can work. However, sensible-xterm invokes x-terminal-emulator if $X_TERMINAL_EMULATOR and charset-specific terminal emulator are not available. If sensible-x-terminal-emulator provides alternative for x-terminal-emulator, it will make an infinite loop.
And more, sensible-pager and sensible-editor don't provides 'alternative' for pager and editor. Since sensible-x-terminal-emulator is an analogy to them, it should not provide 'alternative' for x-terminal-emulator.
After all, sensible-x-terminal-emulator should be the default. It should not be higher priority.
At last I adopted this idea for version 0.03. However, I will give up this idea in future.
Though it is against the Debian Policy, there are many packages which calls xterm directly. (The correct way is to call x-terminal-emulator which is provided by 'alternatives' mechanism.) Diverting xterm means that these packages will call sensible-x-terminal-emulator instead of xterm. This enables that users who installed sensible-xtermemu package will immediately receive benefit from the package.
However, this should not be the final solution. Diversion of xterm should be allowed only when sensible-x-terminal-emulator is fully compatible to xterm. However, this is not true. There are difference of command option between xterm and other terminal emulators which may be called from sensible-x-terminal-emulator. xterm supports partial support of UTF-8. And so on.