XITERM+THAI(1)

XITERM+THAI(1) β€” 2012 β€” no cap, this is the manual for xiterm+thai and we're about to read it together 🫢


✨ NAME ✨

okay so xiterm+thai is literally a VT102 emulator for the X window system, and yes it comes with Thai support πŸ‡ΉπŸ‡­βœ¨

πŸ¦‹ SYNOPSIS πŸ¦‹

xiterm+thai [options] [-e command [args]]

🌸 DESCRIPTION 🌸

so xiterm+thai version 1.10 is a color vt102 terminal emulator, and it's giving major xterm(1) replacement energy for anyone who doesn't need stuff like Tektronix 4014 emulation or toolkit-style configurability. the way that it uses much less swap space? iconic. that's a huge win on a machine serving many X sessions, fr fr. πŸ’–

πŸ’… OPTIONS πŸ’…

the xiterm+thai options are mostly a subset of xterm's, and they're all listed below. because of the smaller-is-better philosophy, options might be eliminated or default values might be chosen at compile-time, so what's listed here may not perfectly match the version installed on your system. just a heads up bestie 😭

also note that xiterm+thai lets you use the resource name as a long-option (--/++ option), so the potential command-line options are way more than what's listed here. for example: xiterm+thai --loginShell --color1 Orange πŸ’–

  • -help, --help β€” print out a message describing available options. πŸ’–
  • -display displayname β€” attempt to open a window on the named X display (-d still respected). in the absence of this option, the display specified by the DISPLAY environment variable is used. 🌈
  • -geometry geom β€” window geometry (-g still respected); resource geometry. πŸ“
  • -rv|+rv β€” turn on/off simulated reverse video; resource reverseVideo. πŸ”„
  • -bg color β€” window background color; resource background. 🎨
  • -fg color β€” window foreground color; resource foreground. πŸ–ŒοΈ
  • -pixmap: file[;geom] β€” specify XPM file for the background and also optionally specify its scaling with a geometry string; resource backgroundPixmap. πŸ–ΌοΈ
  • -cr color β€” the cursor color; resource cursorColor. πŸ’…
  • -fn fontname β€” main normal text font; resource font. πŸ”€
  • -fb fontname β€” main bold text font; resource boldFont. πŸ…±οΈ
  • -fk fontname β€” main Kanji font; resource kfont. πŸ‡―πŸ‡΅
  • -km mode β€” Kanji encoding mode; eucj: EUC Japanese encoding. sjis: Shift JIS encoding; resource kanji_encoding. 🈁
  • -grk mode β€” Greek keyboard translation; iso: ISO-8859 mapping. ibm: IBM-437 mapping; resource greek_keyboard. πŸ‡¬πŸ‡·
  • -tspace int β€” space count to trigger compensation for Thai rendering; default is 2; resource thai_space. πŸ‡ΉπŸ‡­
  • -tkb mode β€” Thai keyboard translation; tis: TIS-820.2538; ket: traditional Ketmanee; default is ket; resource thai_keyboard. ⌨️
  • -tim mode β€” Thai input method (based on XIM); BasicCheck: weak sequence check for character composition; Strict: strong check for orthographic rules; Passthrough: no check; if unset, value described in the XMODIFIERS environment is used; resource thai_im. ✨
  • -name name β€” specify the application name under which resources are to be obtained, rather than the default executable file name. name should not contain '.' or '*' characters. also sets the icon and title name. 🏷️
  • -ls|+ls β€” start as a login-shell/sub-shell; resource loginShell. 🐚
  • -ut|+ut β€” inhibit/enable writing a utmp entry; resource utmpInhibit. πŸ“
  • -vb|+vb β€” turn on/off visual bell on receipt of a bell character; resource visualBell. πŸ””
  • -sb|+sb β€” turn on/off scrollbar; resource scrollBar. πŸ“œ
  • -iconic β€” start iconified, if the window manager supports that option. πŸ—•
  • -sl number β€” save number lines in the scrollback buffer; resource saveLines. πŸ’Ύ
  • -e command [arguments] β€” run the command with its command-line arguments in the xiterm+thai window. if this option is used, it must be the last on the command-line. if there is no -e option then the default is to run the program specified by the SHELL environment variable or, failing that, sh(1). πŸƒβ€β™€οΈ
  • -title text β€” window title (-T still respected); resource title. 🏷️
  • -n text β€” icon name; resource iconName. πŸ–ΌοΈ
  • -C β€” capture system console messages. πŸ–₯️

✨ RESOURCES ✨ (also available as long-options, bestie πŸ’–)

Okay so xiterm+thai is super into application defaults β€” it'll gobble up whatever you set in XAPPLOADDIR/Xiterm (that's compile-time defined, and it's usually /usr/lib/X11/app-defaults/Xiterm) plus any resources you've stashed in ~/.Xdefaults or ~/.Xresources. 🌸

