The Login Process:
Linux can be accessed in both the first floor general-use lab in Trexler
and in the 2nd floor MCSP lab. The machines in
these labs run Windows XP. Log into Windows as usual, then look for an
icon on the desktop that says
XWin to Riddler. Double click
on this icon; you should get a "Welcome to riddler.roanoke.edu" login screen. To log in:
If you have problems logging in, make sure that you are entering the correct user name and password. If you ever have password problems, go to Information Services on 3rd floor Trexler for assistance.
The first time you log in, you may see a screen that asks you whether you want the default setup or not. If you get this screen, click on the option for the default setup.
You are now logged into Riddler, the Linux server.
You should see a desktop environment similar to Windows.
one of the most popular desktop environments for Linux. By default,
GNOME uses the window manager
Sawfish, but we
will loosely refer to everything in the windowing environment as
GNOME. Here are some
basics for getting around in
GNOMEPanel. Just as you access programs in Windows from the Start menu, you can access programs in
GNOMEby clicking on the FOOT icon at the left end of the Panel, then choosing options such as Programs from the menus.
GNOMEStart Here window is probably displayed on your screen. Another way to access programs and settings on the system is through this window (rather than the panel).
GNOMElets you manage multiple desktops.
fingerthat lets you see who is logged onto the system. Type
fingerat the xterm prompt ($); you will see lots of people logged on (at least while you're in lab), including you. You can execute any shell command from an xterm -- more on shell commands later. Leave the xterm open -- we'll come back to it soon.
The windows you will use under
GNOME will feel
much like those under Windows 98, 2000, NT, or XP although a few things are different.
Click on the xterm icon on the Panel to get another xterm window, then
use your two windows to get comfortable with these basics:
The Taskbar: First, notice that there are now two icons on the taskbar for xterm windows plus one for rxvt and one for Start Here. Open two more xterm windows and you will see that only one icon for the xterms appears on the taskbar, this time with a 4 in parenthesis. If you have 4 or more of a given type of window open, only one icon appears on the taskbar for the type of window, and it shows how many such windows are open. If you click on this icon, you will see a list of the individual windows and you can select one.
Moving Windows: To move a window, move the mouse pointer over the title bar of the window, then hold down the left mouse button down while you drag the window to the location that you desire. Then release the mouse button and the window will be moved. Alternatively, you can hold down ALT and then click anywhere in the window to drag it to a new location. This is particularly handy if the title bar is not visible.
Activating a Window: The window that has a blue title bar and border is the active window. Only one window can be active at a time. To make another window active, click inside that window or on its titlebar. This will both activate the window and bring it to the front. The usual way to cycle through windows in Gnome is by pressing Alt-Tab (hold Alt down, then press Tab), just as in Windows XP. However, since you are logging in through Windows XP, this will just take you out of Linux and back to Windows. (Try it by pressing Alt-Tab. Once you're in Windows, you can get back to Linux by clicking on the Cygwin icon on the task bar.) You can modify you settings to make C-Tab (Ctrl-Tab) cycle through windows instead as follows:
M-Tab for Cycle Windows.(M stands for "Meta", which is the Alt key for us.) Select this item, then click Edit.
Resizing Windows: To resize a window, point to a corner, hold down the mouse button and drag the corner. The middle button (with a picture of a half-filled-in square) in the upper right hand corner can also be used to maximize the window (make it fill the whole screen) and then to change it back to the original size.
Minimizing Windows: To minimize a window, click the leftmost button (with a picture of a line at the bottom) in the upper right hand corner of the window. Note that for minimized windows the icons on the taskbar at the bottom of the screen are greyed out.
Closing Windows: To close a window, click the rightmost button (with a picture of an X) in the upper right hand corner of the window. Generally you won't want so many of the same type of window open so close some of the terminal windows.
Using Multiple Workspaces: GNOME allows you to have several different workspaces open simultaneously. For example, later in the course you may want to have one workspace with a terminal window where you are working on your personal web pages and another workspace with a terminal window to work on the group web pages. Or, you may want to have your browser open in one workspace, the emacs editor in another, or whatever. The right side of the GNOME panel shows your workspaces (a 2 by 2 grid -- and in each rectangle smaller rectangles indicating windows open in that workspace). At this point you should have one workspace open with a couple of windows open in it. To change workspaces, just click on the rectangle.
Moving Around the Linux File System
Now that you can get around the window environment, let's take a look at an xterm. Click on one of the terminal windows (either rxvt or the default xterm -- from here on we will use "xterm" to mean either) to activate it. The program running in the xterm is called the shell. The shell lets you issue commands to the Linux operating system and work with files. Refer to the handouts on the shell commands and Unix files given in class as you follow the directions below to move around the file system. Pay attention to what happens on the screen after each command.
pwdto determine your present working directory.
cd /to change directory to the system root, /.
lsto see a listing of the files in the root directory. You should recognize some of the directory names such as etc, bin, and home. Note that in a color xterm, directories appear in blue.
ls -l(that is an el, not a one) to see a "long" listing of the files. You will see information about each file, including the permissions. Note that one of the files in the root directory is the directory
cd binto change to the bin directory.
lsto see a list of files in bin. Recall from the take home portion of the lab that system commands are usually in bin directories. You should recognize the names of some of the Unix shell commands (such as cp and ls). The files you see in this directory are the executable versions of the commands; that is, they contain the instructions, in machine code, for executing these commands. (Executable files are in green; links are in light blue.)
ls -l cpto determine the permissions on the command cp (-l is el not one). Look in the file system handout to see how to interpret what you see. Note that everyone has permission to read and execute this file; the owner (root) has write permission.
cd ~username(for example, if your user name is bozo type
cd ~bozo)   to go back to your home directory. (OR just type
cdwith no argument -- that always takes a user home!)
cd ..to move up one level in the directory tree to
/home/students. (Check that you are there by typing
lsto see a list of all the student home directories on the system.
Setting Up Your Directory
Now we'll set up your directory with some subdirectories and copy some files into them. Do the following:
lsto get a list of the files and directories in your home directory. (There may not be any!)
ls -afor a list of all files and directories in your directory. (You should see some system files with names beginning with a period -- these were created and are used by the system. They start with a . so they won't be confused with user files.)
mkdir cpsc120From now on, you should use this directory to store the files you create in this course.
lsagain to see the list of sub-directories in your home directory. The new sub-directory cpsc120 should now be in this list.
labsand move into this labs directory.
lab0and again move into this directory.
pwdhere you should see that you are now in:
cp ~cpsc/UnixQuestions .
morecommand to see the contents of the file UnixQuestions by simply typing
STOP!!! Before going further have the instructor or a lab assistant come over and check to see that you have your directory set up correctly. You will be asked to go to your home directory, show a listing of the files there, then go down into the subdirectories you have created and show what is there.
emacs &in a shell window.
The X-windows version of Emacs has a menu bar that you can see at the top of the editor. These are pull down menus that you can use to perform many commands. However, every command in a pull down menu can also be executed in Emacs using an Emacs function and special keystrokes. Once you become proficient at using Emacs you will probably prefer the keystroke method of giving commands.
Editing an existing file
We'll first use Emacs to edit the UnixQuestions file. To open this file in your lab0 subdirectory do the following:
C-x C-f  (the C stands for the Control ctrl key -- hold it down then press the x key, release the x then press the f).
Now type in the answer to each question immediately following the question.
Save the file by typing
C-x C-s (remember the C stands
for the control ctrl key -- hold it down then hit the x
key, then release it and hit the s key) OR choose File, then Save (current
buffer) from the
Now go to the shell window and use the
nenscript command to
print out your answers. The command is as follows:
nenscript -2rG -p- UnixQuestions | lpr -P lab-mcsp -h
lpr) is a pipe, which is the key just below the backspace key -- backslash is the other character on the key.
Now we'll go through a brief introduction to Netscape Communicator which we will use for Web browsing and mail.
Start up Netscape by clicking on
the Netscape icon on the Panel or by typing
at the command line in one of your xterm windows. (The
at the end of the command
tells the shell to run the Netscape program in the background so
that the shell can be used to perform other tasks at the same time
that the Netscape window is open.)
any dialogs that appear the first time you run Netscape. You may
get an error window about disk caching; click ok.
You should see before you in the browser's main viewer a page about Red Hat Linux. Clicking on Home will take you to your home page (the page that is displayed when you start up Netscape), which by default is probably the Roanoke College home page or the Netscape page. We'll change this later in the lab if necessary.
At the top of the Netscape window you see a menu bar with several options including a File option that lets you do things such as open files and print files, and an Edit option that, among other things, lets you configure your personal preferences such as what you want your home page to be. Help can also be found on the right end of this menu bar. Below the menu is a series of buttons that can guide you through the documents you visit on the Web. The Home button always takes you back to the home page you have specified in your settings. Other buttons let you go backwards and forwards in your document history for this session, reload your document, print the current document, search the current document and stop the document from loading. At the end of this line, you see a picture of an N. Whenever this N is animated with shooting stars, a document is currently being loaded.
The line below the row of buttons contains the location of the document you are currently viewing. Each document ("page") on the Web has a location (in a file on a computer on the Web) which is specified by a URL (Uniform Resource Locator). A URL is basically an address of a page. The URL for the Roanoke College home page is http://www.roanoke.edu. If you know the URL of a page you want to see, you can type it in the location box (then press ENTER).
On the next line, you see several buttons that will automatically take you to locations that can help you navigate and find documents on the Internet.
Moving Around in Netscape -- "Surfing the Web":
There are several ways for you to access different pages on the Web:
If you have never used Netscape you should try out some of the options above at some point.
For now go to the home page for this class
by typing the address
http://cs.roanoke.edu/~cpsc/CPSC120A (Dr. Bloss's class)
http://cs.roanoke.edu/~cpsc/CPSC120B (Dr. Ingram's class)
Changing your Password:
The following are instructions for changing your email/Linux password. Note that changing this will change the password you use to read your e-mail, even under Windows. If you are still using the default password given to you by Information Services, change your password now (otherwise you don't need to):
Change Passwordfrom the menu on the left.
Log Outat the top of the menu on the left.
In this course you will often need to use the Linux version of Netscape to send mail to your instructor. You may also want to use this to read your mail. The primary mail server at Roanoke is a Dell computer named imap. All student mail addressed to firstname.lastname@example.org goes to imap. Netscape on Linux can be set up to use imap so that mail addressed to email@example.com can be read from Linux. Options for setting up your mail and other browsing features are under the Edit option on the main window. We'll now look at your current preferences and change any that need to be changed.
Do the following:
Mail and NewsGroups(If you don't see
Identityclick on the little triangle beside
Mail and NewsGroups. This will show you a list of options including
Mail Serverscategory. In the
Outgoing (SMTP) serverbox type in smtp.roanoke.edu
Outgoing mail server usernamebox, type your username.
Incoming serverbox click on the server listed (if any). Click on
deleteto remove this server. Then click on the add button. Under the General tab, type in imap.roanoke.edu for the server, choose IMAP as the server type, and put your username in the username box. On the IMAP tab, choose "Move Deleted Messages to the Trash folder".
Getting into Mail: You can get into mail either by choosing Communicator, then Messenger or by clicking on the mailbox icon at the bottom right-hand corner of the window. You will need to enter your IMAP mail password (this is the same email password you have been using, which is also your Linux password) before you can access your mail.
Common Netscape Mail Functions:
Get Msgbutton is used to check your mail on the server, and get the mail if you have any new mail.
New Msgbutton is used to send mail. When you press this button a mail composition window will open. You need to enter such things as the e-mail address of the person that you are sending to, as well as, the subject of the mail. The bottom window is used to type your mail message.
Replybutton is used to reply to the mail currently showing in the mail viewer window. You will be given the choice of sending a reply to the sender of the message or to ALL of the people who received the message (if you use this button to reply to a message that was sent to everyone on campus, your reply will go out to everyone so be careful about using this option!).
Forwardbutton will forward the current mail to an e-mail address.
Deletebutton is used to put the current message in the Trash folder. You should periodically empty the trash folder (an option under the File option on the menu).
Close Emacs and Netscape.
Exiting an X-terminal: To exit an xterm, type
exit at the command prompt.
(NOTE: You can also exit by clicking the X in the upper
right hand corner of the window, as in Windows. It is a good idea to
get in the habit of exiting the window or a program within a window with the exit
command instead of destroying it with the X. Though most programs should
respond appropriately to your clicking the X,
destroying windows can sometimes make you lose information
that you wanted to save.
For example, if you are editing a file, and use the destroy
button, you may lose unsaved data.)
To exit GNOME, click on the FOOT icon on the panel and choose "Log Out", then select Yes at the "Really Log Out?" window. This will take you back to Windows XP; be sure to log out of here too.