Next Titel Inhalt Vorwort 1 2 3 4 5 6 7 8 9 10 11 12 Appendix @ CAAD Teachers

APPENDIX A
OpenWindows, IndigoMagic, UNIX und Übungsbetrieb


A.1 login and logout

Every time you use the computer system, it is necessary to identify yourself. This process is known as logging in to your account. To log in, you must first enter your account name after the login: prompt, then your personal password after the password: prompt. For security reasons, unlike your account name, your password will not appear on the screen as you type it.

At the end of a work session it is necessary to log out. When you want to finish working on the computer, always use the menu item Exit in the Workspace menu. Afterwards, when OpenWindows has closed down, it is necessary to enter the logout command. This closes your account and frees up the machine for other users.

A.2 Sun Workstations - OpenWindows

OpenWindows' desktop environment is installed on the machines used in this course. Each time you log in, the desktop program OpenWindows is automatically started. The blue background represents a desktop or work space, upon which different sorts of elements are made available, such as: windows, icons and menus. The following is an example of a desktop:

A.2.1 Windows

Applications running on the computer are located in windows. At the left side of the default environment pictured above there are three windows:

The console is in the upper left corner of the screen. The system uses this window to write system related messages about the actions taking place on the computer. If there is a problem with a program, look in the console for an error message.

The File Manager is located just below the console. It contains a graphical representation of all the files and folders in your account and on the system. It operates similar to a Macintosh desktop.

A command tool is opened by default in the lower left corner of the screen. Executable command can be entered from the keyboard. AutoCAD must be started from a command tool and UNIX-commands, such as those for copying, renaming or deleting files (see tutorial UNIX) can be executed in a command tool as well.

A.2.2 Icons

If you close a window, by pressing the button in the top left corner of the window's frame, it collapses into an icon. Icons also represent on going processes or tasks on your machine. Different programs have different icons. On the sample screen illustrated above, there are icons for the following processes and tools: wastebasket, mail tool, snapshot tool, clock and others. Double clicking an icon, with the left mouse button, reopens the window.

A.2.3 Mouse Operations

Since it is possible to have many windows open at the same time, the computer needs to know where you want to direct a command or a mouse click. This is done by moving the mouse so that the pointer (or cursor) is located on the desired icon, tile bar, background or window (this may change the shape of the pointer).

The mouse has three buttons, each of which performs a different sort of task. The left mouse button is used the most. It places the writing mark, moves and resizes windows, moves the slides of scroll bars and selects individual items in a dialogue box. The middle button is used for multiple selection. The right button of the mouse calls menus.

A.2.4 Menus

A menu contains a list of commands that can be performed by a specific application. There are two sorts of menus available in OpenWindows: Pull-down menus and pop-up menus.

Some application windows have buttons below the title bar with names and/or arrows on them. These are pull-down menus that open when you place the pointer on them and press the right button of the mouse. By moving the cursor to the desired command name and pressing the right mouse button again, you can invoke any of the commands that appear on the list.

The other available menus are pop-up menus. These menus 'pop up' whenever you press the right button of the mouse on the free space inside a window or on the frame of a window. The menus that appear belong to the application that is running in the window. There is a pop-up menu for the desktop as well. It is called by clicking the right mouse button while the cursor is on the blue background of the desktop. Many desktop applications like command tools, text editors, mail tools and the exit function are located in the workspace pop-menu. The following is an illustration of the workspace pop-up menu.

A.2.5 Text Editor

In order to write programs, you will need to use the Text Editor to produce text files. Open a text editor from the desktop pop-up menu by keeping the right mouse button pressed and moving it to the right of the Programs option, move the cursor to the Text Editor... option in the submenu that appears and let the mouse button go. A text editor can also be opened by entering textedit in a command tool. Both methods should display the following window:

The File menu, shown in the following figure, contains the necessary menu items for loading and saving your text files. When you select one of these items a pop-up window will appear, in which the location (Directory) and the name of the file can be entered or changed before the command is carried out.

