How Do I

  1. Windows PC: How do I start putty so I can login onto the CS server and make Webpages with html, css and javascript files?

    1. Start Windows.
    2. Look for the putty icon. It is two computers connected with a lightning bolt. It says putty under it or maybe putty Extra.

      OR

      click on the search window at the bottom of the screen. Type in putty. If putty is on the PC, the search window will display putty.
    3. No putty: If you do not see the icon, and the search does not find a putty, then putty is not on your computer. Go go to step 2 below to download and install putty.
    4. Got putty: Start putty by Double clicking on the putty icon OR the putty found by the search. This pulls up the connection window.

    5. In the connection window: Type in the cs-server name:
      cs.indstate.edu
      for the "Host Name (or IP address)"
    6. Make sure to pick SSH for the connection type.
    7. Click on Open at the bottom of the window.
    8. You might be asked if you want to continue. Click on Yes.
    9. Now you are connected to the cs-server, but you need to identify yourself to cs-server. You will need your user name and password for CS 170. These were emailed to you. It asks for your username:
      username:
      type in and enter your user name. Then it asks for your password:
      password:
      type in and enter your password. The password is NOT displayed on the screen.
    10. If you see the unix command prompt:
      /u1/h0/class/cs170dd>
      where the d's above are your user name digits then you have successfully logged onto the cs server.
      Congratulations!
      Go to step 3 for your first session on the cs server.
  2. Windows PC: How do I download and install putty?
    1. Read Directions:
      Click on the link in the next step.
      Scroll down PAST the installers to the "Alternate binary files"
      and click on the 32-bit version of putty.exe to download it.
    2. putty download web site
    3. ******************Click on Save File.
    4. ******************Click on Save. Get out of the browser. You should have the putty icon on your screen.
  3. How do I logon to the CS server so I make Web pages?
    1. Windows PC: Start putty (see Question 1 above), Fill in the connection window, and login to the cs server with your user name and password.
      OR
    2. Using a terminal in Rooms 015, 017, or 019 in Root Hall:
      Enter your user name and password to login to the terminal. All your work will be mirrored to the cs server.
      Important the terminals are NEVER cut off. When you have finished your work, enter the command:
      exit
      to end your session on the terminal.
      OR
    3. Apple Macintosh: Use the finder to locate the terminal application. It is in utilities sub-directory of applications. Double click on the terminal application to start it. You will get a terminal window. Enter the command:
      ssh cs170dd@cs.indstate.edu
      where you replace the d's with your user name digits. This connects you to the cs server. It will ask for your password. Type enter it. Again the password will NOT be displayed.
  4. How do I Log Off the CS server? When you are finished working on the server, get back to the command prompt. (for instance if you are still in pico-- see below-- type ^X to get out of pico) then enter the command
    exit
    That is type exit and press the return or enter key.
  5. Using a file editor (pico); Making a small file. Your files are to be in your home directory. So the first step is setting the current directory to be your home diretory. If you have just logged on to the cs server, then you are already in your home directory. You should see
    The simplest way of doing this is to enter the command
    cd
    We are going to make a file named summer.txt This will be our first Webpage! We start our work by entering the command:
    pico summer.txt
    This command starts the pico editor program which will let you write or change file summer.txt.
    Unlike the other unix commands you have seen, pico does not immediately finish. It waits until we tell it we are done writing.

    The upper part of the pico screen is where you type in the file content. The lower two lines list several pico commands you can use.

    -----------------The two important pico commands------

    ^O   Write Out
    ^X   Exit
    
    The caret (^) in front of each command means hold down the ctrl (or control) key when typing the letter that follows.

    ^O:   To SAVE your work (Write Out) you hold down the ctrl key when you type the O key. When you do this, pico responds with the line:

    File name to Write:   pg1.html
    The file name that appears is the name you typed in the when you started pico. Mostly you will just press enter to accept the name,
    but you have the option of backing up, changing the file name, and THEN pressing enter which writes your work to the new file.

    ^X:   To EXIT pico, you hold down the ctrl key and type the X key. If you do this after you have done the ^O command, pico will return you to the unix command line.
    But if you have not saved all that you have typed, pico gives you the option of saving your recent changes before returning to the unix command line.

    ---------------------------------------------

    In the pico window type:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Actual First Page </title>
    </head>
    <body>
    <h1 style="color:red; text-align:center;">Hello, World!</h1>
    
    <p>
    This is a first line that is short.<br>
    This is the second line of the paragraph and it is
    longer; in fact it keeps going and going. Finally the
    third and final line, good bye.
    </p>
    
    </body>
    </html>
    

    Once all of the above has been typed, type the command ^O then press the enter key to save your work to the file pg1.html. Finally type ^X to exit pico.

  6. View your Webpage! Start a browser. Enter the address: cs.indstate.edu/~cs170dd/pg1.html.
    Make sure that you put in your digits in place of the d's in cs170dd.

    You should see a web page with a red centered

    Hello, World
    and a three sentence paragraph.