1. Windows Essentials
2. Opening multiple windows (applications) at once in Windows
3. Logging onto the UNIX machine, cs, and changing user password
4. Some UNIX commands
5. Email on cs using pine; compose, send, receive, reply, ...
6. Learn about pico a UNIX-based text editor
In addition, a homework assignment described at the end of the lab will
help you familiarize with the pico text editors and pine
mail software on Unix.
To "drag" an object means to move the mouse pointer over the object, click once with the left mouse button and hold the button down (don't release it), then while the button is still depressed move the mouse. The object is moved with the mouse. We'll see how to move a window by dragging in just a bit.
The title bar at the top of a window has special properties. The three buttons in the upper right corner are used as follows:
Figure (1) - An example of a window (Netscape browser screen)
Figure (2) - Taskbar of Windows
2. Opening Multiple Windows (Applications) at Once
For most of the labs in this course, you will use (at least) two windows at once: a Netscape window similar to the one shown on Figure (1) to see the description of the lab, and a terminal window similar to the the one shown on Figure (3), for writing and running programs and for other activities. You can switch between tasks by clicking the appropriate task button in the taskbar at the bottom of the screen, or by moving your mouse to any portion of the window that you want to use and activating the window by clicking on it.
Figure (3) - Terminal window (Telnet screen)
First, you'll log onto the UNIX machine, cs. Once again, click on the Start button in the taskbar at the bottom of the screen, point to Run to open the Run screen. This screen is shown on Figure (4). At the field Open type:
Figure (4) - The Run screen (e.g., running Telnet to cs machine)
After you ran the telnet you will get the telnet screen shown on Figure (5).
Figure (5) - Telnet Screen
Figure (6) - Telnet Screen with connection options
You have two options for connecting to the desired Unix machine. If the name of the machine that you are connecting to is appearing in the list, simply click on it and you will be connected to that machine. Please note that the cs machine may appear either as cs or cs.appstate.edu.The second option for connecting to another system is to click on the Remote System tab to get the Connect screen shown on Figure (7).
Figure (7) - The Connect screen from Remote Connection tab
The Host Name is the name of the machine to which you want to connect (in our case, cs). By clicking on Connect button, your computer will try to establish a connection with the requested machine . Once you are connected, you will get a screen similar to the one shown on Figure (8).
Figure (8) - The cs login screen
Type your login name (same as the one you have on the university's VAX system) on cs, press enter, then enter the your password (same as the one you have on VAX) and press enter to open your account on the cs system. Note: if you do not know your username I will try to get it for you.
After you type your initial password, you will be logged into the system and will be asked to change your password. Follow the directions on the screen to change your password. Please note that to improve security of your account, your password should consist letters, special characters such as !,@,#,..., and numbers. A reasonable length for password could is 6-8 characters. Be sure to remember the password that you selected. From now on you will use the new password to login to the system. If you decide to change your password again, type passwd and follow the directions on the screen.
Once you are logged in to cs, you will get a screen similar to
the one shown on Figure (3).
cs)~% or cs.cs.appstate.edu>
We refer to the prompt that you get as the command prompt. From the command prompt you will be communicating with the UNIX operating system by entering your UNIX commands. On some machines, the command prompt will appear with a "$" character at the end.
4. Some Unix Commands (I strongly recommend you to
go through the UNIX short manual)
Let's experiment with the commands on the UNIX operating system. Note that anytime you need help with a Unix command, nothing that Type
cs)~% lsto see the list of files in your directory ("ls" stands for "list"). UNIX, like C++, is case sensitive so be careful of the CAPS LOCK key. Most UNIX commands are in lower case.
You'll probably spend most of your online time this term in an editor, writing and modifying computer programs. There are several editors on cs. We will use pico. Let's start by opening an empty file and start typing a text. Type,
%pico temp.txtNow you have told UNIX to run the pico program to edit a file called "temp.txt". If you already owned a file by that name, that file would be loaded into the pico editor. Since you do not have a file called "temp.txt" already, an empty one is created.
Some of the commands that you need are listed at the bottom of your screen. Note that ^ stands for the Ctrl key on your keyboard. Type the following text in the blank screen.
This is my first editing session on a UNIX machine. I am using pico to edit my file.Now that you are done with the text, you need to save and exit the file. You can look at the bottom the find the command for Save and Exit. It is:
Let's make a copy of this file and then list all our files again. Copying a file is done with the "cp" command. You type cp followed by the name of the file you want to copy, then the name by which you want to call the copy. Type (at the UNIX prompt):
cp temp.txt temp2.txt lsWhat do you see? Now enter
mv temp2.txt temp1.txtThe "mv" command stands for the word "move"; it renames a file. We just told UNIX to change the name of "temp2.txt" to "temp1.txt".
We also need to know how to delete files. In UNIX the "rm" command deletes files; rm stands for "remove". If we type
rm temp.*it will delete any file whose first name is "temp" regardless of what its extension is. Try it and then list your files again to see if it worked.
This lab is to teach you:
pineIf this is the first time you've ever used pine, it will ask you if you want to receive a copy of some documentation that comes with the program. Choose yes or no. Then use the arrow keys to select the I FOLDER INDEX menu entry and hit return. Pine automatically opens your INBOX which holds new messages and also old messages that you haven't deleted or moved to another box.
You should have one email message from me. If that is the only email message that you have, then that one should be highlighted and you can simply hit return to read my message. If you have multiple email messages, use the down arrow key to highlight the message from me and hit return. (If you don't have any mail, you're not on my distribution list -- tell me and I'll fix the problem.) While you're looking at my message, notice the bottom few lines of the screen contain information about available commands. Sometimes there are more commands available than can fit on the two lines. Enter
Oto get to some of these other commands and then enter
Eto export the message into a text file. When it prompts you for a file name, type
temp.txtThis makes a copy of the mail and saves it in a file called temp.txt. (I tend to use "temp" in my file names if I intend to delete them soon.) We'll come back to this new file later, but now read the mail message and follow its instructions to reply to me. After you've replied to me, type "m" to return to the main menu.
Next, you'll send a message to another student in the class. Look at this list of user ids and send an email to the student whose name follows yours on the list. Then from pine's main menu, choose "c" for "compose message".
In the "To:" field, enter the other person's login name and press Enter. Keep pressing Enter until you get to the "Subject:" field. Always give a brief subject description, since subjects help the recipient find old mail. Enter a subject and press Enter. Then type your message and press "Ctrl-x" (and then "y") to send the message. Try to put enough information in the message that the student you are sending mail to can identify you. Have the student to whom you sent mail show you what the message looks like once it is received. Then type "q" to leave pine.
Now, verify that the export command you issued earlier actually saved the mail message by listing your files (use the
lscommand) and then display the file by entering:
cat temp.txtYou'll notice that this command assumes you have passed a speed reading course! This time enter,
more temp.txtYou'll notice that the 'more' program displays a screenful of text at a time. To advance the display by a single line, press Enter. To advance to the next screenful of text, use the space key. To go back up one screenful, type "b". To quit the 'more' program, type the letter "q".
Let's return to mail -- type "pine" again. It is a good idea to keep your INBOX relatively clean. That way new email messages are easier to spot. So what can we do with email we've read and want to keep? Well, we've already experimented with the Export command. However, pine offers another capability - mail folders. In reality, your INBOX is a mail folder. You can create and manage your own mail folders. Let's create a mail folder for this class. From pine's main menu select "L" for "Folder List". Enter "a" to add a folder to your list of current folders. Enter cs1440 when pine prompts you for a folder name. Use the arrow keys to highlight our new cs1440 folder. Use the Enter key to open the folder. Notice that there are no mail messages in this folder - yet. Return to your INBOX folder (by returning to the main menu, listing your folders again, and selecting INBOX). Now, use the arrow keys if necessary to highlight the email message from me. Use the "o" key to see other commands. Let's use the Save command. This is how you can save a message from your INBOX to another pine mail folder. At the prompt, enter our new folder cs1440. It is important to realize that there are now 2 copies of this message. One in the cs1440 folder and one still in the INBOX folder. However, notice that the INBOX message has been marked for deletion (a "D" is now visible in the third column). When pine exits, it will delete this copy and then there will be only one copy of the message (in the cs1440 folder).
We can delete messages from folders that we don't want by highlighting the message and pressing the letter "D".
By the way, my username is rt. Throughout the term, you can send email to me for help on your programs. (Please don't abuse this! When you want help, send specific questions about specific problems -- don't just send mail saying your program doesn't work and you don't know what is wrong.)
When you're done, type "q" if you're still in pine, then logout to leave cs. At the UNIX prompt, type
logoutand press Enter.
Go through all the steps of the UNIX Short manual. if you successfully complete the manual, at the end you will generate a file called typescript. E-mail me that file.