There are many other functions in the Text Editor that allow one to, among other things, find and replace parts of a text, copy, cut and paste. Especially interesting for programming with LISP is the function Find Marked Text in the Find menu. This function allows one to quickly locate pairs of parentheses.

A.3 Silicon Graphics - IndigoMagic

IndigoMagic's desktop environment is installed on the Indy machines used for the final exercises of the programming course. Each time you login to one of the Silicon Graphics machines, the desktop program IndigoMagic is automatically started. The blue background represents a desktop or work space, upon which different sorts of elements are made available, such as: windows, icons and menus. The following is an example of a desktop:

A.3.1 Windows

Applications running on the computer are located in windows. At the left side of the default environment pictured above there are three windows:

The console is in the lower left portion of the screen. The system uses this window to write system related messages about the actions taking place on the computer. If there is a problem with a program, look in the console for an error message.

A command tool is opened by default on the left side of the screen. Executable command can be entered from the keyboard. UNIX-commands, such as those for copying, renaming or deleting files (see Appendix A.4 UNIX) can be executed in a command tool as well.

The third window, in the lower left corner of the screen, contains a graphic display of the amount of work the cpu is doing.

A window similar to OpenWindows' File Manager can be opened with the Home Directory button located on the Desktop Menu in the upper left corner of the screen. It contains a graphical representation of all the files and folders in your account and on the system. AutoCAD must be started from a command tool or by activating the program from the Applications menu located on the Desktop Menu on the upper left side of the screen.

A.3.2 Icons

If you close a window, by pressing the smaller of the two buttons located in the upper right corner of every window's frame, it collapses into an icon. Icons also represent on going processes or tasks on your machine. Different programs have different icons. On the sample screen illustrated above, there are icons for the following processes and tools: dumpster, mail tool and others. Clicking an icon reopens the window. Double clicking the bar in the upper left corner of the window will quit the window and the process it represents.

A.3.3 Mouse Operations

Since it is possible to have many windows open at the same time, the computer needs to know where you want to direct a command or a mouse click. This is done by moving the mouse so that the pointer (or cursor) is located on the desired icon, tile bar, background or window (this may change the shape of the pointer).

The mouse has three buttons, each of which performs a different sort of task. The left mouse button is used the most. It places the writing mark, moves and resizes windows, moves the slides of scroll bars and selects individual items in a dialogue box. The middle button is used for multiple selection. The right button of the mouse calls menus.

A.3.4 Menus

There are two sorts of menus available in IndigoMagic: Pull-down menus and pop-up menus.

Some application windows have buttons below the title bar with names and/or arrows on them. These are pull-down menus that open when you place the pointer on them and press the left button of the mouse. By moving the cursor to the desired command name and pressing the left mouse button again, you can invoke any of the commands that appear on the list.

The other available menus are pop-up menus. These menus 'pop up' whenever you press the right button of the mouse on the free space inside a window or on the frame of a window. The menus that appear belong to the application that is running in the window. There is a pop-up menu for the desktop as well. It is called by clicking the right mouse button while the cursor is on the blue background of the desktop. Many desktop operations like the copy, remove, help overview and log out functions are located in the desktop pop-menu.

A.3.5 Text Editor

In order to write programs, you will need to use the jot text editor to produce text files. Open a jot file from the desktop screen menu by keeping the right mouse button pressed and moving it to the right of the Applications option, move the cursor to the Jot option in the submenu and let the mouse button go. A text file can also be opened by entering jot in a command tool. Both methods should display the following window:

The File menu contains the following menu items: undo, cut, copy, paste, open..., save and exit. When you select some of these items a pop-up window will appear, in which the location (Directory) and the name of the file can be entered or changed before the command is carried out.

There are many other functions in the Jot editor that can be accessed by selecting long menus from the options menu. There is no parentheses checking available in Jot.

A.4 UNIX

The machines available in this course run under UNIX operating system (OpenWindows windowing environment operates on top of the operating system). An operating system lets you or the programs that you run interface with various input, output and storage devices and makes them work together by controlling and scheduling various processes. One of the tasks of operating systems is to maintain and manage a file system.

A.4.1 File System

