CS 100 - Computer Literacy, Spring 2006

Lab 2

For this assignment, you are to modify your existing default UIC web page. You will need to have an icarus account and be familiar with a few UNIX commands:

You may also wish to read the ACCC's Web Publishing for Beginners.

Creating and Using Your UIC Icarus UNIX Account

This was included in Lab 1, so you may have already completed this.

Icarus is UIC's Unix machine. Every student can have an account on the icarus machine. Your icarus account name and password is the same as your netid and password. To create an icarus account, goto the the Create an ACCC Account web page.

You should log onto icarus using SSH which stands for Secure SHell. The ACCC has some web page support for SSH. An alternative program to SSH is PuTTY. The added security of these programs is a level of encryption that the traditional telnet program lacks.

Once you are logged into icarus, you will need to learn some basic UNIX commands to get around and perform various tasks. Again, the ACCC has some web page support for using icarus. In particular the ACCC's web page UNIX 101 give a nice summary on various UNIX commands.

The Basic UNIX Commands

The UNIX commands that you will need for this lab are:

Other UNIX Commands

There a literally hundreds of UNIX commands and I doubt that anyone knows all of them. A few other UNIX commands that you may want to know are:

Your UIC Home Page

Once you have an icarus account created, the ACCC will automatically create a default (and boring) homepage for you. You can access your homepage with the address of:
http://icarus.uic.edu/~NETID
or
http://www2.uic.edu/~NETID

where NETID is your own Net-ID
We have created a link to all of the default homepages for everyone in the class on the CS 100 Student List page.

This home page is stored in the file called index.html in the directory public_html within your Icarus account.

Once you log onto your icarus account, you are in your "home directory". Type the command:

ls
to see what files and "sub-directories" are in you home directory. You should have a directory called public_html (if not, it can be created with the make directory command "mkdir"). Now change to that directory by typing the command:
cd public_html
Now type the ls command to see what is in your public_html directory. The files in this directory are made available to the world by UIC's web server. Your default web page should be in a file called index.html. To change this file (or create it if it doesn't exist) type the command:
pico index.html
This will start the pico text editor and will allow you to make changes to this file.

HTML Tags

When using an simple editor like pico to create or modify web pages, you will need to type in your own HTML tags to make the page display as you would like it to. For this assignment, we will only introduce one HTML tag: LINE BREAK.

All HTML tags start with an less than symbol, then contain the text that specifies the specific tags and end with a greater than symbol.

If the Text File Contains,The Web Page Displays
Hello      There !  How   are you   ? 
Hello There ! How are you ?
Hello     There! <br>  How   are  you?
Hello There!
How are you?
Hello     There! <br> <br> How   are  you?
Hello There!

How are you?
Hello   
There!
How 
   are
you?
Hello There! How are you?
Hello   
There!  <br> 
How 
   are
you?
Hello There!
How are you?
Hello   
There!  <br>   <br> 
How 
   are
you?
Hello There!

How are you?

Lab Assignment 2

Due: Friday 1/27/2006 by 12:00 noon.

Troubleshooting

If your web page is viewable, then don't worry about the following information for now.

If you cannot view your file, the most likely error is that the permissions are not set correctly for your home directory, your public_html directory or your index.html file. This is were the ls -l command comes into play. The following information is also discussed in the ACCC's Web Publishing for Beginners in the "First Steps" section.

When I am in my public_html directory and enter the ls -l command, the result for my index.html file is:

-rw-r--r--   1 troy     eecs         294 Oct  7  2004 index.html
The key part here is the -rw-r--r--. If the last 3 characters do not contain the r, the page won't be displayed. To fix this type in the following command while in your public_html directory.
   chmod a+r index.html
This command will change the permission to allow the web browsers to read the index.html file in your public_html directory.

There are two other possible places were the permissions could be set wrong. One is at your home directory. The other is with the public_html directory. To fix both of these we need a variation on the chmod command. Entering the following command sequence should solve any problems.

  1. Type in the following command to make sure you are in your home directory:
       cd
    
  2. Type in the following command to set the permissions for your home directory. Note the period at the end is a very important part of this command.
       chmod a+x . 
    
  3. Type in the following command to set the permissions for your public_html directory.
       chmod a+rx public_html 
    
  4. Type in the following command to change to your public_html directory.
       cd public_html
    
  5. Type in the following command to make sure all of the files in your public_html directory are readable by a web browser:
       chmod a+r *