CS551 - Self-Study Exercises

Exercise 0: Setup Procedure for X


A special X environment has been supplied for work in this course. It is important that all class work be done inside this environment, since your normal working directories are likely to have files that will interfere with X's interpretation of your programs.

  • In your home directory on flop, create a subdirectory for your coursework called cs551. Move into the subdirectory and copy all files from the ~pancake/cs551 into your course directory; be sure to include the files beginning with . as well. [There will be 7 files beginning with . and goX.]

    Now, move file goX from your course directory to your home directory. The last step is to change back to your home directory. [NOTE: While you work in the "course environment", you won't have access to the UNIX environment variables or aliases you set in your normal .cshrc. If you wish to use any personalized UNIX settings, go ahead and add them to the cs551/.cshrc -- but don't just copy your file on top of the new settings.]

  • To enter the course environment, use the goX command right after logging on. This script takes one required argument, specifying the IP address of the X terminal where you are logged on; for example:
    goX 128.193.32.161:0
    The number or name will be found on a label attached to the monitor.

    A second argument is optional, and is used to override the default choice of window manager (twm). To use X with no window manager in effect, use -wmnone as the second argument:
    goX 128.193.32.161:0 -wmnone


    For Workstations in Dearborn 115 and Hovland 108 Labs

    The Dearborn 115 workstations bring up "HP's Visual User Environment".

    The following steps need to be followed to run the course enviornment:

    1. After logging in close all the windows execpt the xterm window. This will reduce the clutter of windows when you get into the course enviroment.

    2. In the xterm window type xhost +flop.engr.orst.edu (it will allow flop to display on the workstation you are using).

    3. Type xterm -e rlogin flop.engr.orst.edu & . This will give you a new xterm window for flop.

    4. Make sure that the xterm windows don't overlap.

    5. In the flop windows type ***but Do not hit enter yet *** goX hostname:0.0 where hostname is the name or IP number of the machine you are logged onto.

    6. Go to the local xterm window and type ps -u your_login_name (to get a list of the process that are running for your session).

    7. One of the processes will be vuewm (twm or mwm) under the "COMMAND" column. Note the corresponding number in the "PID" column.

    8. Type kill -9 pid where pid is the number you note in the previous step.
      (Note on Hovland 108 workstations this may cause the session to end, because of the way the default .xsession file is setup. One solution is to follow steps 1 and 2 from the begining of the exercise to get the course .xsession.cs551 file).

    9. At this point there is no window manager running and the last step is a little tricky. Using the leftmost mouse button select everthing on the line after "kill -9 pid". Move to the flop window and click with the center mouse button. (You are typing ENTER in a complicated way :).

    10. The "twm" window manager should start at this point and you are in the course environment.


    SPECIAL NOTE: You may accidentally crash or freeze the system.

    Workstation: If X disappears, leaving you at the command line, issue the following commands to "clear" the keyboard mappings:
    clear_colormap kbd -a
    then restart X. If you are frozen inside X, log on from another terminal and get a list of active processes with ps -aux. Kill all the X-related processes. Once you are at the UNIX command line, finish off with the keyboard clearing commands.


    Exercise Files

    The files needed to carry out the exercises are mounted on flop, the College of Engineering server.
    Questions and comments to cs551@engr.cs.orst.edu, 17 December 1996