Conceptually, a file system is a place where various kinds of information that you can access or that you create is stored in logical units called files. Under UNIX, a tree structured file system is available.

At the top of the tree is a place called root directory- whenever you log in, you are at the root level or directory of your account. A directory can be thought of as a folder that may contain a number of files or other directories- called subdirectories (inside which may be yet other files or subdirectories, and so on).

Each directory and subdirectory has a name, and similarly each file also has a name. UNIX is case-sensitive, i.e. file1 and File1 are not the same.

As you work through various programs and commands, you will notice that some files have special extensions, i.e. a period (.) followed by some characters. For example, test.lsp is a file with an extension .lsp (which is what your program should have).

There are some conventions regarding these extensions and their meanings are as follows:

.lsp
a Lisp program file
.dwg
an AutoCad drawing file
.bak
a backup file of an original that was recently edited

A.4.2 UNIX Commands

In the following, a small set of most useful UNIX commands are explained. Any of these commands can be entered in a command tool window.
pwd
Displays present working directory, i.e. where you are in reference to the file system tree.
ls
Displays contents of current directory, all the files and subdirectories. On your system, this command may display backslash (/) character after some names; this signifies each of those names is a directory.
ls -a
Displays complete contents of the current directory including what are known as dot files which are usually not displayed (files that have a period as the first character in their names).
ls dir1
Displays the contents of a directory named dir1 (note: dir1 should exist at the same level as pwd, or a complete directory path is needed, see below).
mkdir name
Creates a new subdirectory called name.
cd
Changes current working directory to the root directory.
cd ..
Changes current working directory to the parent directory, i.e. one level up in the file system tree.
cd dir1
Changes current working directory to dir1 (note: dir1 should exist in the current directory, or a complete directory path is needed).
cd dir1/dir2
Changes current working directory to dir2 which is stored in directory dir1 (note: dir1 should exist at the same level as pwd). This is called a directory path specification and can be thought of as giving directions for going from one branch on the tree to another branch.
cp file1 file2
Copies contents of file1 and stores it under another file named file2 (the original file remains unaffected).
mv file1 file2
Moves the contents of a file stored as file1 to another file named file2 and deletes file1.
mv dir1/file1 dir2/file1
Moves the file named file1 under directory dir1 to another file named file1 stored in directory dir2.
mv dir1 dir2
Moves the entire directory dir1 (and all the files stored under it) to another directory named dir2 (where all dependent files will be stored with original names).
rm file1
Removes a file. Be careful, once you delete a file, there usually is no way to recover it.
rmdir dir1
Removes directory. In order for this command to work, the directory dir1 should not contain anything. If it does, you will first need to remove (rm) all files and directories from inside dir1 before you can rmdir dir1.

A.5 Übungsbetrieb

A.5.1 Ausgabe

A number of sample programs illustrating various concepts in LISP as well as drawing files necessary for completing your exercises are available in the directory: /homes5/prog/ausgabe. The names of these files are given in relevant sections on the preceding pages of the script.

In your own account, you should keep relevant files for your exercises in separate directories named as u01, u02, u03, u04, etc.

In order to copy files from ausgabe, change the current directory in a command tool to a relevant subdirectory, e.g. u03 for Kapitel 3. Then copy the appropriate file(s) as follows:

cp /homes5/prog/ausgabe/relevant_filename .

Program, drawing and menu files that you have to copy, modify, complete and resubmit as exercises, are stored in the directory ausgabe. The relevant files are stored as 06_name.lsp, 06_name.dwg, 06_name.mnu; for a LISP, drawing or menu file as the case may be. In order to copy these files, change to a relevant directory (e.g. u06), and then copy the appropriate files as follows:

where you should replace yourname with your name.

A.5.2 Abgabe

To submit your completed exercises, you should copy the files into directory: /homes5/prog/abgabe. For example, if a student named john has a drawing file and a LISP program file for exercise 6, the following commands will be needed to submit his files: Note: All file names must be in lower case, without exception.

Next Titel Inhalt Vorwort 1 2 3 4 5 6 7 8 9 10 11 12 Appendix @ CAAD Teachers

This website has been archived and is no longer maintained.