LAB #2

CSC 101

Pico, HTML, Netscape

R Mohammadi

September 1998

 

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:

 

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

    mkdir public-html

     

  2. Setting permissions

    1. chmod og+rx . don't forget the dot
    2. 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

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).

 

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

     

    <!--

    Author: John Doe.

    .

    .

    .

    </html>

     

  9. Click the Edit pull-down menu at the top of the window and choose Copy.
  10.  

     

  11. Click anywhere in your Telnet Window.
  12.  

  13. 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.
  14.  

     

  15. 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.
  16.  

  17. 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.
  18.  

  19. Ctrl-X (Hold Ctrl key down and click on the X)
  20.  

  21. In response to Save modified buffer, respond with a y
  22.  

     

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

  25. 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.
  26.  

  27. Make the file public
  28. chmod og+rx 101.html

 

5. Bring up your page in Netscape

    1. double-click in the Location dialog box in your Netscape window.
    2.  

    3. type your web page address http://www.oswego.edu/~your-user-name/101.html
    4.  

    5. click on CSC101 Lab Page, Note that you can get copies of the lab modules from this page.
    6.  

    7. Click on Lab #2 to see the lab2 module.
    8.  

    9. 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.  

  3. Close both Telnet and Netscape.

  4. Go through the Shut Down process from lab1.