LAB #2

CSC 101

Pico, HTML, Netscape

R Mohammadi

 

 

Objectives:

 

Learn about ...

pico, an editor for creating and updating files in UNIX.

HTML, HyperText Markup Language.

Netscape, a Web Browser.

 

About this lab ...

 

First you will set up your account on rocky for creating home pages. You will then learn a simple text editor in UNIX to create an HTML file. HTML is the language used for making web pages. This lab is complete once you access your web page and the HTML version of this lab module on the web. I ask that you don’t take any copies of the lab module with you when you complete the lab as from now on you will be able to access them on the web and can print them if you wish.

 

1. login

Follow the steps for login procedure for IBM PC compatibles from lab1.

 

2. Set up your account for creating web pages:

 

a. You need to be in your home directory (the directory you are in when you login)

mkdir public-html

 

b. Setting permissions

Ask for help if you get an error when trying either of these two commands.

A. chmod og+rx . don't forget the dot

B. chmod og+rx public-html

 

3. Change Directory

get into your public-html directory

cd public-html

 

4. Use pico to create a web page and Netscape to copy a template into it.

In order to create documents in UNIX, you need an editor. pico is the editor of choice for novice users on UNIX. In fact, you have already used it! pico is based on the pine mail system composer. It is important to remember that the files that you create will stay in your computer account until you remove them. In this part of the Lab you will create an HTML file (a web page). You will copy/paste the content of this web page from a page that I have already created and make the necessary changes.

 

    1. Type pico 101.html
    2.  

    3. Press Ctrl-L (hold the Ctrl key down and hit L), this refreshes the window when using pico.
    4.  

    5. Start up Netscape:
    1. Position mouse on the Start Icon and click your left mouse button.
    2. highlight Programs and pick

 

    1. Once Netscape is started, double-click in the Location dialog box and type http://www.cs.oswego.edu/~mohammad/101/sample.html
    2. Use your mouse pointer and the left mouse button to select the segment of the text that the web page tells you to:
    3. <html>

       

      <!--

      Author: John Doe.

      .

      .

      .

      </html>

       

    4. Click the Edit pull-down menu at the top of the window and choose Copy.
    5.  

       

    6. Click anywhere in your Telnet Window. You may have to first minimize your Netscape window to make the telnet window visible again. Click Netscape's minimize button if necessary. The Minimize button is one of the buttons in the upper right corner of the window; it’s the one with the dash in it.
    7.  

    8. Click the Edit pull-down menu at the top of the Telnet window and choose Paste. You should see the text copied from the web page in your Telnet window.
    9.  

    10. Replace all occurrences of John Doe with your full name. Basically, you need to use the arrow keys to get to the names and use the backspace key to delete them and then simply type your own name in their place. Your name should appear in three places.
    11.  

    12. Replace ~jdoe appearing in http://www.oswego.edu/~jdoe with your account name. For example, if your account name is tjones2, you use ~tjones2 in place of ~jdoe.
    13.  

    14. Ctrl-X (Hold Ctrl key down and click on the X)
    15.  

    16. In response to Save modified buffer, displayed at the bottom of the screen, respond with a y
    17.  

       

    18. The file name to be save should be 101.html, just press the Enter key.
    19.  

    20. You should now have a 101.html file. Type ls (The letter l, followed by the letter s) at the UNIX prompt to verify that you have the file.
    21.  

    22. Change permissions, so anybody in the world could see your web page.

chmod og+rx 101.html

 

  1. Bring up your page in Netscape

If you minimized the Netscape window earlier, you will need to click on the Netscape button in the Task bar at the bottom of the screen to bring it up again.

 

    1. Double-click in the Location dialog box in your Netscape window.
    2. Type your web page address http://www.oswego.edu/~your-user-name/101.html
    3. Click on CSC101 Lab Page, Note that you can get copies of the lab modules from this page.
    4. Click on Lab #2 to see the lab2 module.
    5. Show your web page to your lab instructor, you have completed this lab.

 

6. Logout

  1. Be sure to type logout at your UNIX prompt in your Telnet window.
  2. Close both Telnet and Netscape. How would you bring back the Netscape window, if you had minimized it before?
  3. Go through the Shut Down process from lab1 to shut down your computer properly.