The X Windows system is a windowing graphical user interface that is almost, but not comletely, entirely unlike Microsoft Windows and the Macintosh. The main feature of this system is that the program that you run to do useful work, such as the XTerm terminal emulator, and the user interface (window, mouse, keyboard) can be on different machines. In fact, the program and its user interface can be running on different continents, with all communications going over the Internet!
The most confusing thing about X Windows is the terminology. After mastering the terminology, it gets better (but only very slightly).
When you launch an X Windows program, it needs to know what server and display its windows on. This is done using an environment variable DISPLAY. If you log into a Unix machine the ordinary way using a graphical login window, or if you use ssh to log into a remote machine, then DISPLAY will already be set up for you. Just give the command to start up a windowing program and it will pop up its windows and run.
However, if you log in to a remote machine using telnet and try to run an X-Windows command, you will get an error message. You will have to set up DISPLAY manually. You can specify DISPLAY in either of two ways:
pc110.cshl.org:0.0
The display is the primary monitor on a computer named
pc110.cshl.org.
You can change the display using setenv. After this, all programs you run will display on the indicated machine.
(~) 54% setenv DISPLAY pc220.cshl.org:0.0
(~) 55% xterm &
(~) 56% xterm -display pc220.cshl.org:0.0 &
Without any security provisions, the X Windows system would allow you to pop up a graphical window on anyone's monitor, anywhere in the world. To avoid this, X servers provide access control based on the client's hostname and IP address.
You can manipulate the access control list with the xhost program. Without any command-line arguments, xhost prints out the list of hosts that are allowed to connect. You can add a host to the list with xhost +hostname, or remove a host from the list with xhost -hostname. In a pinch, give the command xhost + which turns off all access control. Don't forget to run xhost - to turn access control on again when you are through.
There are several tricks to using X Windows programs.
Some X Windows programs have a civilized Edit menu with Cut, Copy and Paste commands. Don't count on it.
Some older X Windows programs use a funky scrollbar that looks like a gray rectangle. To use it, click and drag in the scrollbar with the middle mouse button (or left+right if you don't have one). To scroll upward one screen click the left mouse button anywhere in the scrollbar. To scroll downward one screen, click the right mouse button.
|
| Contents |
Next |