Using X Window
Last revision August 6, 2004
Table of Contents: |
Using an X terminal, PC or Macintosh as an X server
To use a PC or Macintosh as an X Window display, you must run an X server program on that computer. Commercial programs that have worked well here in Earth Sciences are Exceed for Windows PCs and eXodus for Classic Macintosh (MacOS 8 or 9). Apple has integrated the X Window server as a downloadable option for MacOS X (version 10.2 or later). There is also an alternative XDarwin open-source port of X Windows for MacOS X (all versions).
A dedicated X terminal is basically a specialized computer that runs only a single program - the X server. In this regard, it operates much like a PC with an X server program. Some groups in Earth Sciences use such X terminals (from Tektronix or NCD) because they require no active management.
In its simplest form, such an X server program will start up on the PC or Macintosh without opening any windows (clients). This is because the clients normally run on another computer, not the PC or Macintosh, and you must first establish a connection to that other computer.
You can use this type of X server or terminal in two different ways.
First, you can create an X session on a remote (usually Unix) computer that looks just like the desktop would on a graphics console attached to that remote system. This is done with the XDMCP protocol. The remote computer is considered the controlling computer for this X display. In this case, the X server window manager takes over either the entire PC display, or a large portion within a single window. This is often called a rooted display.
If you create an X session on your PC, then the normal X initialization files stored on the remote system (such as .xsession or .Xdefaults or the files created by CDE) will be run to customize the display to your preferences.
In this rooted mode, you get the full use of the X Window manager features no matter which PC or X terminal you are using. On the other hand, this mode starts up many associated processes on the remote (Unix) computer that you may not need for a specific task.
Second, you can use some kind of remote command facility on the PC, Mac, or X terminal to start only specific X client programs on the remote (Unix) computer. These X clients will open their individual windows on your PC display. The remote computer is not controlling your display. In this case, the windows from the X client programs are often intermingled on the PC display with windows from its native operating system, and controlled the same way as the native system. This is often called a rootless display.
In the rootless mode, your display is not customized by the initialization files stored on the remote system, unless you specifically run commands on the remote system to do that. This mode is useful when you are using local programs on your PC and just want to get output from a single specific program on a remote (Unix) system.
For rootless operation, you can use a program on the PC or Mac such as ssh, telnet, rsh, or rexec to start up the client X programs that you want on the remote (Unix) computer.
The safest and easiest way to run in rootless mode is to use an ssh client on your PC or Mac that supports X Window tunneling. Ssh will encrypt your password and all your X Window traffic. It sets up a fake X display number on the remote computer to which your clients on that system direct their output. Then ssh tunnels that output back to the local PC or Mac. Ssh also takes care of the X Window access control issues automatically.
If you don't have an ssh client for your PC or Mac that supports X Window tunneling, then connect to the remote computer with the most secure login method that you have, preferably Samson with PCLeland or MacLeland to campus Unix computers, or ssh elsewhere, with plain telnet as the last resort. Once connected, run the xterm (terminal emulator window) program in the background, pointing back to your PC or Mac as the X display (see starting clients). Once the command line window from the xterm program pops up on your PC display, you can then quit the Samson/ssh/telnet session and start any remaining X clients that you want from your xterm window.
X server programs for PCs and Macintosh (such as Exceed and eXodus) often include remote command facilities that use the rexec or rsh protocols to start X clients on the remote system. These allow you to customize a menu of commands on your PC that you can execute at any time to get an appropriate X client running on the remote system. Be aware that many server systems, such as pangea, accept connections to the rexec, rsh, and similar services only from the local network, for security reasons. If these remote commands don't work from your X server software, that is the likely reason.