ESM4714
Scientific Visual Data Analysis and Multimedia
Exercise #1: Internet skills and remote visualization


Internet Software: (1) file transfer: secure file transfer protocol (sftp) and (2) remote visualization: X-DataSlice (xds), secure shell (ssh) with X-windows.

Objective:
Understand how to logon to a remote workstation using ssh, transfer a data file to and from a remote workstation using sftp, run a graphics application (e.g.xds) on a remote workstation but transfer xds images back to your local workstation running X-Windows.


Procedure: NOTE: Highlighted italic text denotes user response.

  1. Logon to a SMVC workstation (mercury -> pluto.smvc.vt.edu)i. This is called your local workstation.

  2. Mount your optical disk (see procedure for mounting scsi devices)

  3. Go into the ESM4714 directory either on your optical disk or in your home directory.

    On your optical disk:       % cd /rmdisk/rmdisk0/ESM4714/examples/brown/make_hdf
    In your home directory: % cd ~username/ESM4714/examples/brown/make_hdf

    NOTE: If you do not have an ESM4714 directory either on your optical disk or home directory create one (If you don't have an optical disk, you can get a blank optical disk upon request by contacting rkriz@vt.edu)

    Procedure for creating a ESM4714 directory on your optical disk and home directory.

  4. "sftp" to a the homework account on a remote workstation: (sftp is used here as a verb)

    % sftp homework@mars.smvc.vt.edu (e.g. mars is the remote workstation).

    When you "sftp" to a remote workstation you are required to logon:

    Connecting to mars.smvc.vt.edu....
    homework@mars.smvc.vt.edu's password: homework-password given in class

    The system will respond with the prompt sftp>

    Try creating a new directory, changing directories and list the files in that directory

    sftp > mkdir WorkSpace (create a directory named WorkSpace)
    sftp > cd WorkSpace (move into the directory WorkSpace)
    sftp > ls (list all files in the present working directory, of coures it's empty)
    sftp > pwd (list the name of the Remote working directory)

    NOTE: Not all UNIX system commands or wild characters will work at the sftp prompt
    for example ls -lag will not work but the simpler version ls will work. If at anytime you
    forget the possible choice of commands, type sftp > ?

    The following command sequence assumes you are presently in the directory
    /rmdisk/rmdisk0/ESM4714/examples/brown/make_hdf on the local workstation
    and on the remote workstation you are in the directory Workspace.

  5. To transfer the binary HDF file "brown.hdf" from the local workstation to the remote workstation.

    sftp > put brown.hdf

    NOTE: The OLD ftp command    ftp > mput *.hdf   allowed multiple HDF file transfers. The OLD ftp command mput excepted a wild character * and saved alot of time where each file transfer queried the user (y/n) before the transfer was intitiated. Unfortunately there is NOT an equivalent sftp command as it works on the SMVC workstations but on the Linux OS there is. To transfer multiple files the "scp" (secure copy) command will work. To learn more about how to use scp do a man-pages on scp: > man scp.

  6. Quit sftp

    sftp > quit

    The file brown.hdf should have been successfully transfered to the WorkSpace directory on the student homework account and ready for the next step -- "remote visualization".


Procedure: Remote visualization using ssh and X-windows

Try this procedure first with two workstations in the SMVC and then try it with a SMVC workstation and a remote site workstation. Lets arbitrarily choose mars and venus as our two workstations in the SMVC. Find a partner and logon to each other accounts on different workstations.

  1. Add another workstation to the xhost list. This is not necessary since ssh does this for you automatically but it's good to know.

    If you are on mars % xhost venus.smvc.vt.edu or just % xhost venus
    If you are on venus % xhost mars.smvc.vt.edu or just % xhost mars

  2. Logon to the remote workstation where the file "brown.hdf" was sent by sftp.

    NOTE: Here we assume you are logged onto venus and you want to remotely
    visualize what your are doing on mars back to venus, which is the workstation
    you are sitting at. Recall you sftp'd the brown.hdf file onto mars.

    % ssh -X homework@mars.smvc.vt.edu (where you sftp'd the brown.hdf file)
         (Here -X parameter is not necessary but if used, forces
         images to be transfered back to your local workstation)

    NOTE: Because the way the SMVC workstations are setup there is no need to
    to remotely logon to another SMVC workstation, since you can logon on to your
    account from any of the SMVC workstations. Our motivation here is for
    demonstration purposes only. However this procedure is necessary when you connect
    to a remote workstation outside the SMVC. This is why we suggest you find a partner
    and logon to two different accounts in the SMVC to check that this procedure works.

    HISTORICAL NOTE: The ssh logon automatically sets up the X-Windows DISPLAY
    environmental variable so the X-images get transferred back to the remote workstation.
    Prior to ssh, telnet was used to remotely logon to another workstation where the DISPLAY
    environmental variable had to be defined to send images back to your local workstation.

    For Example:
    % setenv DISPLAY mars.smvc.vt.edu:0.0 (for transfering images back to mars)
    % setenv DISPLAY venus.smvc.vt.edu:0.0 (for transfering images back to venus)

    NOTE: you must append the workstation internet name with a :0.0. This an X-window
    protocol where you can control window attributes by using numbers different than 0.0.

  3. Start NCSA's XDataSlice on the remote workstation

    % xds (xds instructions: exercise#5)

    NOTE: the X-windows that appear on your local workstation are actually running on the remote workstation. Choose and open brown.hdf on the remote workstation window and try drawing a few simple images in xds. Although the xds application is rather straight forward we created exercise#5 on how to use xds. Here we also assume you have a copy of xds in your ~/bin directory. If you don't let us know and we will install xds in your ~/bin directory.

    Comments:
    All applications that use X-windows on other workstations in the VT-CAVE lab should transfer images the same as was done in our xds example. With these skills you can transfer visual information between any two UNIX workstations (SGI, SUN, Linux, the VT-CAVE computer, etc.) where you can now run and view applications that are foreign to your own workstation. This is the begining of knowing how to synergistically use other resources on other computers via the network. Later we will learn how to use AVS where the application is constructed from a network of modules that can be executed remotely across the network: This approach enables researchers to share their results over the network and creates "distributed visualization" environment.

    Recommendations:
    As you learn how to use other tools try this same method using PV-Wave or AVS. Try accessing other resources by using the network. This may come in handy when don't feel like walking over to the Viz Lab or the SMVC classroom on a cold winter day or when you walk into the Viz Lab and someone is on the machime you want to use: in that case just find a free workstation and use the procedure above to run your application.


Procedure: Introduction to UNIX (by Joe Vandyke)

Here are notes prepared by Joe VanDyke, Who was a guest lecturer January 28, 1997.

Joe has prepared some useful web page summaries for his lecture and are posted here as a reference.

  1. Intoduction to UNIX
  2. Download PDF file of Instroduction to UNIX


Click image to return to Visualization home page.
R.D. Kriz
Virginia Tech
College of Engineering
Revised 01/10/03

http://www.sv.vt.edu/classes/ESM4714/exercises/exer1/exer1.html