When it reads X resources it recognizes two class names: XTerm and Xiterm. The XTerm class is the chill one β€” it lets you configure resources that xiterm+thai and xterm both share. The Xiterm class is the special one β€” it lets resources that are unique to xiterm+thai (colors and key-handling, notably πŸ‘€) get shared across different xiterm+thai configs. If you specify no resources at all, suitable defaults kick in. And command-line arguments can override resource settings, because obviously. πŸ’…

Here's everything that's allowed:

  • geometry: geom β€” make the window with the specified X window geometry [default 80x24]; that's option -geometry.
  • background: color β€” use the specified color as the window's background color [default White]; option -bg.
  • foreground: color β€” use the specified color as the window's foreground color [default Black]; option -fg.
  • colorn: color β€” use the specified color for the color value n, where 0-7 corresponds to low-intensity (normal) colors and 8-15 corresponds to high-intensity (bold = bright foreground, blink = bright background) colors. The canonical names are: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=white β€” but the actual color names used are listed in the COLORS AND GRAPHICS section. (Yes bestie, you have to go look. πŸ™ˆ)
  • colorBD: color β€” use the specified color to display bold characters when the foreground color is the default.
  • colorUL: color β€” use the specified color to display underlined characters when the foreground color is the default.
  • cursorColor: color β€” use the specified color for the cursor. Default is to use the foreground color; option -cr.
  • cursorColor2: color β€” use the specified color for the color of the cursor text. For this to even do anything, cursorColor must also be specified. Default is to use the background color.
  • cursorColorThai: color β€” use the specified color for the cursor while in Thai mode. Default is to use the foreground color. πŸ‡ΉπŸ‡­βœ¨
  • reverseVideo: boolean β€” True: simulate reverse video by foreground and background colors; option -rv. False: regular screen colors [default]; option +rv. Go read the note in COLORS AND GRAPHICS, fr fr.
  • scrollColor: color β€” use the specified color for the scrollbar [default #B2B2B2].
  • backgroundPixmap: file[;geom] β€” use the specified XPM file (heads up, the .xpm extension is optional) for the background, and optionally specify its scaling with a geometry string WxH+X+Y, where W/H specify the horizontal/vertical scale (percent) and X/Y locate the image centre (percent). A scale of 0 displays the image with tiling. A scale of 1 displays the image without any scaling. A scale of 2 to 9 specifies the number of images in that direction. No image will be magnified beyond 10 times its original size. The maximum permitted scale is 1000. [default 100x100+50+50]
  • path: path β€” specify the colon-delimited search path for finding XPM files, on top of the paths specified by the RXVTPATH and PATH environment variables.
  • font: fontname β€” select the main text font used [default 7x14]; option -fn.
  • fontn: fontname β€” specify the alternative font n. The default font values:
font:     7x14
font1:    6x10
font2:    6x13
font3:    8x13
font4:    9x15
  • boldFont: fontname β€” specify the name of the bold font to use if colorBD has not been specified and it's not possible to map the default foreground color to color 8-15 [default NONE]. This font must be the same height and width as the normal font; option -fb.
  • kfont: fontname β€” select the main Kanji text font used [default k14]; option -fk.
  • kfontn: fontname β€” specify the alternative Kanji font n. If compiled for Kanji, the Roman and Kanji font sizes should match. The default font values:
font:      7x14
font1:     8x16
font2:     9x18
font3:     12x24
font4:     13x26

kfont:     k14
kfont1:    jiskan16
kfont2:    jiskan18
kfont3:    jiskan24
kfont4:    jiskan26
  • kanji_encoding: mode β€” set the Kanji encoding mode to be used; eucj: EUC Japanese encoding [default]. sjis: Shift JIS encoding; option -km.
  • greek_keyboard: mode β€” set the Greek keyboard translation mode to be used; iso: ISO-8859 mapping (elot-928) [default]. ibm: IBM-437 mapping (DOS codepage 737); option -grk. Use Mode_switch to toggle keyboard input. For more deets, see the distributed file README.greek.
  • thai_space: int β€” set the space count to trigger space compensation for previous combining marks; default value is 2; option -tsp.
  • thai_keyboard: mode β€” set the Thai keyboard translation map to use; tis: TIS-820.2538 map; ket: traditional Ketmanee map; default value is ket; option -tkb.
  • thai_im: mod β€” set the Thai input method (based on XIM) to use; BasicCheck: weak sequence check for character composition; Strict: strong check for orthographic rules; Passthrough: no check; if unset, the value described in the XMODIFIERS environment is used; option -tim.
  • title: text β€” set window title string; the default title is the command-line specified after the -e option, if any, otherwise the application name; option -title.
  • iconName: text β€” set the name used to label the window's icon or displayed in an icon manager window; it also sets the window's title unless that's been explicitly set; option -n.
  • mapAlert: boolean β€” True: de-iconify (map) on receipt of a bell character. False: no de-iconify (map) on receipt of a bell character [default].
  • visualBell: boolean β€” True: use visual bell on receipt of a bell character; option -vb. False: no visual bell [default]; option +vb.
  • loginShell: boolean β€” True: start as a login shell by prepending a - to argv[0] of the shell; option -ls. False: start as a normal sub-shell [default]; option +ls.
  • utmpInhibit: boolean β€” True: inhibit writing record into the system log file utmp; option -ut. False: write record into the system log file utmp [default]; option +ut.
  • print-pipe: string β€” specify a command pipe for vt100 printer [default lpr(1)]. Use Print to initiate a screen dump to the printer, and Ctrl-Print or Shift-Print to include the scrollback as well. πŸ–¨οΈ
  • scrollBar: boolean β€” True: enable the scrollbar [default]; option -sb. False: disable the scrollbar; option +sb. Note that the scrollbar position (left/right) and its type (with/without arrows) is compile-time selected. (So you can't just pick, bestie. 😭)
  • smallfont_key: keysym β€” if enabled, use Alt-keysym to toggle to a smaller font [default Alt-<].
  • bigfont_key: keysym β€” if enabled, use Alt-keysym to toggle to a bigger font [default Alt->].
  • saveLines: number β€” save number lines in the scrollback buffer [default 64]; option -sl.
  • meta8: boolean β€” True: handle Meta (Alt) + keypress to set the 8th bit. False: handle Meta (Alt) + keypress as an escape prefix [default].
  • cutchars: string β€” the characters used as delimiters for double-click word selection. The built-in default: TAB SPACE BACKSLASH "'&()*,;<=>?@[]{|}`
  • keysym.sym: string β€” associate string with keysym sym (0xFF00 - 0xFFFF). It may contain escape values (\a: bell, \b: backspace, \e, \E: escape, \n: newline, \r: return, \t: tab, \000: octal number) or control characters (^?: delete, ^@: null, ^A ...) and may be enclosed with double quotes so that it can start or end with whitespace. The intervening resource name keysym. cannot be omitted. This resource is only available when compiled with FAKE_RESOURCES.

πŸŽ€ THE SCROLLBAR πŸŽ€

These are the lines of text that scroll off the top of the xiterm+thai window (resource: saveLines) and can be scrolled back using the scrollbar or by keystrokes. The normal xiterm+thai scrollbar has arrows and its behaviour is fairly intuitive. The xterm-scrollbar is without arrows and its behaviour mimics that of xterm.

  • Scroll down with Button1 (xterm-scrollbar) or Shift-Next.
  • Scroll up with Button3 (xterm-scrollbar) or Shift-Prior.
  • Continuous scroll with Button2.

🌈 MOUSE REPORTING 🌈

Wanna temporarily override mouse reporting β€” for either the scrollbar or the normal text selection/insertion? Just hold either the Shift or the Meta (Alt) key while doing the mouse action you want. That's it, that's the trick. πŸ’…

If mouse reporting mode is active, the normal scrollbar actions are disabled β€” on the assumption that we are using a fullscreen application. Instead, pressing Button1 and Button3 sends ESC[6~ (Next) and ESC[5~ (Prior), respectively. Similarly, clicking on the up and down arrows sends ESC[A (Up) and ESC[B (Down), respectively.

πŸ¦‹ TEXT SELECTION AND INSERTION πŸ¦‹

The behaviour of the text selection and insertion mechanism is similar to xterm. Slay, lowkey familiar.

  • Selection: Left click at the beginning of the region, drag to the end of the region and release; Right click to extend the marked region; Left double-click to select a word; Left triple-click to select the entire line.
  • Insertion: Pressing and releasing the Middle mouse button (or Shift-Insert) in an xiterm+thai window causes the current text selection to be inserted as if it had been typed on the keyboard. ✨

πŸ‘‘ CHANGING FONTS πŸ‘‘

You can change fonts on-the-fly β€” which is to say, cycle through the default font and others of various sizes β€” by using Shift-KP_Add and Shift-KP_Subtract. Or, alternatively (if enabled) with Alt-> and Alt-<, where the actual key can be selected using resources smallfont_key/bigfont_key. Go off, font queen. πŸŽ€


πŸ’– LOGIN STAMP πŸ’–

xiterm+thai tries to write an entry into the utmp file (usually /etc/utmp), so that it can be seen via the who(1) command, and can accept messages. To allow this feature, xiterm+thai must be installed setuid root. πŸ‘€

🌈 COLORS AND GRAPHICS πŸ’…

okay so IF graphics support got switched on when this thing was compiled, then xiterm+thai can be interrogated with ANSI escape sequences and it can go pixel by pixel instead of just character by character. slay. but bestie, listen β€” the graphics support is still considered beta code. it's giving "we're trying our best". 🫢


on top of the default foreground and background colors, xiterm+thai can show up to 16 colors β€” that's 8 ANSI colors plus the high-intensity bold/blink versions of the exact same ones. here's the whole lineup with their rgb.txt names, no skips, no edits: ✨

     color0   (black)           = Black
     color1   (red)             = Red3
     color2   (green)           = Green3
     color3   (yellow)          = Yellow3
     color4   (blue)            = Blue3
     color5   (magenta)         = Magenta3
     color6   (cyan)            = Cyan3
     color7   (white)           = AntiqueWhite

     color8   (bright black)    = Grey25
     color9   (bright red)      = Red
     color10  (bright green)    = Green
     color11  (bright yellow)   = Yellow
     color12  (bright blue)     = Blue
     color13  (bright magenta)  = Magenta
     color14  (bright cyan)     = Cyan
     color15  (bright white)    = White

     foreground                 = Black
     background                 = White

and here's a lil shortcut for u πŸŽ€ β€” you can also just hand over the color values for foreground, background, cursorColor, cursorColor2, colorBD and colorUL as a number 0-15, which is a convenient shorthand way of referencing the color name of color0-color15. iconic behavior honestly.

⚠️ real talk moment: -rv (reverseVideo: True) fakes reverse video by always swapping the foreground/background colors. and that is NOT what xterm does β€” xterm only swaps them if they haven't already been specified some other way. so, for example:
xiterm+thai -fg Black -bg White -rv

would yield White on Black here... while on xterm that exact same line would yield Black on White. same command, different vibe. πŸ’€


🌸 ENVIRONMENT πŸ¦‹

xiterm+thai sets the environment variables TERM, COLORTERM and COLORFGBG. ✨

it sets the environment variable WINDOWID to the X window id number of the xiterm+thai window, and it also uses and sets the environment variable DISPLAY to say which display terminal to use.

and to go find XPM files, xiterm+thai uses the environment variables RXVTPATH and PATH. 🫢


πŸŽ€ FILES 🌸

  • /etc/utmp β€” System file for login records.
  • /usr/lib/X11/rgb.txt β€” Color names.

πŸ’– SEE ALSO πŸ‘‘

xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5)


πŸ’€ BUGS πŸ™ˆ

okay so. the tea. β˜•

  • Selecting/pasting very large chunks of text is a problem. but β€” and this is the important part β€” just like it is for xterm, it's actually a bug of the pseudo terminal driver of those systems. not us. it's them. periodt. πŸ’…
  • xiterm+thai 1.0 has the utmp support cleaned-up and supports utmpx (i.e. Solaris 2.x), but there are still some problems. the maintainer is literally asking you to please inform him of the correct solutions to utmp problems, because he doesn't have root access of his own to test utmp. 😭 help him out bestie.
  • Cursor change support is not yet implemented.
  • Click-and-drag doesn't work with X11 mouse report overriding. πŸ–±οΈ
  • Graphics support is fairly crude. (we said it was beta, we MEANT it) 😭
  • for some fonts there are problems with pixel-droppings being left behind when simulated bold (overstrike) precedes a space character. and fixing xiterm+thai to handle these cases requires a lot of energy. so the easiest course by far is to:
    1. specify a boldFont, or
    2. specify colorBD, or
    3. if it was compiled without NO_BRIGHTCOLOR, select a foreground color that matches the pixel values of color 0-7 so that overstrike bold won't be used.
  • like xterm, xiterm+thai handles mono-space fonts only, and only TIS-620 fonts are supported. that's the whole font situation. 🌸

✨ AUTHOR πŸ’–

John Bovey, University of Kent, 1992.

Very very very heavily modified by Rob Nation <nation@rocket.sanders.lockheed.com>

Greek keyboard input: Angelo Haritsis <ah@doc.ic.ac.uk>

Utmpx addition (Solaris 2.x) and extensive reworking of pseudo-tty handling and addition of BSD sgtty terminal handling support by Raul Garcia Garcia <rgg@tid.es> 16/10/95.

mj olesen <olesen@me.QueensU.CA> (changes.txt 2.11 to 2.20)

Thai language support: Vuthichai Ampornaramveth <vuthi@mm.co.th>


πŸ‘‘ CURRENT MAINTAINER 🫢

Theppitak Karoonboonyanan <thep@linux.thai.net>


🌈 LOCATION ⭐

<www.linux-france.com>


and that's the whole page bestie, we made it πŸŽ‰ this lil artifact is from the 3rd Berkeley Distribution, version 5, and the date on it is 5 β€” go forth and xiterm+thai responsibly, mwah πŸ’…βœ¨