HOW DOES MRXVT WORK?

Terminator <jimmyzhou@users.sourceforge.net>

Feburary 7, 2005



. DISCLAIMAR

This is an incremental documentation dedicated in recording my
understanding of mrxvt and X terminal emulators. I just start
to write it, so please do not expect it to be complete by any
time soon.

In addition, I do not have a throughout understanding of mrxvt
(no kidding) and X terminal emulators. So please do not expect
that everything here is accurate. There is absolutely not any
warranty about correctness of information in this article.

This document is written for developers and end users who want
to understand the working mechanism of mrxvt and X terminal
emulators.



. INTRODUCTION

Mrxvt is a terminal emulator for X Window System. The basic
function of a terminal is to provide an interface between the
keyboard user and the host. An X terminal emulator provides
such an interface in the environment of X Window System. Mrxvt
is a modern X terminal emulator that provides lots of features
beyond the basic function of a terminal emulator. Such features
include pseudo-transparent background, multi-tab, etc.

The basic function of a terminal emulator is to receive the user
input through keyboard, to send the input to a slave process that
executes along with the terminal emulator process, to receive the
output from the slave process, and to echo it to the screen. For
the sake of simplicity in this article, we make several assumpt-
ions:

  . the sole user input device is keyboard;

  . the slave process is running a shell program;

  . the sole interface between the user and the terminal is the
screen controlled by the terminal process;

  . the operating system is a Unix-like system.

Therefore, for an X terminal emulator like mrxvt, the screen is
a window on an X display instead of the entire computer screen.
The keyboard input is sent to the window as key press and release
events instead of the standard input stream. The output is drawn
in the window through text drawing routines of Xlib.



. EXECUTION

