Читать книгу Linux Command Line and Shell Scripting Bible - Christine Bresnahan - Страница 12

Part I
The Linux Command Line
Chapter 2
Getting to the Shell
Using the xterm Terminal Emulator

Оглавление

The oldest and most basic of terminal emulation packages is xterm. The xterm package has been around since before the original days of X Window, a popular display server, and it's often included by default in distributions.

Although xterm is a full terminal emulation package, it doesn't require many resources (such as memory) to operate. Because of this, the xterm package is still popular in Linux distributions designed to run on older hardware. Some graphical desktop environments use it as the default terminal emulation package.

Although it doesn't offer many fancy features, the xterm package does one thing extremely well: It emulates older terminals, such as the Digital Equipment Corporation (DEC) VT102, VT220, and Tektronix 4014 terminals. For the VT102 and VT220 terminals, xterm can even emulate the VT series of color control codes, allowing you to use color in your scripts.

Note

The DEC VT102 and VT220 were dumb text terminals popular for connecting to Unix systems in the 1980s and early 1990s. A VT102/VT220 could display text and display rudimentary graphics using block mode graphics. This style of terminal access is still used in many business environments today, thus keeping VT102/VT220 emulation popular.

Figure 2.5 shows what the basic xterm display looks like running on a graphical Linux desktop. You can see it is very basic.


Figure 2.5 The xterm Terminal


The xterm terminal emulator can be tricky to find these days. Often, it is not included in a desktop environment graphical menu arrangement.

Accessing xterm

In Ubuntu's Unity desktop, xterm is installed by default. You can access it via Dash⇨Search and type xterm. xterm shows up in the Dash home area as an application named XTerm. Click that icon to open the xterm terminal emulator.

Note

You may see another terminal called UXTerm when you search for xterm on Ubuntu. This is simply the xterm emulator package with Unicode support.

In the GNOME and KDE desktop environment, xterm is not installed by default. You must install it first (see Chapter 9 for help on installing software packages). After it's installed, you must start xterm from another terminal emulator. Open a terminal emulator for CLI access, type xterm, and press Enter. Also, remember that you can create your own desktop launcher to startup xterm.

The xterm package allows you to set individual features using command line parameters. The following sections discuss these features and how to change them.

Command Line Parameters

The list of xterm command line parameters is extensive. You can control lots of features to customize the terminal emulation features, such as enabling or disabling individual VT emulations.

Note

xterm has a huge number of configuration options – so many that they cannot all be covered here. Extensive documentation is available via the bash manual. Accessing the bash manual is covered in Chapter 3. In addition, the xterm development team provides some excellent help on its website: http://invisible-island.net/xterm/.

You can invoke certain configuration options by adding a parameter to the xterm command. For example, to have the xterm emulate a DEC VT100 terminal, type the command xterm – ti vt100 and press Enter. Table 2.17 shows some parameters you can include when invoking the xterm terminal emulator software.


Table 2.17 xterm Command Line Parameters


Some xterm command line parameters use a plus sign (+) or minus sign (-) to signify how a feature is set. A plus sign may turn a feature on, while a minus sign turns it off. However, the opposite can be true as well. A plus sign may disable a feature, while a minus sign enables it, such as when using the bc parameter. Table 2.18 lists some of the more common features you can set using the +/– command line parameters.


Table 2.18 xterm +/– Command Line Parameters


It is important to note that not all implementations of xterm support all these command line parameters. You can determine which parameters your xterm implements by using the – help parameter when you start xterm on your system.

Now that you have been introduced to three terminal emulator packages, the big question is which is the best terminal emulator to use? There is no definite answer to that question. Which terminal emulator package you use depends upon your individual needs and desires. But it is great to have so many choices.

Linux Command Line and Shell Scripting Bible

Подняться наверх