|
|
Using the X Window System > Chapter 8 Using the X ClientsStarting Remote Programs |
|
A remote client is a client that runs on a computer other than the computer running the X server. In other words, a remote client runs on one computer while its output is displayed on another. There are several ways to run programs on a remote host from a command line:
If the client produces output on a display, you must specify the display and screen on which you want the output to appear. You can use an existing terminal emulator window to log into a remote host. Once the window is acting as a terminal off the remote host, you can run clients there and direct the output to any display. For example, the following commands log into and start xload on remote host hpthere and display the output on local system hpxhere.
The benefit of using remsh instead of rlogin is that the the local system starts only one process (the client) with a remote shell; with the remote login, the local system starts both the remote login and the client. The following syntax starts a remote shell on a remote host, redirects remsh input, starts a client, and directs output to the local display. remsh remote -n client -display local:display.screen &
For example, the following command runs xload on remote host hpthere and directs output to the display of system hpxhere.
Generally, remsh is preferred to rlogin for starting a remote program from a menu. For example, the following line added to the workspace menu starts a remote hpterm window on remote host hpthere:
At the command-line prompt of an existing window, you could execute:
This example starts a new hpterm client and directs its output to the local display (-display hpxhere). The -e option executes a remote shell on hpthere that connects the window to the remote host hpthere and lists the files in your home directory there. When the ll command finishes executing, the window created for it to run in will disappear. Thus, this method of starting remote non-clients is usually not desirable. |
|