Whole document tree 7. X and the Command LineWhat would a Unix-like operating system be without a command line interface? The command line can be useful, and is readily available with X. In fact, for many it is an integral part of their X working environment. Any X program can be started directly from the command line just by typing the program name at a shell prompt in an xterm, or other terminal window. Most applications will have a very rich set of command line "options", such as background color, font, geometry (screen placement), etc, etc. Command line options over-ride compiled in defaults, or other system enabled "resources". Many traditional X programs will use the same basic names for command line options. All applications written using the MIT X Toolkit Intrinsics (Xt) (such as those included with XFree86) automatically accept the following options. Some non-Xt applications also use these, or something similar. For instance, "geometry" is close to a universally accepted option.
These are the most noteworthy. There are others. Many programs will have their own additional options that are application specific. Many newer applications today don't necessarily adhere to the Xt standards, and will use their own options, or those provided by their respective toolkit. If nothing else, man pages are a good reference for command syntax, and are your friends here. Or, the application will have a "--usage" or "--help" command line switch to list available options:
7.1. xterm and friendsSooner or later, most of us need to access the "command line" for one reason or another. For some, this might even be a common way of working in X. In addition to being able to launch X applications from the command prompt, there is also a wealth of programs that run in "text mode" for Linux. This is possible via "terminal emulators" such as xterm. The closest counterpart from Microsoft is the so-called DOS-box, which is child's play by comparison. Linux terminals support color, full mouse copy/paste (and some wheeled mice), pseudo-transparency and pixmap backgrounds, scrollbars, menus and generally a slew of other features. While xterm is the best known such terminal emulator, there are many similar programs. To name a few: Eterm, rxvt, aterm, konsole (KDE) and gnome-terminal. In typical usage, when a terminal emulator window is opened, a shell is started for the user to interact with. The default for essentially all Linuxes, is the bash shell. So when all is said and done, the user is interacting with X, the terminal, and the shell all at once. Each may have it's own influence. For example, how keystrokes are handled since they move from hardware to X server to terminal to the shell and finally echoed back to the user. Quick and easy terminal configuration is done via the "$TERM" variable, which is typically set in one of the user's shell configuration files. Or the terminal itself will have a compiled in default. The default value for this is most often "xterm":
Normally this is sufficient, as your vendor has already set this up in a reasonable way. The "$TERM" variable is actually a reference to an entry in the "termcap" database (man termcap), which is typically installed as /etc/termcap. Unless you are doing something really unusual, you probably won't need to change this. Some additional terminal configuration can be done with the stty command (see man page). Terminal configuration is really beyond the scope of this document. The terminal application itself (e.g. xterm) will also have various configuration options. Permanent settings are best stored in a ~/.Xdefaults or similar file for those applications that support this. Generally speaking, applications with a GUI configuration (such as gnome-terminal), will be configured by their own menu driven configuration instead. Also, you are interacting with the shell too, which can have it's own impact, particularly on how keystrokes are handled at the shell prompt. For bash, this can be adjusted in ~/.inputrc. Again, this is beyond the scope of this document, but check with either local or on-line bash (or other shell) references. Terminal emulators like xterm require a monospaced font. So forget about TrueType or Type 1 fonts. |