To Start Applications in a Terminal Window
The general syntax for starting an application is:
application [options] & |
application--the application name
options--a list of optional information to be passed to the application
&--indicates that the application runs in the background; that is, you can continue to use the Terminal window while the application is also running
Refer to the man page or other documentation for each application to find the command and options to use for that application.
For example, to start a digital clock from the command line, type:
xclock -digital & |
To Enter a Command
For example, to obtain a list of the files in the current directory, type:
ls |
To obtain a list of the files in the current directory and print it on the default printer, type:
ls | lp |
To Copy and Paste Text
Use mouse button 1 and drag over the text you want to move.
The text appears highlighted.
Release mouse button 1 after all the text you want is highlighted.
The highlighted text is copied to an internal clipboard. The text is not removed from your original source.
Click mouse button 2 where you want to insert the text.
A copy of the contents of the clipboard is pasted at the location you indicated. You can make additional copies by repeating the above steps.
To Resize the Window Contents
When you change the size of a Terminal window, applications running in the window may not know about the resizing. Use this procedure to resize the application's output.
eval `resize` |
Note that resize is enclosed within a set of single close quotation marks rather than double quotation marks.
Running dtterm on Another System
You can run dtterm on another system through various commands:
The -display option
The rlogin command
The remsh command
The Terminal menu item in Address Manager (when the remote host is displayed)
Using the -display Option
-display host:display[.screen] |
where
host--the name of a valid system on the network.
display--the number of the display on the host.
screen--Optional. The screen within the display. The default is 0.
You can find these values by typing env, and examining the DISPLAY line. The terminal emulator is running on your system, but the window shows on another system.
For example, the following command starts a dtterm window on the host computer named hpcvxdm:
dtterm -display hpcvxdm:0 & |
Using rlogin
You can use rlogin in an existing Terminal window to log in to a remote host. Once the window is acting as a terminal to the remote host, you can run applications there, redirecting the display back to your system if you desire.
For example, the following command logs onto a system named there, runs the client xload, and redirects the display back to your original system. Assume your system is named here.
rlogin there xload -display here:0 |
Using remsh
The remsh command starts a shell on a remote host, performs some client activity (often starting a terminal emulator on that host), and redirects the display back to your original system if desired.
It has the syntax:
remsh remote -n client -display system:display[.screen] |
where:
remote--the remote host name
client--the program you want to run on the remote host
system:display[.screen]--the host and display on which the results are to be displayed
The remsh command is often used when customizing a menu to access other hosts.
For example, the following command runs xload on the remote host named there, and directs output back to your system, here.
remsh there -n /usr/bin/X11/xload -display here:0.0 & |
Using the Terminal menu item in Address Manager
Address Manager (see Chapter 18, Using Address Manager) displays details of selected hosts when the Hosts is selected on the Search menu.
When the details of a remote host are displayed in the scrolling pane, the Terminal menu item is displayed on the Actions menu. Choosing this menu item runs a terminal session on the remote host from your local display (see "Performing Actions on Host Cards").