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.
- Type pico 101.html
- Press Ctrl-L (hold the Ctrl key down and hit L), this refreshes the window when using pico.
- Start up Netscape:
- Position mouse on the Start Icon and click your left mouse button.
- highlight Programs and pick
- Once Netscape is started, double-click in the Location dialog box and type http://www.cs.oswego.edu/~mohammad/101/sample.html
- Use your mouse pointer and the left mouse button to select the segment of the text that the web page tells you to:
<html>
<!--
Author: John Doe.
.
.
.
</html>
- Click the
Edit pull-down menu at the top of the window and choose Copy.
- 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.
- 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.
- 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.
- 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.
- Ctrl-X
(Hold Ctrl key down and click on the X)
- In response to Save modified buffer, displayed at the bottom of the screen, respond with a
y
- The file name to be save should be 101.html, just press the Enter key.
- 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.
- Change permissions, so anybody in the world could see your web page.
chmod og+rx 101.html
- 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.
- Double-click in the Location dialog box in your Netscape window.
- Type your web page address http://www.oswego.edu/~your-user-name/101.html
- Click on CSC101 Lab Page, Note that you can get copies of the lab modules from this page.
- Click on Lab #2 to see the lab2 module.
- Show your web page to your lab instructor, you have completed this lab.
6. Logout
- Be sure to type logout at your UNIX prompt in your Telnet window.
- Close both Telnet and Netscape. How would you bring back the Netscape window, if you had minimized it before?
- Go through the Shut Down process from lab1 to shut down your computer properly.