CS 203 - Getting Started

The lab sessions for this course will be held in a Bishop's computer lab administered by ITS, and you log in to computers there with your general Bishop's username and password.  They have a choice of operating systems: Mac-OS or Windows. Select your preference before logging in. (You may need to reboot.) 

However, during the pandemic, you may use any Bishop's computer that is available. N-113 is desirable as having only Mac-OS, The the other Nichols labs have only Winddows, and J-118 offers a choice. You may want or need to use your own computer, and you have chosen your operating system.

3 reasons to use Mac-OS - these only apply to Bishop's computers that have a choice

  1. On starting up, the Mac-OS is booted (takes a minute.) Then it gives a choice of Mac-OS or Windows. Choose Mac-OS, and you get a login prompt promptly. If you choose windows, Windows will have to be "booted", which takes another minute or more.
  2. ITS has a "deep freeze" policy for Windows, necessary because of the mass ow Windows-specific viruses.Therefore after you log in, it takes a minute to freshly set up your own personal files.
  3. When you log out of Windows, there is another minute of delay while all your local files (on the hard disk (C:) are destroyed. This means you must never save anything in the default Documents, or you lose it. Then comes another Windows login prompt.  The next person can't get back to Mac-OS, and must actually turn the power off and then back on to get it.
In Mac-OS, your Documents are not lost, but are only available on that same machine, so you should store anything you want to access later on the ITS network, your folder youracct$ a.k.a. M: in windows.

Osiris Accounts

For this course, you will be getting a separate account on the server osiris.ubishops.ca. Your username will generally be the first letter of your given name, then your family name, all lower-case. (without any numbers) Your initial password will be given in class, and also at the first lab session.
You got an email about it, or ask me

Troubleshooting

What if you can't "get to" osiris? (or linux) - you try to log in, you can't. first of all, be aware that if you fail 3 times, your IP address will be banned for 2 hours. This is because there are robots that try to guess passwords, and may make oodles of tries. This has resulted in "Timed out" responses, when someone fails to connect.

So, ask yourself these questions:
  1. Do I know my (osiris) username? lower case, no numbers. Try:
    https://osiris.ubishops.ca/youracct if response is
  2. Am I sure about my password? Have I forgoten it? - Ask me to set a new password - by email
  3. I tried and tried, but got a timed out message - Probably your IP address has been banned. This happens whenever at least three failed login attempts are detected from one IP address in any 10-minute window. Do this:
    1. Wait two (2) hours or go to https://www.whatismyip.com/ and copy " My Public IPv4" and send an email to ljensen@cs.ubishops.ca (me), describing the problem, and giving your username, whether osiris or linux, and the IP address you just got.
    2. Try again ONCE
    3. Send an email to ljensen@cs.ubishops.ca (me), asking me to reset your password on osiris (or linux).
    4. Wait for my reply
    5. Try again, very carefully
  4. Is it time to call it a day?

A virtual linux style desktop

If you want to use Linux, you may also request an account on linux.ubishops.ca. Username and password as for Osiris. You can then get a remote (virtual) desktop by using the application x2go, with an xfce session.
x2go should be on Bishop's computers, in a folder "Computer Science", or upload to your own computer, from https://wiki.x2go.org/doku.php

However, x2go has been found slow depending on network speed and load.

Instructions for Linux: (or skip)

  1. Log in to a computer with Mac-OS (or windows):
    1. Start the application x2go. Choose session type XFCE
    2. type your username (you will probably need to erase the name of the previous user),
    3. type your initial password, which will be same as for osiris, or ask me. (you will see just spots)
  2. Choose your own password. 
    1. Once logged in, Open a Terminal from the "Applications" menu, or search for "terminal". It gives you a window with a 'command line', allowing you to do direct Linux commands. In this window, type
    2. passwd (and press Enter) then when prompted, type your existing password, and then your chosen password, two times. (You won't see anything on the screen as you type -- not even spots) -- end each password with the Enter key. (You will use the same method for changing your Osiris password.)
  3. Open a browser, either Firefox, Chrome, or Konqueror. Look at the course web page, where you can find these instructions!
  4. Open a text editor, I recommend mousepad or gedit ("Text editor"). Find in Applications | Accessories. You might want to put your favourite on the desktop.

Server - osiris

For this class, we are also using a computer named osiris for our web server. Typically, you will edit your files on some client, such as one of the J-118 workstations or your personal computer, and then transfer them to whatever server is being used by your organization. Osiris is running the Apache web server, which is used by a majority of the world's websites. It is open-source, free software.
I will create an account for you on osiris, as mentioned above. Once you have a file to transfer, follow these instructions:

Step by step for using the server

In these instructions, things you click on with the mouse are shown bold, things you type in are shown in "tty" font. Some alternate instructions are provided for use away from the lab, were you may not have the same desktop or utilities as in Bishop's labs. We are assuming you have the same account name on both systems. Otherwise, you'll have to connect to myothername@osiris

  1. Transfer your file(s) to osiris  scp or sftp. Don't forget any images. :
  2. Check that your file is there, using your Browser (Firefox, etc.). Your address depends on your login name. For the login name "astudent", the address is: https://osiris.ubishops.ca/astudent You won't be able to see anything but a Forbidden message until  you have a file named index.html, unless you add a specific file name (after another / ) you will see that file instead. index.html should contain links to any other files you have. You will only be graded upon files that are linked from index.html.
  3. Start a terminal, and start a ssh session on osiris:   (see Putty instructions if using Windows.)
    ssh osiris
    1.  You should be asked for your password. If you do not in fact have an account, see me. If you didn't already change your password:
    2. passwd   -- Enter your temporary password, then your chosen new password, twice. It should be hard to guess (your name won't do).
    3. cd www     Change to your public directory for html pages. (your "home" directory is only visible to you, and not reachable by apache.)
    4. ls                  List your directory.     (Unix commands are very short)
      ls -l               Check the permissions. Should be -rw-r--r--
  4. Test your html file from the location: https://osiris.ubishops.ca/youracct (naturally, your account is different from "youracct")

How to do it from a "Windows" machine:

You will need to use 2 applications that are on the main Bishop's system, and can be downloaded from the internet for your own computer.
  1. PUTTY gives the same functionality as using a Terminal window and typing ssh
  2. WinSCP gives "drag-and-drop" functionality between local and remote machines. You may also use it to open a remote file for editing.

Using PUTTY

Start putty in ssh mode (not telnet). putty.exe is a client for the telnet and ssh protocols. Putty is open source, GPL licensed software. This means you may copy and use it, but may never sell it. A copy that runs under windows is on Bishop's Windows systems, in the desktop folder "Computer Science." You can also find a current copy to download on the internet.
  1. Click on the desktop icon to start putty.
  2. In the connect menu, choose ssh. The system you want is osiris.ubishops.ca You don't want to change anything else.
  3. You will see a "login:" prompt. Type your login name (case sensitive), and press enter.
  4. Continue with the regular lab instructions

Using WinSCP

  1. Double click on the WinSCP icon, if present, or find it in the desktop folder "Computer Science"
  2. Type osiris.ubishops.ca in the host field, also your user name and password. make sure it says SSH or SFTP, not FTP
  3. [At home, you can "Save" this session info.]
  4. Click on "Connect"
  5. You will eventually see two directory listings. On the left is your local machine (the one you are sitting at). Change directory to the one where your file is located. [Some versions have just the remote listing, or you can choose this view option. In this case, you can drag, copy, or paste between this and other windows.]
  6. Change to your subdirectory on osiris named: www. This is your "public" directory, where you will put all your web pages, and php scripts.
  7. Select your file(s) and drag into the right-hand window, or Click on the arrow pointing right. Your file should now appear in the remote (osiris) directory window, on the right. It may be several bytes shorter than the original, this is because Unix stores new lines differently.
  8. Verify that the name is what you want, beware that Unix is case sensitive. You may rename it using SCP, or in your Putty session.
  9. Exit WinSCP, or keep it open as you like.
Please bear in mind that a file in your home directories at Bishop's (M: or acct$), on Linux, on Osiris, and on your own computer are 4 distinct entities, any changes you make must be copied to the other places!

Tools

Editors

Since all the file types we will edit (except images) are plain-text files, you will want to use a plain text editor. Also, since computers are very picky about syntax, it is an enormous advantage to use one with syntax highlighting (All those listed here). This will make it easier to read your code, and spot errors. Most also match up parentheses. They will do this for many different file types, as soon as you save the file with proper extension (e.g.. .html, .php, .css) Note that they don't all use the same colour scheme, but one gets used to whatever is in use.

Terminal Editors

Designed to operate in a plain text (not GUI) environment, these are fast, and can be used through a terminal ssh or putty session to edit files directly on the server. Great for quick repairs!

Browsers

There are many. Because html and css are based upon standards, your pages should be rendered approximately the same in any browser, and are subject to the default settings of each, configurable by individual users. In particular many people set their browsers for particular fonts and sizes. (Older people often prefer larger type! Blind people use Aural or Braille browsers.)
Back to Contents
Home page of Lin Jensen