Sat Dec 23 08:00:42 PST 2006
How to Use a Remote X Windows Computer
You are running a UNIX windows box called Local and
want to use one or more programs on another system
- Find out the name of your display -- A below
- Give Remote permission to use your display -- B below
- Login to Remote --- C below
- Tell the Remote where you are --- D below
- Use both the Remote and Local System --- E below
- Tidy up on Remote and come back to your machine -- F below
Programs using the X Windows need to know which visual display unit(VDU)
to use. They store the VDU's name in a variable called DISPLAY.
Each VDU has a name like this:
is the main VDU(number 0) on a computer called jbh300-1. By the
way 'jbh300' means it is in room number 300 on the third floor
of Jack Brown Hall. Many machines have recently had their names
put on a label that is stuck to them.
Finding the name of your DISPLAY
- Try this command:
This puts the name of the display that you are using on the
screen. If it looks like
this is your DISPLAY.
- If it looks like this ":0" or nothing is printed then you must find out
the name and number of your computer. Your Local machine's programs use
the default console display of ":0". You need to find out you machine's
you put a colon and a zero after Local hostname
you will get the name of your DISPLAY.
Take note of your DISPLAY ready for step D below.
Tell your Local system that it is OK for the Remote system to send windows
to your Local machine:
Remote is now allowed to put windows on your computer's screen. This command can be used with any X Windows compatible machine on the Internet. Nearly
all UNIX boxes on the Internet run X Windows. The command
lists all the machines that can use your computer as a host for their
windows. You can remove Remote with
Open a new window on Local that executes a "Remote Login':
xterm -e slogin Remote &
- The xterm command above creates a new window using a standard
terminal emulator called an xterm. This window will be called
Remote and will execute the slogin (secure login) command.
- slogin is a secure program that encrypts the data flowing between
Local and Remote (including passwords) and positively vets to make sure
that you are goin to the right machine. If you try to slogin to a
machine you've not accessed before it will ask you to verify that the
name is correct: answer
(answer like 'y' will not work!).
- If slogin doesn't run on your machine
use rlogin instead. It is not secure but other wise works in the same way.
- Remote should ask you for your password in the ordinary way.
(End of Net)
By the way
rlogin stands for Remote Login and it allows you to use one
computer to do work on another computer. It lets you use
a computer anywhere on the Internet
where you have an account.
slogin is not available everywhere yet. It is for secure encrypted
- The & lets you continue working on yout Local machine as well as
the Remote one.
- If both rlogin and slogin fail try the old but operational telnet command:
(End of Net)
Tell the Remote machine where you are sitting. In the new window
This binds your display name to the variable with name DISPLAY.
Make sure this command has NO spaces!.
It tells the Remote shell that Windows need to be sent to
your_display. Use the your_dispaly from step C above.
Then type in:
The export command tells the shell on the Remote machine that it
must export the DISPLAY variable and the value bound to it
to the programs that you run on that machine.
You can now type any command in the xterm window and have it executed
on Remote. Because it is an xterm you can run programs like vi,
pico, pine, and elm that use an alphanumeric terminal. If they
have a problem it is because they need
before they understand that you are using an xterm. Programs
with graphics : Netscape, xeyes, xman, rose, and so on that use
a graphic window will send it to your DISPLAY.
Close any windows that you may have running on the Remote machines.
Be expecially careful to manually close any Netscape windows and if
you've run 'rose', don't forget 'thorn'!
Then input to Remote either:
This command terminates your rlogin command and closes the new window
( C above).
You are still logged in
on your own machine and can use it normally... don't forget to logout
the usual way.
. . . . . . . . . ( end of section Steps) <<Contents | End>>
I have found it worth while to program my login shell to ask me
where I am to reduce typing by adding these lines to my .profile:
echo "Send DISPLAY to?"
Another version is
echo "Where are you?"
read HOST; DISPLAY=$HOST:0
export DISPLAY HOST
Using a Remote machine while on a Remote machine
You do not repeat step B above since you already know your display. On your
machine input the xhost(A) command and on either machine the xterm
Sending a Display to a Remote System
You can use the similar steps to send a window to a remote computer from
your local machine. Run the xhost command on the remote machine and
set the DISPLAY on your local one. However doing this is dangerous!
You send both the image and the ability to use your computer in that
There is a standard Internet protocol for copying files from machine to
machine that is available on any Internet compatible
computer(even a DOS system) as the ftp program. It can be called with
the name of a Remote system and has the following commands:
- open::=indicates the remote computer.
- close::=terminates connection with Remote.
- user::=logs a user in.
- ascii::=sets ftp up for transfering text files.
- binary::=sets ftp up to transfer binary (GIF, JPEG, EXE,...) files.
- get::=gets a file from Remote.
- put::=puts a Local file on to Remote.
- del::=delete Remote file.
- cd::=changes working directory on Remote.
- lcd::=changes working directory on Local.
- dir::=directory listing.
- ls::=list directory.
- mkdir::=make directory.
- mget::=multiple get with wild cards.
- mput::=multiple put with wild cards.
- mdel::=multiple del with wild cards.
- prompt::=stops/starts asking you about individual files in mget/mput/mdel.
- verbose::=stops/starts giving long-winded responses to your command.
- DISPLAY::= A shell variable that names the machine and the the VDU on the machine where windows etc will appear.
- ftp::program=File Transfer Protocol. ftp can be used to copy files between
computers on the Internet whatever operating system they use.
- Local::=the name used in this document for the machine you are currently running on.
- Network::= See http://csci.csusb.edu/dick/CSciNetwork.mdl.
- orion::=a Sun server that can be used on campus that can run Rational Rose.
- Remote::=the name of a different machine that you want to use.
- shell::= any program that interprets commands input by a user.
- VDU::=Visual Display Unit.
- exit::UNIX_command=Terminate session/shell. ( on some UNIXen).
- logout::UNIX_command=Terminate session.
- rlogin::UNIX_command=Remote Login.
- slogin::UNIX_command=Secure Remote Login.
- telnet::=command allowing remote access to any internet host and port.
- xhost::X_windows=add machine to access control list(ACL) for this machine.
- one_line_summary::= xhost; rlogin; use_it; terminate_it; exit.
. . . . . . . . . ( end of section How to Use a Remote X Windows Computer) <<Contents | End>>